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

Unified Diff: chrome/browser/signin/signin_promo.cc

Issue 300523003: Fix some problems with new reauth: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 6 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
« no previous file with comments | « chrome/browser/signin/signin_promo.h ('k') | chrome/browser/ui/sync/one_click_signin_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/signin_promo.cc
diff --git a/chrome/browser/signin/signin_promo.cc b/chrome/browser/signin/signin_promo.cc
index 91de1f9458035da5b836b1203cd9dae65fbe694e..6e3039416061e04e5cc62a678ee207aa63845137 100644
--- a/chrome/browser/signin/signin_promo.cc
+++ b/chrome/browser/signin/signin_promo.cc
@@ -16,8 +16,6 @@
#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service.h"
-#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/ui/webui/options/core_options_handler.h"
#include "chrome/browser/ui/webui/theme_source.h"
#include "chrome/common/net/url_util.h"
@@ -249,13 +247,12 @@ GURL GetReauthURL(Profile* profile, const std::string& account_id) {
account_id);
}
- const std::string primary_account_id =
- SigninManagerFactory::GetForProfile(profile)->
- GetAuthenticatedAccountId();
- signin::Source source = account_id == primary_account_id ?
- signin::SOURCE_SETTINGS : signin::SOURCE_AVATAR_BUBBLE_ADD_ACCOUNT;
+ signin::Source source = switches::IsNewProfileManagement() ?
+ signin::SOURCE_REAUTH : signin::SOURCE_SETTINGS;
- GURL url = signin::GetPromoURL(source, true);
+ GURL url = signin::GetPromoURL(
+ source, true /* auto_close */,
+ switches::IsNewProfileManagement() /* is_constrained */);
url = net::AppendQueryParameter(url, "email", account_id);
url = net::AppendQueryParameter(url, "validateEmail", "1");
return net::AppendQueryParameter(url, "readOnlyEmail", "1");
« no previous file with comments | « chrome/browser/signin/signin_promo.h ('k') | chrome/browser/ui/sync/one_click_signin_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698