Chromium Code Reviews| 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.exportPath('options'); | 5 cr.exportPath('options'); |
| 6 | 6 |
| 7 /** @typedef {{appsEnforced: boolean, | 7 /** @typedef {{appsEnforced: boolean, |
| 8 * appsRegistered: boolean, | 8 * appsRegistered: boolean, |
| 9 * appsSynced: boolean, | 9 * appsSynced: boolean, |
| 10 * autofillEnforced: boolean, | 10 * autofillEnforced: boolean, |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 820 showSetupUI_: function() { | 820 showSetupUI_: function() { |
| 821 chrome.send('SyncSetupShowSetupUI'); | 821 chrome.send('SyncSetupShowSetupUI'); |
| 822 chrome.send('coreOptionsUserMetricsAction', ['Options_ShowSyncAdvanced']); | 822 chrome.send('coreOptionsUserMetricsAction', ['Options_ShowSyncAdvanced']); |
| 823 }, | 823 }, |
| 824 | 824 |
| 825 /** | 825 /** |
| 826 * Starts the signin process for the user. Does nothing if the user is | 826 * Starts the signin process for the user. Does nothing if the user is |
| 827 * already signed in. | 827 * already signed in. |
| 828 * @private | 828 * @private |
| 829 */ | 829 */ |
| 830 startSignIn_: function() { | 830 startSignIn_: function(accessPoint) { |
| 831 chrome.send('SyncSetupStartSignIn'); | 831 chrome.send('SyncSetupStartSignIn', [accessPoint]); |
| 832 }, | 832 }, |
| 833 | 833 |
| 834 /** | 834 /** |
| 835 * Forces user to sign out of Chrome for Chrome OS. | 835 * Forces user to sign out of Chrome for Chrome OS. |
| 836 * @private | 836 * @private |
| 837 */ | 837 */ |
| 838 doSignOutOnAuthError_: function() { | 838 doSignOutOnAuthError_: function() { |
| 839 chrome.send('SyncSetupDoSignOutOnAuthError'); | 839 chrome.send('SyncSetupDoSignOutOnAuthError'); |
| 840 }, | 840 }, |
| 841 }; | 841 }; |
| 842 | 842 |
| 843 // These methods are for general consumption. | 843 // Forward public APIs to private implementations. |
| 844 SyncSetupOverlay.closeOverlay = function() { | 844 cr.makePublic(SyncSetupOverlay, [ |
| 845 SyncSetupOverlay.getInstance().closeOverlay_(); | 845 'closeOverlay', |
| 846 }; | 846 'showSetupUI', |
| 847 | 847 'startSignIn', |
| 848 SyncSetupOverlay.showSetupUI = function() { | 848 'doSignOutOnAuthError', |
| 849 SyncSetupOverlay.getInstance().showSetupUI_(); | 849 'showSyncSetupPage', |
| 850 }; | 850 'showCustomizePage', |
| 851 | 851 'showStopSyncingUI', |
| 852 SyncSetupOverlay.startSignIn = function() { | 852 ]); |
|
Bernhard Bauer
2015/12/07 12:14:54
This line should be indented two spaces less.
gogerald1
2015/12/07 16:45:29
Done.
Bernhard Bauer
2015/12/07 16:49:27
_Two_ spaces less. You removed four, so now it's t
| |
| 853 SyncSetupOverlay.getInstance().startSignIn_(); | |
| 854 }; | |
| 855 | |
| 856 SyncSetupOverlay.doSignOutOnAuthError = function() { | |
| 857 SyncSetupOverlay.getInstance().doSignOutOnAuthError_(); | |
| 858 }; | |
| 859 | |
| 860 SyncSetupOverlay.showSyncSetupPage = function(page, args) { | |
| 861 SyncSetupOverlay.getInstance().showSyncSetupPage_(page, args); | |
| 862 }; | |
| 863 | |
| 864 SyncSetupOverlay.showCustomizePage = function(args, index) { | |
| 865 SyncSetupOverlay.getInstance().showCustomizePage_(args, index); | |
| 866 }; | |
| 867 | |
| 868 SyncSetupOverlay.showStopSyncingUI = function() { | |
| 869 SyncSetupOverlay.getInstance().showStopSyncingUI_(); | |
| 870 }; | |
| 871 | 853 |
| 872 // Export | 854 // Export |
| 873 return { | 855 return { |
| 874 SyncSetupOverlay: SyncSetupOverlay | 856 SyncSetupOverlay: SyncSetupOverlay |
| 875 }; | 857 }; |
| 876 }); | 858 }); |
| OLD | NEW |