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

Unified Diff: sync/syncable/model_type.cc

Issue 12033093: sync: Implementation of Priority Preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 7 years, 9 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.cc ('k') | sync/tools/testserver/chromiumsync.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/model_type.cc
diff --git a/sync/syncable/model_type.cc b/sync/syncable/model_type.cc
index 37bdd361ac3abd2d86053cd7ca59cd08688cf9c9..31120a78e71391ee14e86bf31147626ce1dc14b1 100644
--- a/sync/syncable/model_type.cc
+++ b/sync/syncable/model_type.cc
@@ -353,6 +353,9 @@ ModelTypeSet EncryptableUserTypes() {
encryptable_user_types.Remove(HISTORY_DELETE_DIRECTIVES);
// Synced notifications are not encrypted since the server must see changes.
encryptable_user_types.Remove(SYNCED_NOTIFICATIONS);
+ // Priority preferences are not encrypted because they might be synced before
+ // encryption is ready.
+ encryptable_user_types.RemoveAll(PriorityUserTypes());
// Proxy types have no sync representation and are therefore not encrypted.
// Note however that proxy types map to one or more protocol types, which
// may or may not be encrypted themselves.
@@ -360,6 +363,10 @@ ModelTypeSet EncryptableUserTypes() {
return encryptable_user_types;
}
+ModelTypeSet PriorityUserTypes() {
+ return ModelTypeSet(PRIORITY_PREFERENCES);
+}
+
ModelTypeSet ControlTypes() {
ModelTypeSet set;
// TODO(sync): We should be able to build the actual enumset's internal
@@ -369,9 +376,6 @@ ModelTypeSet ControlTypes() {
set.Put(ModelTypeFromInt(i));
}
- // TODO(albertb): Re-enable this when the server supports it.
- set.Remove(PRIORITY_PREFERENCES);
-
return set;
}
« no previous file with comments | « sync/protocol/proto_value_conversions.cc ('k') | sync/tools/testserver/chromiumsync.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698