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

Unified Diff: components/sync/syncable/nigori_util.cc

Issue 2306763002: Add PrinterSpecifics to the sync protos. (Closed)
Patch Set: add comments to proto Created 4 years, 3 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: components/sync/syncable/nigori_util.cc
diff --git a/components/sync/syncable/nigori_util.cc b/components/sync/syncable/nigori_util.cc
index 791b518fcac0cc59c94960d235feb55e92fe09e3..16f6afc4827ea582b8a327a6bff94c209bb43ac2 100644
--- a/components/sync/syncable/nigori_util.cc
+++ b/components/sync/syncable/nigori_util.cc
@@ -7,6 +7,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <memory>
#include <queue>
#include <string>
#include <vector>
@@ -245,7 +246,7 @@ void UpdateNigoriFromEncryptedTypes(ModelTypeSet encrypted_types,
bool encrypt_everything,
sync_pb::NigoriSpecifics* nigori) {
nigori->set_encrypt_everything(encrypt_everything);
- static_assert(37 == MODEL_TYPE_COUNT, "update encrypted types");
+ static_assert(38 == MODEL_TYPE_COUNT, "update encrypted types");
nigori->set_encrypt_bookmarks(encrypted_types.Has(BOOKMARKS));
nigori->set_encrypt_preferences(encrypted_types.Has(PREFERENCES));
nigori->set_encrypt_autofill_profile(encrypted_types.Has(AUTOFILL_PROFILE));
@@ -268,6 +269,7 @@ void UpdateNigoriFromEncryptedTypes(ModelTypeSet encrypted_types,
nigori->set_encrypt_articles(encrypted_types.Has(ARTICLES));
nigori->set_encrypt_app_list(encrypted_types.Has(APP_LIST));
nigori->set_encrypt_arc_package(encrypted_types.Has(ARC_PACKAGE));
+ nigori->set_encrypt_printers(encrypted_types.Has(PRINTERS));
}
ModelTypeSet GetEncryptedTypesFromNigori(
@@ -276,7 +278,7 @@ ModelTypeSet GetEncryptedTypesFromNigori(
return ModelTypeSet::All();
ModelTypeSet encrypted_types;
- static_assert(37 == MODEL_TYPE_COUNT, "update encrypted types");
+ static_assert(38 == MODEL_TYPE_COUNT, "update encrypted types");
if (nigori.encrypt_bookmarks())
encrypted_types.Put(BOOKMARKS);
if (nigori.encrypt_preferences())
@@ -317,6 +319,8 @@ ModelTypeSet GetEncryptedTypesFromNigori(
encrypted_types.Put(APP_LIST);
if (nigori.encrypt_arc_package())
encrypted_types.Put(ARC_PACKAGE);
+ if (nigori.encrypt_printers())
+ encrypted_types.Put(PRINTERS);
return encrypted_types;
}

Powered by Google App Engine
This is Rietveld 408576698