| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 cr.define('options', function() { | 5 cr.define('options', function() { |
| 6 const OptionsPage = options.OptionsPage; | 6 const OptionsPage = options.OptionsPage; |
| 7 | 7 |
| 8 // Variable to track if a captcha challenge was issued. If this gets set to | 8 // Variable to track if a captcha challenge was issued. If this gets set to |
| 9 // true, it stays that way until we are told about successful login from | 9 // true, it stays that way until we are told about successful login from |
| 10 // the browser. This means subsequent errors (like invalid password) are | 10 // the browser. This means subsequent errors (like invalid password) are |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 var result = JSON.stringify({ | 242 var result = JSON.stringify({ |
| 243 "syncAllDataTypes": syncAll, | 243 "syncAllDataTypes": syncAll, |
| 244 "syncBookmarks": syncAll || $('bookmarks-checkbox').checked, | 244 "syncBookmarks": syncAll || $('bookmarks-checkbox').checked, |
| 245 "syncPreferences": syncAll || $('preferences-checkbox').checked, | 245 "syncPreferences": syncAll || $('preferences-checkbox').checked, |
| 246 "syncThemes": syncAll || $('themes-checkbox').checked, | 246 "syncThemes": syncAll || $('themes-checkbox').checked, |
| 247 "syncPasswords": syncAll || $('passwords-checkbox').checked, | 247 "syncPasswords": syncAll || $('passwords-checkbox').checked, |
| 248 "syncAutofill": syncAll || $('autofill-checkbox').checked, | 248 "syncAutofill": syncAll || $('autofill-checkbox').checked, |
| 249 "syncExtensions": syncAll || $('extensions-checkbox').checked, | 249 "syncExtensions": syncAll || $('extensions-checkbox').checked, |
| 250 "syncTypedUrls": syncAll || $('typed-urls-checkbox').checked, | 250 "syncTypedUrls": syncAll || $('typed-urls-checkbox').checked, |
| 251 "syncApps": syncAll || $('apps-checkbox').checked, | 251 "syncApps": syncAll || $('apps-checkbox').checked, |
| 252 "syncSearchEngines": syncAll || $('search-engines-checkbox').checked, | |
| 253 "syncSessions": syncAll || $('sessions-checkbox').checked, | 252 "syncSessions": syncAll || $('sessions-checkbox').checked, |
| 254 "encryptAllData": encryptAllData, | 253 "encryptAllData": encryptAllData, |
| 255 "usePassphrase": usePassphrase, | 254 "usePassphrase": usePassphrase, |
| 256 "isGooglePassphrase": googlePassphrase, | 255 "isGooglePassphrase": googlePassphrase, |
| 257 "passphrase": customPassphrase | 256 "passphrase": customPassphrase |
| 258 }); | 257 }); |
| 259 chrome.send('SyncSetupConfigure', [result]); | 258 chrome.send('SyncSetupConfigure', [result]); |
| 260 }, | 259 }, |
| 261 | 260 |
| 262 /** | 261 /** |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 $('omnibox-item').className = "sync-item-show"; | 336 $('omnibox-item').className = "sync-item-show"; |
| 338 } else { | 337 } else { |
| 339 $('omnibox-item').className = "sync-item-hide"; | 338 $('omnibox-item').className = "sync-item-hide"; |
| 340 } | 339 } |
| 341 if (args.appsRegistered) { | 340 if (args.appsRegistered) { |
| 342 $('apps-checkbox').checked = args.syncApps; | 341 $('apps-checkbox').checked = args.syncApps; |
| 343 $('apps-item').className = "sync-item-show"; | 342 $('apps-item').className = "sync-item-show"; |
| 344 } else { | 343 } else { |
| 345 $('apps-item').className = "sync-item-hide"; | 344 $('apps-item').className = "sync-item-hide"; |
| 346 } | 345 } |
| 347 if (args.searchEnginesRegistered) { | |
| 348 $('search-engines-checkbox').checked = args.syncSearchEngines; | |
| 349 $('search-engines-item').className = "sync-item-show"; | |
| 350 } else { | |
| 351 $('search-engines-item').className = "sync-item-hide"; | |
| 352 } | |
| 353 if (args.sessionsRegistered) { | 346 if (args.sessionsRegistered) { |
| 354 $('sessions-checkbox').checked = args.syncSessions; | 347 $('sessions-checkbox').checked = args.syncSessions; |
| 355 $('sessions-item').className = "sync-item-show"; | 348 $('sessions-item').className = "sync-item-show"; |
| 356 } else { | 349 } else { |
| 357 $('sessions-item').className = "sync-item-hide"; | 350 $('sessions-item').className = "sync-item-hide"; |
| 358 } | 351 } |
| 359 | 352 |
| 360 this.setCheckboxesToKeepEverythingSynced_(args.syncAllDataTypes); | 353 this.setCheckboxesToKeepEverythingSynced_(args.syncAllDataTypes); |
| 361 }, | 354 }, |
| 362 | 355 |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 | 834 |
| 842 SyncSetupOverlay.showStopSyncingUI = function() { | 835 SyncSetupOverlay.showStopSyncingUI = function() { |
| 843 SyncSetupOverlay.getInstance().showStopSyncingUI_(); | 836 SyncSetupOverlay.getInstance().showStopSyncingUI_(); |
| 844 }; | 837 }; |
| 845 | 838 |
| 846 // Export | 839 // Export |
| 847 return { | 840 return { |
| 848 SyncSetupOverlay: SyncSetupOverlay | 841 SyncSetupOverlay: SyncSetupOverlay |
| 849 }; | 842 }; |
| 850 }); | 843 }); |
| OLD | NEW |