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

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: Fix windows sync integration test failure 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
« no previous file with comments | « chrome/browser/ui/chrome_pages.h ('k') | chrome/browser/ui/cocoa/browser_window_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/chrome_pages.cc
diff --git a/chrome/browser/ui/chrome_pages.cc b/chrome/browser/ui/chrome_pages.cc
index 0864296f13c7b162aabe140732dd76cecfdb207f..9255140465d05bc515f18c0bde5b6497c8354931 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
« no previous file with comments | « chrome/browser/ui/chrome_pages.h ('k') | chrome/browser/ui/cocoa/browser_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698