Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: chrome/browser/ui/app_modal_dialogs/message_box_handler.cc

Issue 5519016: Add a new GetInstance() method for singleton classes used in chrome/browser files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/app_modal_dialogs/message_box_handler.cc
diff --git a/chrome/browser/ui/app_modal_dialogs/message_box_handler.cc b/chrome/browser/ui/app_modal_dialogs/message_box_handler.cc
index 490117ca9997ef19a4d4145c35d3273d3754023f..0aba84b083bc4ba7f678c3b7730b2ec2f0447657 100644
--- a/chrome/browser/ui/app_modal_dialogs/message_box_handler.cc
+++ b/chrome/browser/ui/app_modal_dialogs/message_box_handler.cc
@@ -70,7 +70,7 @@ void RunJavascriptMessageBox(Profile* profile,
IPC::Message* reply_msg) {
bool is_alert = dialog_flags == MessageBoxFlags::kIsJavascriptAlert;
std::wstring title = GetTitle(profile, is_alert, frame_url);
- Singleton<AppModalDialogQueue>()->AddDialog(new JavaScriptAppModalDialog(
+ AppModalDialogQueue::GetInstance()->AddDialog(new JavaScriptAppModalDialog(
delegate, title, dialog_flags, message_text, default_prompt_text,
display_suppress_checkbox, false, reply_msg));
}
@@ -81,7 +81,7 @@ void RunBeforeUnloadDialog(TabContents* tab_contents,
std::wstring full_message =
message_text + L"\n\n" +
l10n_util::GetString(IDS_BEFOREUNLOAD_MESSAGEBOX_FOOTER);
- Singleton<AppModalDialogQueue>()->AddDialog(new JavaScriptAppModalDialog(
+ AppModalDialogQueue::GetInstance()->AddDialog(new JavaScriptAppModalDialog(
tab_contents, l10n_util::GetString(IDS_BEFOREUNLOAD_MESSAGEBOX_TITLE),
MessageBoxFlags::kIsJavascriptConfirm, message_text, std::wstring(),
false, true, reply_msg));
« no previous file with comments | « chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698