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

Unified Diff: chrome/browser/ui/sync/profile_signin_confirmation_helper.cc

Issue 14846020: Add Views implementation of ProfileSigninConfirmationDialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no forward declared enums Created 7 years, 7 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
Index: chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
diff --git a/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc b/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
index 941b231b679ea9623acf5859b6d259e940dccd0b..91dbd92c42f7b41d9e0697a7f10560cc4226b2a1 100644
--- a/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
+++ b/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
@@ -82,7 +82,8 @@ class ProfileSigninConfirmationHelper
public:
ProfileSigninConfirmationHelper(
Profile* profile,
- const base::Callback<void(bool)>& return_result);
+ const base::Callback
+ <void(ui::DisplayCreateProfilePrompt)>& return_result);
void CheckHasHistory(int max_entries);
void CheckHasTypedURLs();
void set_pending_requests(int requests);
@@ -110,14 +111,14 @@ class ProfileSigninConfirmationHelper
bool result_returned_;
// Callback to pass the result back to the caller.
- const base::Callback<void(bool)> return_result_;
+ const base::Callback<void(ui::DisplayCreateProfilePrompt)> return_result_;
DISALLOW_COPY_AND_ASSIGN(ProfileSigninConfirmationHelper);
};
ProfileSigninConfirmationHelper::ProfileSigninConfirmationHelper(
Profile* profile,
- const base::Callback<void(bool)>& return_result)
+ const base::Callback<void(ui::DisplayCreateProfilePrompt)>& return_result)
: profile_(profile),
pending_requests_(0),
result_returned_(false),
@@ -177,7 +178,8 @@ void ProfileSigninConfirmationHelper::ReturnResult(bool result) {
if (!result_returned_ && (--pending_requests_ == 0 || result)) {
result_returned_ = true;
request_consumer_.CancelAllRequests();
- return_result_.Run(result);
+ return_result_.Run(result ? ui::PROMPT_TO_CREATE_PROFILE
+ : ui::DO_NOT_PROMPT_TO_CREATE_PROFILE);
Peter Kasting 2013/05/15 00:11:03 Nit: Illegal wrapping style; operators go on the e
dconnelly 2013/05/17 13:01:55 Removed now that I brought back the bool.
}
}
@@ -191,11 +193,11 @@ bool HasBeenShutdown(Profile* profile) {
void CheckShouldPromptForNewProfile(
Profile* profile,
- const base::Callback<void(bool)>& return_result) {
+ const base::Callback<void(DisplayCreateProfilePrompt)>& return_result) {
if (HasBeenShutdown(profile) ||
HasBookmarks(profile) ||
HasSyncedExtensions(profile)) {
- return_result.Run(true);
+ return_result.Run(PROMPT_TO_CREATE_PROFILE);
return;
}
// Fire asynchronous queries for profile data.

Powered by Google App Engine
This is Rietveld 408576698