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

Unified Diff: sync/protocol/proto_value_conversions.cc

Issue 674633002: sync: add WIFI_CREDENTIALS protobuf, ModelType, and preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@local-master
Patch Set: 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
Index: sync/protocol/proto_value_conversions.cc
diff --git a/sync/protocol/proto_value_conversions.cc b/sync/protocol/proto_value_conversions.cc
index e25bd0140acee2db3ea1ab7ac56602a8a8a2798a..612e234dd526b3732c27e3c32da6dff9d844fe48 100644
--- a/sync/protocol/proto_value_conversions.cc
+++ b/sync/protocol/proto_value_conversions.cc
@@ -858,6 +858,15 @@ base::DictionaryValue* TypedUrlSpecificsToValue(
return value;
}
+base::DictionaryValue* WifiCredentialSpecificsToValue(
+ const sync_pb::WifiCredentialSpecifics& proto) {
+ base::DictionaryValue* value = new base::DictionaryValue();
+ SET_BYTES(ssid);
+ SET_ENUM(security_class, GetWifiCredentialSecurityClassString);
+ SET_BYTES(passphrase);
+ return value;
+}
+
base::DictionaryValue* EntitySpecificsToValue(
const sync_pb::EntitySpecifics& specifics) {
base::DictionaryValue* value = new base::DictionaryValue();
@@ -893,6 +902,7 @@ base::DictionaryValue* EntitySpecificsToValue(
SyncedNotificationAppInfoSpecificsToValue);
SET_FIELD(theme, ThemeSpecificsToValue);
SET_FIELD(typed_url, TypedUrlSpecificsToValue);
+ SET_FIELD(wifi_credential, WifiCredentialSpecificsToValue);
return value;
}

Powered by Google App Engine
This is Rietveld 408576698