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

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

Issue 674633002: sync: add WIFI_CREDENTIALS protobuf, ModelType, and preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@local-master
Patch Set: fix error in get commit message Created 6 years, 2 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/sync_setup_overlay.html ('k') | chrome/browser/sync/profile_sync_service.cc » ('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 976d7a3da060ac99857e950d7c78fd846cc31c87..ca326f2cf35ef067af99b671354840791ad4aa7f 100644
--- a/chrome/browser/resources/sync_setup_overlay.js
+++ b/chrome/browser/resources/sync_setup_overlay.js
@@ -306,7 +306,7 @@ cr.define('options', function() {
$('use-default-link').onclick = null;
// These values need to be kept in sync with where they are read in
- // SyncSetupFlow::GetDataTypeChoiceData().
+ // sync_setup_handler.cc:GetConfiguration().
var syncAll = $('sync-select-datatypes').selectedIndex ==
options.DataTypeSelection.SYNC_EVERYTHING;
var syncNothing = $('sync-select-datatypes').selectedIndex ==
@@ -323,6 +323,8 @@ cr.define('options', function() {
'typedUrlsSynced': syncAll || $('typed-urls-checkbox').checked,
'appsSynced': syncAll || $('apps-checkbox').checked,
'tabsSynced': syncAll || $('tabs-checkbox').checked,
+ 'wifiCredentialsSynced': syncAll ||
+ $('wifi-credentials-checkbox').checked,
'encryptAllData': encryptAllData,
'usePassphrase': usePassphrase,
'isGooglePassphrase': googlePassphrase,
@@ -439,6 +441,17 @@ cr.define('options', function() {
} else {
$('tabs-item').hidden = true;
}
+ if (args.wifiCredentialsRegistered) {
+ $('wifi-credentials-checkbox').checked = args.wifiCredentialsSynced;
+ dataTypeBoxesChecked_['wifi-credentials-checkbox'] =
+ args.wifiCredentialsSynced;
+ dataTypeBoxesDisabled_['wifi-credentials-checkbox'] =
+ args.wifiCredentialsEnforced;
+ $('wifi-credentials-checkbox').onclick = this.handleDataTypeClick_;
+ $('wifi-credentials-item').hidden = false;
+ } else {
+ $('wifi-credentials-item').hidden = true;
+ }
this.setDataTypeCheckboxes_(datatypeSelect.selectedIndex);
},
« no previous file with comments | « chrome/browser/resources/sync_setup_overlay.html ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698