Index: chrome/browser/ui/chrome_pages.cc |
diff --git a/chrome/browser/ui/chrome_pages.cc b/chrome/browser/ui/chrome_pages.cc |
index 9255140465d05bc515f18c0bde5b6497c8354931..fe73c53b1ccc723e01fa1a7eded1b5ef34a98727 100644 |
--- a/chrome/browser/ui/chrome_pages.cc |
+++ b/chrome/browser/ui/chrome_pages.cc |
@@ -10,6 +10,7 @@ |
#include "chrome/browser/download/download_shelf.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/signin/signin_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/browser.h" |
@@ -184,6 +185,10 @@ void ShowSearchEngineSettings(Browser* browser) { |
void ShowBrowserSignin(Browser* browser, SyncPromoUI::Source source) { |
Profile* original_profile = browser->profile()->GetOriginalProfile(); |
+ // Check if Signin to Chrome is allowed by the policy. |
+ SigninManager* signin = SigninManagerFactory::GetForProfile(original_profile); |
+ if (!signin->IsSigninAllowed()) |
+ return; |
ProfileSyncService* service = |
ProfileSyncServiceFactory::GetInstance()->GetForProfile( |
original_profile); |