Index: components/sync/protocol/proto_value_conversions.cc |
diff --git a/components/sync/protocol/proto_value_conversions.cc b/components/sync/protocol/proto_value_conversions.cc |
index 1397db8c44cb38528c8e65f9794e899606cd3578..843ce9c7852c9aa79e7a0c6734c8626bd17f4b00 100644 |
--- a/components/sync/protocol/proto_value_conversions.cc |
+++ b/components/sync/protocol/proto_value_conversions.cc |
@@ -38,6 +38,7 @@ |
#include "components/sync/protocol/nigori_specifics.pb.h" |
#include "components/sync/protocol/password_specifics.pb.h" |
#include "components/sync/protocol/preference_specifics.pb.h" |
+#include "components/sync/protocol/printer_specifics.pb.h" |
#include "components/sync/protocol/priority_preference_specifics.pb.h" |
#include "components/sync/protocol/proto_enum_conversions.h" |
#include "components/sync/protocol/search_engine_specifics.pb.h" |
@@ -288,6 +289,17 @@ std::unique_ptr<base::DictionaryValue> ArcPackageSpecificsToValue( |
return value; |
} |
+std::unique_ptr<base::DictionaryValue> PrinterPPDDataToValue( |
+ const sync_pb::PrinterPPDData& proto) { |
+ std::unique_ptr<base::DictionaryValue> value = |
+ base::MakeUnique<base::DictionaryValue>(); |
+ SET_INT32(id); |
+ SET_STR(file_name); |
+ SET_INT64(version_number); |
+ SET_BOOL(from_quirks_server); |
+ return value; |
+} |
+ |
std::unique_ptr<base::DictionaryValue> AppNotificationToValue( |
const sync_pb::AppNotification& proto) { |
std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); |
@@ -626,6 +638,21 @@ std::unique_ptr<base::DictionaryValue> PreferenceSpecificsToValue( |
return value; |
} |
+std::unique_ptr<base::DictionaryValue> PrinterSpecificsToValue( |
+ const sync_pb::PrinterSpecifics& proto) { |
+ std::unique_ptr<base::DictionaryValue> value = |
+ base::MakeUnique<base::DictionaryValue>(); |
+ SET_STR(id); |
+ SET_STR(display_name); |
+ SET_STR(description); |
+ SET_STR(manufacturer); |
+ SET_STR(model); |
+ SET_STR(uri); |
+ SET_STR(uuid); |
+ SET(ppd, PrinterPPDDataToValue); |
+ return value; |
+} |
+ |
std::unique_ptr<base::DictionaryValue> PriorityPreferenceSpecificsToValue( |
const sync_pb::PriorityPreferenceSpecifics& specifics) { |
std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); |
@@ -777,6 +804,7 @@ std::unique_ptr<base::DictionaryValue> EntitySpecificsToValue( |
SET_FIELD(nigori, NigoriSpecificsToValue); |
SET_FIELD(password, PasswordSpecificsToValue); |
SET_FIELD(preference, PreferenceSpecificsToValue); |
+ SET_FIELD(printer, PrinterSpecificsToValue); |
SET_FIELD(priority_preference, PriorityPreferenceSpecificsToValue); |
SET_FIELD(search_engine, SearchEngineSpecificsToValue); |
SET_FIELD(session, SessionSpecificsToValue); |