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

Unified Diff: chrome/browser/resources/options/browser_options.js

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/profiles/profile_impl.cc ('k') | chrome/browser/resources/options/sync_section.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/browser_options.js
diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js
index daef4fbea5dc17b4d60324aae9dfafea96c92e74..c574dc6f7db39ef2b43b6b5e2fafeaa5a85226fa 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -22,7 +22,7 @@ cr.define('options', function() {
__proto__: options.OptionsPage.prototype,
// State variables.
- syncSetupCompleted: false,
+ signedIn: false,
/**
* Keeps track of whether |onShowHomeButtonChanged_| has been called. See
@@ -80,7 +80,7 @@ cr.define('options', function() {
this.updateSyncState_(loadTimeData.getValue('syncData'));
$('start-stop-sync').onclick = function(event) {
- if (self.syncSetupCompleted)
+ if (self.signedIn)
SyncSetupOverlay.showStopSyncingUI();
else if (cr.isChromeOS)
SyncSetupOverlay.showSetupUIWithoutLogin();
@@ -664,16 +664,17 @@ cr.define('options', function() {
}
$('sync-section').hidden = false;
- this.syncSetupCompleted = syncData.setupCompleted;
- $('customize-sync').hidden = !syncData.setupCompleted;
+ this.signedIn = syncData.signedIn;
+ // Display the "setup sync" button if we're signed in and sync is not
+ // managed.
+ $('customize-sync').hidden = !(syncData.signedIn && !syncData.managed);
var startStopButton = $('start-stop-sync');
- startStopButton.disabled = syncData.managed ||
- syncData.setupInProgress;
+ startStopButton.disabled = syncData.setupInProgress;
startStopButton.hidden =
syncData.setupCompleted && cr.isChromeOS;
startStopButton.textContent =
- syncData.setupCompleted ?
+ syncData.signedIn ?
loadTimeData.getString('syncButtonTextStop') :
syncData.setupInProgress ?
loadTimeData.getString('syncButtonTextInProgress') :
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/resources/options/sync_section.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698