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

Unified Diff: chrome/browser/ui/chrome_pages.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/chrome_pages.cc
diff --git a/chrome/browser/ui/chrome_pages.cc b/chrome/browser/ui/chrome_pages.cc
index a2fbf0e8a4471a11e4653bb92321b62a7519a8f3..ddfb24bdaec9285ab3f925b70d70c86a3313b78c 100644
--- a/chrome/browser/ui/chrome_pages.cc
+++ b/chrome/browser/ui/chrome_pages.cc
@@ -185,6 +185,9 @@ void ShowBrowserSignin(Browser* browser, SyncPromoUI::Source source) {
Profile* original_profile = browser->profile()->GetOriginalProfile();
SigninManager* manager =
SigninManagerFactory::GetForProfile(original_profile);
+ // Check if Signin to Chrome is allowed by the policy.
+ if (!manager->IsSigninAllowed())
+ return;
// If we're signed in, just show settings.
if (!manager->GetAuthenticatedUsername().empty()) {
ShowSettings(browser);

Powered by Google App Engine
This is Rietveld 408576698