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

Unified Diff: chrome/browser/resources/sync_setup_overlay.js

Issue 553573003: Compile chrome://settings, part 3: 167 proper errors left (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@G_options_errors_1
Patch Set: rebase Created 6 years, 3 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/resources/options/website_settings.js ('k') | ui/webui/resources/js/cr/ui/list.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/sync_setup_overlay.js
diff --git a/chrome/browser/resources/sync_setup_overlay.js b/chrome/browser/resources/sync_setup_overlay.js
index 6182e13ce61240a5a51b665400de93a9a7a92e73..d0a8358c92e04eeee11d52a0fc7e7846639b8ea1 100644
--- a/chrome/browser/resources/sync_setup_overlay.js
+++ b/chrome/browser/resources/sync_setup_overlay.js
@@ -4,6 +4,47 @@
cr.exportPath('options');
+/** @typedef {{appsEnforced: boolean,
+ * appsRegistered: boolean,
+ * appsSynced: boolean,
+ * autofillEnforced: boolean,
+ * autofillRegistered: boolean,
+ * autofillSynced: boolean,
+ * bookmarksEnforced: boolean,
+ * bookmarksRegistered: boolean,
+ * bookmarksSynced: boolean,
+ * encryptAllData: boolean,
+ * enterGooglePassphraseBody: (string|undefined),
+ * enterPassphraseBody: (string|undefined),
+ * extensionsEnforced: boolean,
+ * extensionsRegistered: boolean,
+ * extensionsSynced: boolean,
+ * fullEncryptionBody: string,
+ * isSupervised: boolean,
+ * passphraseFailed: boolean,
+ * passwordsEnforced: boolean,
+ * passwordsRegistered: boolean,
+ * passwordsSynced: boolean,
+ * preferencesEnforced: boolean,
+ * preferencesRegistered: boolean,
+ * preferencesSynced: boolean,
+ * showPassphrase: boolean,
+ * showSyncEverythingPage: boolean,
+ * syncAllDataTypes: boolean,
+ * syncNothing: boolean,
+ * tabsEnforced: boolean,
+ * tabsRegistered: boolean,
+ * tabsSynced: boolean,
+ * themesEnforced: boolean,
+ * themesRegistered: boolean,
+ * themesSynced: boolean,
+ * typedUrlsEnforced: boolean,
+ * typedUrlsRegistered: boolean,
+ * typedUrlsSynced: boolean,
+ * usePassphrase: boolean}}
+ */
+var SyncConfig;
+
/**
* The user's selection in the synced data type drop-down menu, as an index.
* @enum {number}
@@ -176,7 +217,7 @@ cr.define('options', function() {
* @private
*/
setDataTypeCheckboxesEnabled_: function(enabled) {
- for (dataType in dataTypeBoxesDisabled_) {
+ for (var dataType in dataTypeBoxesDisabled_) {
$(dataType).disabled = !enabled || dataTypeBoxesDisabled_[dataType];
}
},
@@ -320,7 +361,7 @@ cr.define('options', function() {
* settings dialog. Also initializes |dataTypeBoxesChecked_| and
* |dataTypeBoxedDisabled_| with their values, and makes their onclick
* handlers update |dataTypeBoxesChecked_|.
- * @param {Object} args The configuration data used to show/hide UI.
+ * @param {SyncConfig} args The configuration data used to show/hide UI.
* @private
*/
setChooseDataTypesCheckboxes_: function(args) {
@@ -414,6 +455,9 @@ cr.define('options', function() {
['Options_SyncToggleDataType']);
},
+ /**
+ * @param {SyncConfig} args
+ */
setEncryptionRadios_: function(args) {
if (!args.encryptAllData && !args.usePassphrase) {
$('basic-encryption-option').checked = true;
@@ -424,11 +468,17 @@ cr.define('options', function() {
}
},
+ /**
+ * @param {SyncConfig} args
+ */
setCheckboxesAndErrors_: function(args) {
this.setChooseDataTypesCheckboxes_(args);
this.setEncryptionRadios_(args);
},
+ /**
+ * @param {SyncConfig} args
+ */
showConfigure_: function(args) {
var datatypeSelect = $('sync-select-datatypes');
var self = this;
@@ -564,7 +614,7 @@ cr.define('options', function() {
* Reveals the UI for entering a custom passphrase during initial setup.
* This happens if the user has previously enabled a custom passphrase on a
* different machine.
- * @param {Array} args The args that contain the passphrase UI
+ * @param {SyncConfig} args The args that contain the passphrase UI
* configuration.
* @private
*/
@@ -603,6 +653,7 @@ cr.define('options', function() {
/**
* Displays the advanced sync setting dialog, and pre-selects either the
* "Sync everything" or the "Choose what to sync" drop-down menu item.
+ * @param {SyncConfig} args
* @param {options.DataTypeSelection} index Index of item to pre-select.
* @private
*/
@@ -650,7 +701,7 @@ cr.define('options', function() {
/**
* Shows the appropriate sync setup page.
* @param {string} page A page of the sync setup to show.
- * @param {Object} args Data from the C++ to forward on to the right
+ * @param {SyncConfig} args Data from the C++ to forward on to the right
* section.
*/
showSyncSetupPage_: function(page, args) {
« no previous file with comments | « chrome/browser/resources/options/website_settings.js ('k') | ui/webui/resources/js/cr/ui/list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698