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

Unified Diff: chrome/browser/ui/cocoa/simple_message_box_mac.mm

Issue 2929953002: Make profile error dialog async (Closed)
Patch Set: for #3 comments Created 3 years, 6 months 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
« no previous file with comments | « chrome/browser/ui/android/simple_message_box_android.cc ('k') | chrome/browser/ui/profile_error_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/simple_message_box_mac.mm
diff --git a/chrome/browser/ui/cocoa/simple_message_box_mac.mm b/chrome/browser/ui/cocoa/simple_message_box_mac.mm
index 7c71c80b43b937cebb722c11d3ac4936246ae475..62507b53396db0489b8b28a79422df50e3da2830 100644
--- a/chrome/browser/ui/cocoa/simple_message_box_mac.mm
+++ b/chrome/browser/ui/cocoa/simple_message_box_mac.mm
@@ -6,6 +6,9 @@
#import <Cocoa/Cocoa.h>
+#include <utility>
+
+#include "base/callback.h"
#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "chrome/browser/ui/simple_message_box_internal.h"
@@ -68,13 +71,15 @@ void ShowWarningMessageBox(gfx::NativeWindow parent,
MESSAGE_BOX_TYPE_WARNING);
}
-bool ShowWarningMessageBoxWithCheckbox(gfx::NativeWindow parent,
- const base::string16& title,
- const base::string16& message,
- const base::string16& checkbox_text) {
+void ShowWarningMessageBoxWithCheckbox(
+ gfx::NativeWindow parent,
+ const base::string16& title,
+ const base::string16& message,
+ const base::string16& checkbox_text,
+ base::OnceCallback<void(bool checked)> callback) {
ShowMessageBox(parent, title, message, checkbox_text,
MESSAGE_BOX_TYPE_WARNING);
- return false;
+ std::move(callback).Run(false);
}
MessageBoxResult ShowQuestionMessageBox(gfx::NativeWindow parent,
« no previous file with comments | « chrome/browser/ui/android/simple_message_box_android.cc ('k') | chrome/browser/ui/profile_error_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698