diff options
author | quiche <quiche@chromium.org> | 2014-12-19 19:57:53 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-20 03:58:47 +0000 |
commit | 271c6cca48a6cef32c0f3add3b17b700707deec5 (patch) | |
tree | e00a4bc679bf8a3dc6742f3acd55e03fc3cd999c /sync | |
parent | 7608f02ae8f93fb125b6fd4c4c6ff9ab46989349 (diff) | |
download | chromium_src-271c6cca48a6cef32c0f3add3b17b700707deec5.zip chromium_src-271c6cca48a6cef32c0f3add3b17b700707deec5.tar.gz chromium_src-271c6cca48a6cef32c0f3add3b17b700707deec5.tar.bz2 |
Add a new component for WiFi credential sync. Populate the
new component with a stub SyncableService, and its
corresponding factory. This SyncableService is plumbed
into sync iff "--enable-wifi-credential-sync" is present
in the command-line.
Also:
- add sync integration tests (single client, and two client)
- add WifiSecurityClass: an enum to provide an internal
representation of WiFi security classes (e.g. WEP, PSK).
- add WifiCredential: an abstraction of the parameters
required to find and connect to a WiFi network
- add conversions between ModelType and NotificationType,
for WIFI_CREDENTIALS
BUG=chromium:426693
BUG=chromium:426696
BUG=chromium:427595
TEST=sync_integration_tests --gtest_filter="*Wifi*"
TEST=components_unittests --gtest_filter="Wifi*"
Review URL: https://codereview.chromium.org/709683004
Cr-Commit-Position: refs/heads/master@{#309333}
Diffstat (limited to 'sync')
-rw-r--r-- | sync/syncable/model_type.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sync/syncable/model_type.cc b/sync/syncable/model_type.cc index 321d546..c7a4aa5 100644 --- a/sync/syncable/model_type.cc +++ b/sync/syncable/model_type.cc @@ -937,6 +937,7 @@ const char kSupervisedUserSharedSettingNotificationType[] = const char kSupervisedUserWhitelistNotificationType[] = "MANAGED_USER_WHITELIST"; const char kArticleNotificationType[] = "ARTICLE"; +const char kWifiCredentialNotificationType[] = "WIFI_CREDENTIAL"; } // namespace bool RealModelTypeToNotificationType(ModelType model_type, @@ -1032,6 +1033,9 @@ bool RealModelTypeToNotificationType(ModelType model_type, case ARTICLES: *notification_type = kArticleNotificationType; return true; + case WIFI_CREDENTIALS: + *notification_type = kWifiCredentialNotificationType; + return true; default: break; } @@ -1132,6 +1136,9 @@ bool NotificationTypeToRealModelType(const std::string& notification_type, } else if (notification_type == kArticleNotificationType) { *model_type = ARTICLES; return true; + } else if (notification_type == kWifiCredentialNotificationType) { + *model_type = WIFI_CREDENTIALS; + return true; } *model_type = UNSPECIFIED; return false; |