Index: sync/protocol/proto_value_conversions.cc |
diff --git a/sync/protocol/proto_value_conversions.cc b/sync/protocol/proto_value_conversions.cc |
index bbd75e67d586532b33d6d7ee94c1179a2900bb95..bec0af0732c84b5ac3ff477c30fbce91d1e4f8f1 100644 |
--- a/sync/protocol/proto_value_conversions.cc |
+++ b/sync/protocol/proto_value_conversions.cc |
@@ -19,6 +19,7 @@ |
#include "sync/protocol/encryption.pb.h" |
#include "sync/protocol/extension_setting_specifics.pb.h" |
#include "sync/protocol/extension_specifics.pb.h" |
+#include "sync/protocol/history_delete_directive_specifics.pb.h" |
#include "sync/protocol/nigori_specifics.pb.h" |
#include "sync/protocol/password_specifics.pb.h" |
#include "sync/protocol/preference_specifics.pb.h" |
@@ -202,6 +203,28 @@ DictionaryValue* DeviceInfoSpecificsToValue( |
return value; |
} |
+base::DictionaryValue* GlobalIdDirectiveToValue( |
+ const sync_pb::GlobalIdDirective& proto) { |
+ DictionaryValue* value = new DictionaryValue(); |
+ SET_INT64_REP(global_id); |
+ return value; |
+} |
+ |
+base::DictionaryValue* TimeRangeDirectiveToValue( |
+ const sync_pb::TimeRangeDirective& proto) { |
+ DictionaryValue* value = new DictionaryValue(); |
+ SET_INT64(start_time_usec); |
+ SET_INT64(end_time_usec); |
+ return value; |
+} |
+ |
+base::DictionaryValue* EverythingDirectiveToValue( |
+ const sync_pb::EverythingDirective& proto) { |
+ DictionaryValue* value = new DictionaryValue(); |
+ SET_BOOL(delete_everything); |
+ return value; |
+} |
+ |
DictionaryValue* AppNotificationToValue( |
const sync_pb::AppNotification& proto) { |
DictionaryValue* value = new DictionaryValue(); |
@@ -297,6 +320,15 @@ DictionaryValue* ExtensionSpecificsToValue( |
return value; |
} |
+base::DictionaryValue* HistoryDeleteDirectiveSpecificsToValue( |
+ const sync_pb::HistoryDeleteDirectiveSpecifics& proto) { |
+ DictionaryValue* value = new DictionaryValue(); |
+ SET(global_id_directive, GlobalIdDirectiveToValue); |
+ SET(time_range_directive, TimeRangeDirectiveToValue); |
+ SET(everything_directive, EverythingDirectiveToValue); |
+ return value; |
+} |
+ |
DictionaryValue* NigoriSpecificsToValue( |
const sync_pb::NigoriSpecifics& proto) { |
DictionaryValue* value = new DictionaryValue(); |
@@ -404,6 +436,7 @@ DictionaryValue* EntitySpecificsToValue( |
SET_FIELD(device_info, DeviceInfoSpecificsToValue); |
SET_FIELD(extension, ExtensionSpecificsToValue); |
SET_FIELD(extension_setting, ExtensionSettingSpecificsToValue); |
+ SET_FIELD(history_delete_directive, HistoryDeleteDirectiveSpecificsToValue); |
SET_FIELD(nigori, NigoriSpecificsToValue); |
SET_FIELD(password, PasswordSpecificsToValue); |
SET_FIELD(preference, PreferenceSpecificsToValue); |