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

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

Issue 12088040: Add a SigninAllowed policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Some bugfixes. Created 7 years, 10 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/one_click_signin_helper.cc
diff --git a/chrome/browser/ui/sync/one_click_signin_helper.cc b/chrome/browser/ui/sync/one_click_signin_helper.cc
index c3524fd0f3cae9456c51804ff38d786520ea1e44..2dfcded92db6ccc3397157892143564a0c936f93 100644
--- a/chrome/browser/ui/sync/one_click_signin_helper.cc
+++ b/chrome/browser/ui/sync/one_click_signin_helper.cc
@@ -390,7 +390,7 @@ bool OneClickSigninHelper::CanOffer(content::WebContents* web_contents,
Profile* profile =
Profile::FromBrowserContext(web_contents->GetBrowserContext());
- if (!profile)
+ if (!profile || !profile->IsSigninAllowed())
return false;
if (can_offer_for == CAN_OFFER_FOR_INTERSTITAL_ONLY &&
@@ -499,6 +499,9 @@ OneClickSigninHelper::Offer OneClickSigninHelper::CanOfferOnIOThreadImpl(
if (io_data->is_incognito())
return DONT_OFFER;
+ if (!SigninManager::IsSigninAllowedOnIOThread(io_data))
+ return DONT_OFFER;
+
if (!io_data->reverse_autologin_enabled()->GetValue())
return DONT_OFFER;

Powered by Google App Engine
This is Rietveld 408576698