summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-10 09:27:53 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-10 09:27:53 +0000
commitddbb0b1bb8d761ec15ae84efedd1ead5384a3cf1 (patch)
tree4e27597f166aa3a63a7565fe96c5c9b8434d13a0 /chrome/browser/resources
parent9e09bae277aa6cd98c3a5e340d7fdc82e8e07f96 (diff)
downloadchromium_src-ddbb0b1bb8d761ec15ae84efedd1ead5384a3cf1.zip
chromium_src-ddbb0b1bb8d761ec15ae84efedd1ead5384a3cf1.tar.gz
chromium_src-ddbb0b1bb8d761ec15ae84efedd1ead5384a3cf1.tar.bz2
[uber settings] more elegant fix for sync crash
in my haste to fix the crash I took the easy way out. This is slightly nicer in that it makes the no-sync-system case not jiggly as well, and we can remove one more js function. BUG=none TEST=launching settings, signing into and out of sync, launching settings in incognito Review URL: http://codereview.chromium.org/9370048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121417 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources')
-rw-r--r--chrome/browser/resources/options2/browser_options.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/resources/options2/browser_options.js b/chrome/browser/resources/options2/browser_options.js
index 1545ad2..af6ec2c 100644
--- a/chrome/browser/resources/options2/browser_options.js
+++ b/chrome/browser/resources/options2/browser_options.js
@@ -46,8 +46,7 @@ cr.define('options', function() {
OptionsPage.prototype.initializePage.call(this);
// Sync (Sign in) section.
- if (templateData.syncData)
- this.updateSyncState_(templateData.syncData);
+ this.updateSyncState_(templateData.syncData);
$('sync-action-link').onclick = function(event) {
SyncSetupOverlay.showErrorUI();
@@ -254,6 +253,12 @@ cr.define('options', function() {
* @private
*/
updateSyncState_: function(syncData) {
+ if (!syncData.syncSystemEnabled) {
+ $('sync-section').hidden = true;
+ return;
+ }
+
+ $('sync-section').hidden = false;
this.syncSetupCompleted = syncData.setupCompleted;
$('customize-sync').hidden = !syncData.setupCompleted;
@@ -299,10 +304,6 @@ cr.define('options', function() {
$('profiles-section').hidden = !visible;
},
- hideSyncSection_: function() {
- $('sync-section').hidden = true;
- },
-
/**
* Get the start/stop sync button DOM element. Used for testing.
* @return {DOMElement} The start/stop sync button.
@@ -587,7 +588,6 @@ cr.define('options', function() {
//Forward public APIs to private implementations.
[
'getStartStopSyncButton',
- 'hideSyncSection',
'setGtkThemeButtonEnabled',
'setInstantFieldTrialStatus',
'setProfilesInfo',