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

Unified Diff: chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc

Issue 12088040: Add a SigninAllowed policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT, another try to upload. 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/webui/sync_promo/sync_promo_ui.cc
diff --git a/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc b/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc
index dd8a79ec53d48a23d43dc0d21dde074c1a3c8ca3..e378a235316dac90ec2563ecce91bdb7766a3dad 100644
--- a/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc
+++ b/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc
@@ -127,6 +127,9 @@ bool SyncPromoUI::ShouldShowSyncPromo(Profile* profile) {
if (net::NetworkChangeNotifier::IsOffline())
return false;
+ // Honor the signin policy.
+ if (!profile->GetOriginalProfile()->IsSigninAllowed())
+ return false;
// Display the signin promo if the user is not signed in.
SigninManager* signin = SigninManagerFactory::GetForProfile(
profile->GetOriginalProfile());

Powered by Google App Engine
This is Rietveld 408576698