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

Unified Diff: sync/protocol/proto_value_conversions.cc

Issue 10855037: [Sync] Add history delete directive type (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 8 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
« no previous file with comments | « sync/protocol/proto_value_conversions.h ('k') | sync/protocol/proto_value_conversions_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/protocol/proto_value_conversions.cc
diff --git a/sync/protocol/proto_value_conversions.cc b/sync/protocol/proto_value_conversions.cc
index 79deafa759642943916301cfe0edbdff9629cd6b..9408346db34bffe4d1de7b393b8c5cda315e947a 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"
@@ -206,6 +207,21 @@ 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;
+}
+
DictionaryValue* AppNotificationToValue(
const sync_pb::AppNotification& proto) {
DictionaryValue* value = new DictionaryValue();
@@ -301,6 +317,14 @@ 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);
+ return value;
+}
+
DictionaryValue* NigoriSpecificsToValue(
const sync_pb::NigoriSpecifics& proto) {
DictionaryValue* value = new DictionaryValue();
@@ -408,6 +432,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);
« no previous file with comments | « sync/protocol/proto_value_conversions.h ('k') | sync/protocol/proto_value_conversions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698