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

Unified Diff: chrome/browser/ui/chrome_pages.cc

Issue 12077030: Allow signin to continue even if sync is disabled by policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed mac tests. Created 7 years, 11 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 1041ad295b8477d8dbf0519b50d5da7d3e5ebe01..981c6ddeeb6c487e3db07d45048f64157030e4b9 100644
--- a/chrome/browser/ui/chrome_pages.cc
+++ b/chrome/browser/ui/chrome_pages.cc
@@ -9,6 +9,7 @@
#include "base/stringprintf.h"
#include "chrome/browser/download/download_shelf.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/signin/signin_manager.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/ui/browser.h"
@@ -181,12 +182,13 @@ void ShowSearchEngineSettings(Browser* browser) {
ShowSettingsSubPage(browser, kSearchEnginesSubPage);
}
-void ShowSyncSetup(Browser* browser, SyncPromoUI::Source source) {
+void ShowBrowserSignin(Browser* browser, SyncPromoUI::Source source) {
Profile* original_profile = browser->profile()->GetOriginalProfile();
ProfileSyncService* service =
ProfileSyncServiceFactory::GetInstance()->GetForProfile(
original_profile);
- if (service->HasSyncSetupCompleted()) {
+ // If we're signed in, just show settings.
+ if (!service->signin()->GetAuthenticatedUsername().empty()) {
ShowSettings(browser);
} else {
// If the browser's profile is an incognito profile, make sure to use

Powered by Google App Engine
This is Rietveld 408576698