| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 */ var 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 |
| 11 // rendered in the captcha state, which is basically identical except we | 11 // rendered in the captcha state, which is basically identical except we |
| 12 // don't show the top error blurb 'Error Signing in' or the 'Create | 12 // don't show the top error blurb 'Error Signing in' or the 'Create |
| 13 // account' link. | 13 // account' link. |
| 14 var captchaChallengeActive_ = false; | 14 var captchaChallengeActive_ = false; |
| 15 | 15 |
| 16 // True if the synced account uses a custom passphrase. | 16 // True if the synced account uses a custom passphrase. |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 showOverlay_: function() { | 67 showOverlay_: function() { |
| 68 OptionsPage.navigateToPage('syncSetup'); | 68 OptionsPage.navigateToPage('syncSetup'); |
| 69 }, | 69 }, |
| 70 | 70 |
| 71 closeOverlay_: function() { | 71 closeOverlay_: function() { |
| 72 OptionsPage.closeOverlay(); | 72 OptionsPage.closeOverlay(); |
| 73 }, | 73 }, |
| 74 | 74 |
| 75 /** @inheritDoc */ | 75 /** @inheritDoc */ |
| 76 didShowPage: function() { | 76 didShowPage: function() { |
| 77 var forceLogin = document.location.hash == "#forceLogin"; | 77 var forceLogin = document.location.hash == '#forceLogin'; |
| 78 var result = JSON.stringify({'forceLogin': forceLogin}); | 78 var result = JSON.stringify({'forceLogin': forceLogin}); |
| 79 chrome.send('SyncSetupAttachHandler', [result]); | 79 chrome.send('SyncSetupAttachHandler', [result]); |
| 80 }, | 80 }, |
| 81 | 81 |
| 82 /** @inheritDoc */ | 82 /** @inheritDoc */ |
| 83 didClosePage: function() { | 83 didClosePage: function() { |
| 84 chrome.send('SyncSetupDidClosePage'); | 84 chrome.send('SyncSetupDidClosePage'); |
| 85 }, | 85 }, |
| 86 | 86 |
| 87 getEncryptionRadioCheckedValue_: function() { | 87 getEncryptionRadioCheckedValue_: function() { |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 | 879 |
| 880 SyncSetupOverlay.showStopSyncingUI = function() { | 880 SyncSetupOverlay.showStopSyncingUI = function() { |
| 881 SyncSetupOverlay.getInstance().showStopSyncingUI_(); | 881 SyncSetupOverlay.getInstance().showStopSyncingUI_(); |
| 882 }; | 882 }; |
| 883 | 883 |
| 884 // Export | 884 // Export |
| 885 return { | 885 return { |
| 886 SyncSetupOverlay: SyncSetupOverlay | 886 SyncSetupOverlay: SyncSetupOverlay |
| 887 }; | 887 }; |
| 888 }); | 888 }); |
| OLD | NEW |