diff --git a/chrome/browser/bookmarks/bookmark_utils.cc b/chrome/browser/bookmarks/bookmark_utils.cc index 025de3191c8886..ddd60a9a9ab856 100644 --- a/chrome/browser/bookmarks/bookmark_utils.cc +++ b/chrome/browser/bookmarks/bookmark_utils.cc @@ -175,11 +175,11 @@ bool ShouldOpenAll(gfx::NativeWindow parent, if (child_count < bookmark_utils::num_urls_before_prompting) return true; - return browser::ShowMessageBox(parent, + return chrome::ShowMessageBox(parent, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), l10n_util::GetStringFUTF16(IDS_BOOKMARK_BAR_SHOULD_OPEN_ALL, base::IntToString16(child_count)), - browser::MESSAGE_BOX_TYPE_QUESTION) == browser::MESSAGE_BOX_RESULT_YES; + chrome::MESSAGE_BOX_TYPE_QUESTION) == chrome::MESSAGE_BOX_RESULT_YES; } // Comparison function that compares based on date modified of the two nodes. @@ -710,11 +710,11 @@ bool NodeHasURLs(const BookmarkNode* node) { bool ConfirmDeleteBookmarkNode(const BookmarkNode* node, gfx::NativeWindow window) { DCHECK(node && node->is_folder() && !node->empty()); - return browser::ShowMessageBox(window, + return chrome::ShowMessageBox(window, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), l10n_util::GetStringFUTF16Int(IDS_BOOKMARK_EDITOR_CONFIRM_DELETE, ChildURLCountTotal(node)), - browser::MESSAGE_BOX_TYPE_QUESTION) == browser::MESSAGE_BOX_RESULT_YES; + chrome::MESSAGE_BOX_TYPE_QUESTION) == chrome::MESSAGE_BOX_RESULT_YES; } void DeleteBookmarkFolders(BookmarkModel* model, diff --git a/chrome/browser/chrome_browser_main_win.cc b/chrome/browser/chrome_browser_main_win.cc index 69d0707eac2b4a..5939c47fa8c534 100644 --- a/chrome/browser/chrome_browser_main_win.cc +++ b/chrome/browser/chrome_browser_main_win.cc @@ -91,19 +91,18 @@ void RecordBreakpadStatusUMA(MetricsService* metrics) { void WarnAboutMinimumSystemRequirements() { if (base::win::GetVersion() < base::win::VERSION_XP) { - const string16 title = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); - const string16 message = - l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP); - browser::ShowMessageBox(NULL, title, message, - browser::MESSAGE_BOX_TYPE_WARNING); + chrome::ShowMessageBox(NULL, + l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), + l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP), + chrome::MESSAGE_BOX_TYPE_WARNING); } } void ShowCloseBrowserFirstMessageBox() { - const string16 title = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); - const string16 message = l10n_util::GetStringUTF16(IDS_UNINSTALL_CLOSE_APP); - browser::ShowMessageBox(NULL, title, message, - browser::MESSAGE_BOX_TYPE_WARNING); + chrome::ShowMessageBox(NULL, + l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), + l10n_util::GetStringUTF16(IDS_UNINSTALL_CLOSE_APP), + chrome::MESSAGE_BOX_TYPE_WARNING); } int DoUninstallTasks(bool chrome_still_running) { diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index c82988bbf2f4d4..91907f42b22877 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -407,7 +407,7 @@ content::WebContentsView* content::WebContentsViewDelegate* ChromeContentBrowserClient::GetWebContentsViewDelegate( content::WebContents* web_contents) { - return browser::CreateWebContentsViewDelegate(web_contents); + return chrome::CreateWebContentsViewDelegate(web_contents); } void ChromeContentBrowserClient::RenderViewHostCreated( diff --git a/chrome/browser/chromeos/extensions/file_manager_util.cc b/chrome/browser/chromeos/extensions/file_manager_util.cc index b94a84396d44df..49cd9defe41640 100644 --- a/chrome/browser/chromeos/extensions/file_manager_util.cc +++ b/chrome/browser/chromeos/extensions/file_manager_util.cc @@ -214,13 +214,13 @@ void ShowWarningMessageBox(Profile* profile, const FilePath& path) { // TODO: if FindOrCreateTabbedBrowser creates a new browser the returned // browser is leaked. Browser* browser = browser::FindOrCreateTabbedBrowser(profile); - browser::ShowMessageBox( + chrome::ShowMessageBox( browser->window()->GetNativeWindow(), l10n_util::GetStringFUTF16( IDS_FILE_BROWSER_ERROR_VIEWING_FILE_TITLE, UTF8ToUTF16(path.BaseName().value())), l10n_util::GetStringUTF16(IDS_FILE_BROWSER_ERROR_VIEWING_FILE), - browser::MESSAGE_BOX_TYPE_WARNING); + chrome::MESSAGE_BOX_TYPE_WARNING); } // Called when a file on GData was found. Opens the file found at |file_path| diff --git a/chrome/browser/extensions/extension_error_reporter.cc b/chrome/browser/extensions/extension_error_reporter.cc index 6f85a744f73860..e5abe83451f483 100644 --- a/chrome/browser/extensions/extension_error_reporter.cc +++ b/chrome/browser/extensions/extension_error_reporter.cc @@ -56,8 +56,8 @@ void ExtensionErrorReporter::ReportError(const string16& message, LOG(ERROR) << "Extension error: " << message; if (enable_noisy_errors_ && be_noisy) { - browser::ShowMessageBox(NULL, ASCIIToUTF16("Extension error"), message, - browser::MESSAGE_BOX_TYPE_WARNING); + chrome::ShowMessageBox(NULL, ASCIIToUTF16("Extension error"), message, + chrome::MESSAGE_BOX_TYPE_WARNING); } } diff --git a/chrome/browser/extensions/extensions_startup.cc b/chrome/browser/extensions/extensions_startup.cc index 54dc2e26632a3d..94caf2ecc5fdfa 100644 --- a/chrome/browser/extensions/extensions_startup.cc +++ b/chrome/browser/extensions/extensions_startup.cc @@ -18,16 +18,16 @@ void ExtensionsStartupUtil::OnPackSuccess( const FilePath& crx_path, const FilePath& output_private_key_path) { pack_job_succeeded_ = true; - browser::ShowMessageBox(NULL, ASCIIToUTF16("Extension Packaging Success"), + chrome::ShowMessageBox(NULL, ASCIIToUTF16("Extension Packaging Success"), PackExtensionJob::StandardSuccessMessage(crx_path, output_private_key_path), - browser::MESSAGE_BOX_TYPE_INFORMATION); + chrome::MESSAGE_BOX_TYPE_INFORMATION); } void ExtensionsStartupUtil::OnPackFailure(const std::string& error_message, ExtensionCreator::ErrorType type) { - browser::ShowMessageBox(NULL, ASCIIToUTF16("Extension Packaging Error"), - UTF8ToUTF16(error_message), browser::MESSAGE_BOX_TYPE_WARNING); + chrome::ShowMessageBox(NULL, ASCIIToUTF16("Extension Packaging Error"), + UTF8ToUTF16(error_message), chrome::MESSAGE_BOX_TYPE_WARNING); } bool ExtensionsStartupUtil::PackExtension(const CommandLine& cmd_line) { diff --git a/chrome/browser/hang_monitor/hung_plugin_action.cc b/chrome/browser/hang_monitor/hung_plugin_action.cc index 35ae2a4d528534..06684258bdad4c 100644 --- a/chrome/browser/hang_monitor/hung_plugin_action.cc +++ b/chrome/browser/hang_monitor/hung_plugin_action.cc @@ -113,9 +113,9 @@ bool HungPluginAction::OnHungWindowDetected(HWND hung_window, HungWindowResponseCallback, reinterpret_cast(this)); current_hung_plugin_window_ = hung_window; - if (browser::ShowMessageBox(NULL, title, message, - browser::MESSAGE_BOX_TYPE_QUESTION) == - browser::MESSAGE_BOX_RESULT_YES) { + if (chrome::ShowMessageBox(NULL, title, message, + chrome::MESSAGE_BOX_TYPE_QUESTION) == + chrome::MESSAGE_BOX_RESULT_YES) { *action = HungWindowNotification::HUNG_WINDOW_TERMINATE_PROCESS; } else { // If the user choses to ignore the hung window warning, the diff --git a/chrome/browser/importer/importer_host.cc b/chrome/browser/importer/importer_host.cc index 38d51fb1f62c66..4003c767bde919 100644 --- a/chrome/browser/importer/importer_host.cc +++ b/chrome/browser/importer/importer_host.cc @@ -158,9 +158,9 @@ void ImporterHost::StartImportSettings( void ImporterHost::OnGoogleGAIACookieChecked(bool result) { #if defined(OS_WIN) if (!result) { - browser::ShowMessageBox(NULL, + chrome::ShowMessageBox(NULL, l10n_util::GetStringUTF16(IDS_IMPORTER_GOOGLE_LOGIN_TEXT), string16(), - browser::MESSAGE_BOX_TYPE_INFORMATION); + chrome::MESSAGE_BOX_TYPE_INFORMATION); GURL url("https://accounts.google.com/ServiceLogin"); DCHECK(profile_); diff --git a/chrome/browser/pepper_gtalk_message_filter.cc b/chrome/browser/pepper_gtalk_message_filter.cc index 95a5dbaa444930..1ed1c133226a23 100644 --- a/chrome/browser/pepper_gtalk_message_filter.cc +++ b/chrome/browser/pepper_gtalk_message_filter.cc @@ -51,8 +51,8 @@ void PepperGtalkMessageFilter::OnTalkGetPermission(uint32 plugin_dispatcher_id, aura::Window* parent = ash::Shell::GetContainer( ash::Shell::GetActiveRootWindow(), ash::internal::kShellWindowId_SystemModalContainer); - user_response = browser::ShowMessageBox(parent, title, message, - browser::MESSAGE_BOX_TYPE_QUESTION) == browser::MESSAGE_BOX_RESULT_YES; + user_response = chrome::ShowMessageBox(parent, title, message, + chrome::MESSAGE_BOX_TYPE_QUESTION) == chrome::MESSAGE_BOX_RESULT_YES; #else NOTIMPLEMENTED(); #endif diff --git a/chrome/browser/printing/print_error_dialog.cc b/chrome/browser/printing/print_error_dialog.cc index e1986ad4e78605..5b57b08db83939 100644 --- a/chrome/browser/printing/print_error_dialog.cc +++ b/chrome/browser/printing/print_error_dialog.cc @@ -11,11 +11,10 @@ namespace chrome { void ShowPrintErrorDialog(gfx::NativeWindow parent) { - browser::ShowMessageBox( - parent, - l10n_util::GetStringUTF16(IDS_PRINT_SPOOL_FAILED_TITLE_TEXT), - l10n_util::GetStringUTF16(IDS_PRINT_SPOOL_FAILED_ERROR_TEXT), - browser::MESSAGE_BOX_TYPE_WARNING); + ShowMessageBox(parent, + l10n_util::GetStringUTF16(IDS_PRINT_SPOOL_FAILED_TITLE_TEXT), + l10n_util::GetStringUTF16(IDS_PRINT_SPOOL_FAILED_ERROR_TEXT), + MESSAGE_BOX_TYPE_WARNING); } } // namespace chrome diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc index 0b59c7126384d3..783c9da1a62602 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc @@ -271,10 +271,10 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { reinterpret_cast(&visible_window)); // If there is a visible browser window, ask the user before killing it. - if (visible_window && browser::ShowMessageBox(NULL, + if (visible_window && chrome::ShowMessageBox(NULL, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), l10n_util::GetStringUTF16(IDS_BROWSER_HUNGBROWSER_MESSAGE), - browser::MESSAGE_BOX_TYPE_QUESTION) == browser::MESSAGE_BOX_RESULT_NO) { + chrome::MESSAGE_BOX_TYPE_QUESTION) == chrome::MESSAGE_BOX_RESULT_NO) { // The user denied. Quit silently. return PROCESS_NOTIFIED; } diff --git a/chrome/browser/ui/cocoa/simple_message_box_mac.mm b/chrome/browser/ui/cocoa/simple_message_box_mac.mm index 297943aff8c8c1..9edf2f063526dd 100644 --- a/chrome/browser/ui/cocoa/simple_message_box_mac.mm +++ b/chrome/browser/ui/cocoa/simple_message_box_mac.mm @@ -10,7 +10,7 @@ #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util_mac.h" -namespace browser { +namespace chrome { MessageBoxResult ShowMessageBox(gfx::NativeWindow parent, const string16& title, @@ -35,4 +35,4 @@ MessageBoxResult ShowMessageBox(gfx::NativeWindow parent, MESSAGE_BOX_RESULT_NO : MESSAGE_BOX_RESULT_YES; } -} // namespace browser +} // namespace chrome diff --git a/chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm b/chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm index 1086232106774a..9e69e86f6759aa 100644 --- a/chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm +++ b/chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm @@ -53,11 +53,11 @@ new RenderViewContextMenuMac(web_contents_, context_menu_->Init(); } -namespace browser { +namespace chrome { content::WebContentsViewDelegate* CreateWebContentsViewDelegate( content::WebContents* web_contents) { return new ChromeWebContentsViewDelegateMac(web_contents); } -} // namespace browser +} // namespace chrome diff --git a/chrome/browser/ui/gtk/simple_message_box_gtk.cc b/chrome/browser/ui/gtk/simple_message_box_gtk.cc index d7050624a4fbd0..703ab89e52cf18 100644 --- a/chrome/browser/ui/gtk/simple_message_box_gtk.cc +++ b/chrome/browser/ui/gtk/simple_message_box_gtk.cc @@ -41,7 +41,7 @@ void OnDialogResponse(GtkWidget* widget, int response, void* user_data) { } // namespace -namespace browser { +namespace chrome { MessageBoxResult ShowMessageBox(gfx::NativeWindow parent, const string16& title, @@ -82,4 +82,4 @@ MessageBoxResult ShowMessageBox(gfx::NativeWindow parent, return MESSAGE_BOX_RESULT_YES; } -} // namespace browser +} // namespace chrome diff --git a/chrome/browser/ui/gtk/tab_contents/chrome_web_contents_view_delegate_gtk.cc b/chrome/browser/ui/gtk/tab_contents/chrome_web_contents_view_delegate_gtk.cc index c7d7d2639da9df..30be9c1e29a7fc 100644 --- a/chrome/browser/ui/gtk/tab_contents/chrome_web_contents_view_delegate_gtk.cc +++ b/chrome/browser/ui/gtk/tab_contents/chrome_web_contents_view_delegate_gtk.cc @@ -179,11 +179,11 @@ void ChromeWebContentsViewDelegateGtk::OnSetFloatingPosition( g_value_unset(&value); } -namespace browser { +namespace chrome { content::WebContentsViewDelegate* CreateWebContentsViewDelegate( content::WebContents* web_contents) { return new ChromeWebContentsViewDelegateGtk(web_contents); } -} // namespace browser +} // namespace chrome diff --git a/chrome/browser/ui/profile_error_dialog.cc b/chrome/browser/ui/profile_error_dialog.cc index 85e9e1e957341f..851731bfe43cf6 100644 --- a/chrome/browser/ui/profile_error_dialog.cc +++ b/chrome/browser/ui/profile_error_dialog.cc @@ -13,9 +13,9 @@ void ShowProfileErrorDialog(int message_id) { #if defined(OS_ANDROID) NOTIMPLEMENTED(); #else - browser::ShowMessageBox(NULL, - l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), - l10n_util::GetStringUTF16(message_id), - browser::MESSAGE_BOX_TYPE_WARNING); + chrome::ShowMessageBox(NULL, + l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), + l10n_util::GetStringUTF16(message_id), + chrome::MESSAGE_BOX_TYPE_WARNING); #endif } diff --git a/chrome/browser/ui/simple_message_box.h b/chrome/browser/ui/simple_message_box.h index ea6df3d23959a5..bd85403da99ab6 100644 --- a/chrome/browser/ui/simple_message_box.h +++ b/chrome/browser/ui/simple_message_box.h @@ -9,7 +9,7 @@ #include "base/string16.h" #include "ui/gfx/native_widget_types.h" -namespace browser { +namespace chrome { enum MessageBoxResult { MESSAGE_BOX_RESULT_NO = 0, @@ -35,6 +35,6 @@ MessageBoxResult ShowMessageBox(gfx::NativeWindow parent, const string16& message, MessageBoxType type); -} // namespace browser +} // namespace chrome #endif // CHROME_BROWSER_UI_SIMPLE_MESSAGE_BOX_H_ diff --git a/chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h b/chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h index 809c8abff99ced..b44c0481abd11c 100644 --- a/chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h +++ b/chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h @@ -8,14 +8,14 @@ namespace content { class WebContents; -class WebContentsViewMacDelegate; +class WebContentsViewDelegate; } -namespace browser { +namespace chrome { content::WebContentsViewDelegate* CreateWebContentsViewDelegate( content::WebContents* web_contents); -} // namespace +} // namespace chrome #endif // CHROME_BROWSER_UI_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_H_ diff --git a/chrome/browser/ui/views/simple_message_box_views.cc b/chrome/browser/ui/views/simple_message_box_views.cc index a3998857766e07..f87e526336650b 100644 --- a/chrome/browser/ui/views/simple_message_box_views.cc +++ b/chrome/browser/ui/views/simple_message_box_views.cc @@ -23,7 +23,7 @@ #include "ui/aura/root_window.h" #endif -namespace browser { +namespace chrome { namespace { @@ -187,4 +187,4 @@ MessageBoxResult ShowMessageBox(gfx::NativeWindow parent, return dialog->result(); } -} // namespace browser +} // namespace chrome diff --git a/chrome/browser/ui/views/simple_message_box_win.cc b/chrome/browser/ui/views/simple_message_box_win.cc index e3fa44de577314..30930a9dc054a7 100644 --- a/chrome/browser/ui/views/simple_message_box_win.cc +++ b/chrome/browser/ui/views/simple_message_box_win.cc @@ -6,7 +6,7 @@ #include "ui/base/win/message_box_win.h" -namespace browser { +namespace chrome { MessageBoxResult ShowMessageBox(gfx::NativeWindow parent, const string16& title, @@ -20,4 +20,4 @@ MessageBoxResult ShowMessageBox(gfx::NativeWindow parent, MESSAGE_BOX_RESULT_NO : MESSAGE_BOX_RESULT_YES; } -} // namespace browser +} // namespace chrome diff --git a/chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc b/chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc index 53b2e3c2d21372..5815006068bed2 100644 --- a/chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc +++ b/chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc @@ -193,11 +193,11 @@ void ChromeWebContentsViewDelegateViews::SetInitialFocus() { } } -namespace browser { +namespace chrome { content::WebContentsViewDelegate* CreateWebContentsViewDelegate( content::WebContents* web_contents) { return new ChromeWebContentsViewDelegateViews(web_contents); } -} // namespace browser +} // namespace chrome diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc b/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc index eaaa664e973a97..cbdee9403b09da 100644 --- a/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc +++ b/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc @@ -143,10 +143,10 @@ void MobileSetupDialogDelegate::OnCloseContents(WebContents* source, return; } - *out_close_dialog = browser::ShowMessageBox(dialog_window_, + *out_close_dialog = chrome::ShowMessageBox(dialog_window_, l10n_util::GetStringUTF16(IDS_MOBILE_SETUP_TITLE), l10n_util::GetStringUTF16(IDS_MOBILE_CANCEL_ACTIVATION), - browser::MESSAGE_BOX_TYPE_QUESTION); + chrome::MESSAGE_BOX_TYPE_QUESTION); } bool MobileSetupDialogDelegate::ShouldShowDialogTitle() const {