summaryrefslogtreecommitdiffstats
path: root/components/sync_driver
diff options
context:
space:
mode:
authorquiche <quiche@chromium.org>2014-10-30 14:32:38 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-30 21:32:56 +0000
commitdfad17b4d9648cfa189f36b8c156d7296582bcfa (patch)
tree4c62a752d6a98623edc79c121bf2de1119da6296 /components/sync_driver
parent00dc0d43eac8002ab5e1bc5fe44ce4119ce4aca4 (diff)
downloadchromium_src-dfad17b4d9648cfa189f36b8c156d7296582bcfa.zip
chromium_src-dfad17b4d9648cfa189f36b8c156d7296582bcfa.tar.gz
chromium_src-dfad17b4d9648cfa189f36b8c156d7296582bcfa.tar.bz2
sync: add WIFI_CREDENTIALS protobuf, ModelType, and preference
- add a protobuf for WiFi credentials - add a ModelType for syncing WiFi credentials - add UI for controlling whether or not WiFi credentials are synced - add new data type to testserver While there: - update comment in sync_setup_overlay.js - fix ordering of arguments to EXPECT_EQ in CheckBool (sync_setup_handler_unittest) - move GetSelectableTypeNameMap from sync_setup_handler.cc to model_type.cc BUG=chromium:422045 TEST=ProfileSync, SyncSetup, SyncModel, ModelType, NigoriUtil, ProtoEnumConversions, ProtoValueConversions, SyncEncryptionHandlerImpl Review URL: https://codereview.chromium.org/674633002 Cr-Commit-Position: refs/heads/master@{#302159}
Diffstat (limited to 'components/sync_driver')
-rw-r--r--components/sync_driver/model_association_manager.cc1
-rw-r--r--components/sync_driver/pref_names.cc1
-rw-r--r--components/sync_driver/pref_names.h1
-rw-r--r--components/sync_driver/sync_prefs.cc3
-rw-r--r--components/sync_driver/user_selectable_sync_type.h3
5 files changed, 8 insertions, 1 deletions
diff --git a/components/sync_driver/model_association_manager.cc b/components/sync_driver/model_association_manager.cc
index 6706c4c..426e6e3 100644
--- a/components/sync_driver/model_association_manager.cc
+++ b/components/sync_driver/model_association_manager.cc
@@ -57,6 +57,7 @@ static const syncer::ModelType kStartOrder[] = {
syncer::SUPERVISED_USER_SETTINGS,
syncer::SUPERVISED_USER_SHARED_SETTINGS,
syncer::ARTICLES,
+ syncer::WIFI_CREDENTIALS,
};
COMPILE_ASSERT(arraysize(kStartOrder) ==
diff --git a/components/sync_driver/pref_names.cc b/components/sync_driver/pref_names.cc
index 5ecf5c8..49f0fcd 100644
--- a/components/sync_driver/pref_names.cc
+++ b/components/sync_driver/pref_names.cc
@@ -60,6 +60,7 @@ const char kSyncSyncedNotifications[] = "sync.synced_notifications";
const char kSyncTabs[] = "sync.tabs";
const char kSyncThemes[] = "sync.themes";
const char kSyncTypedUrls[] = "sync.typed_urls";
+const char kSyncWifiCredentials[] = "sync.wifi_credentials";
// Boolean used by enterprise configuration management in order to lock down
// sync.
diff --git a/components/sync_driver/pref_names.h b/components/sync_driver/pref_names.h
index 54710fb..4cc7f81 100644
--- a/components/sync_driver/pref_names.h
+++ b/components/sync_driver/pref_names.h
@@ -46,6 +46,7 @@ extern const char kSyncSyncedNotifications[];
extern const char kSyncTabs[];
extern const char kSyncThemes[];
extern const char kSyncTypedUrls[];
+extern const char kSyncWifiCredentials[];
extern const char kSyncManaged[];
extern const char kSyncSuppressStart[];
diff --git a/components/sync_driver/sync_prefs.cc b/components/sync_driver/sync_prefs.cc
index cc7914d..5773f0f 100644
--- a/components/sync_driver/sync_prefs.cc
+++ b/components/sync_driver/sync_prefs.cc
@@ -137,6 +137,7 @@ void SyncPrefs::RegisterProfilePrefs(
model_set.Put(syncer::TYPED_URLS);
model_set.Put(syncer::SESSIONS);
model_set.Put(syncer::ARTICLES);
+ model_set.Put(syncer::WIFI_CREDENTIALS);
registry->RegisterListPref(prefs::kSyncAcknowledgedSyncTypes,
syncer::ModelTypeSetToValue(model_set),
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
@@ -343,6 +344,8 @@ const char* SyncPrefs::GetPrefNameForDataType(syncer::ModelType data_type) {
return prefs::kSyncSupervisedUserSharedSettings;
case syncer::DEVICE_INFO:
return prefs::kSyncDeviceInfo;
+ case syncer::WIFI_CREDENTIALS:
+ return prefs::kSyncWifiCredentials;
default:
break;
}
diff --git a/components/sync_driver/user_selectable_sync_type.h b/components/sync_driver/user_selectable_sync_type.h
index 59c1b18..42fd6e4 100644
--- a/components/sync_driver/user_selectable_sync_type.h
+++ b/components/sync_driver/user_selectable_sync_type.h
@@ -34,6 +34,7 @@ enum UserSelectableSyncType {
// TODO(petewil): There was talk of removing this from user selectable sync
// types. Should we?
SYNCED_NOTIFICATIONS = 9,
+ WIFI_CREDENTIAL = 10,
// The datatypes below are implicitly synced, and are not exposed via user
// selectable checkboxes.
@@ -57,7 +58,7 @@ enum UserSelectableSyncType {
// SYNCED_NOTIFICATION_APP_INFO
// Number of sync datatypes exposed to the user via checboxes in the UI.
- SELECTABLE_DATATYPE_COUNT = 10,
+ SELECTABLE_DATATYPE_COUNT = 11,
};
} // namespace user_selectable_type