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

Unified Diff: chrome/browser/sync/protocol/proto_value_conversions.cc

Issue 7775008: Enable sync for the settings from the Extension Settings API. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Sync to tip. Latest comments. Created 9 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: chrome/browser/sync/protocol/proto_value_conversions.cc
diff --git a/chrome/browser/sync/protocol/proto_value_conversions.cc b/chrome/browser/sync/protocol/proto_value_conversions.cc
index 1ffd12352cf74f452343dcbd14ebcc95f92cf418..38e40eb50101cc4d777febd0e4630c35d98cc0f1 100644
--- a/chrome/browser/sync/protocol/proto_value_conversions.cc
+++ b/chrome/browser/sync/protocol/proto_value_conversions.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/sync/protocol/autofill_specifics.pb.h"
#include "chrome/browser/sync/protocol/bookmark_specifics.pb.h"
#include "chrome/browser/sync/protocol/encryption.pb.h"
+#include "chrome/browser/sync/protocol/extension_setting_specifics.pb.h"
#include "chrome/browser/sync/protocol/extension_specifics.pb.h"
#include "chrome/browser/sync/protocol/nigori_specifics.pb.h"
#include "chrome/browser/sync/protocol/password_specifics.pb.h"
@@ -213,6 +214,15 @@ DictionaryValue* BookmarkSpecificsToValue(
return value;
}
+DictionaryValue* ExtensionSettingSpecificsToValue(
+ const sync_pb::ExtensionSettingSpecifics& proto) {
+ DictionaryValue* value = new DictionaryValue();
+ SET_STR(extension_id);
+ SET_STR(key);
+ SET_STR(value);
+ return value;
+}
+
DictionaryValue* ExtensionSpecificsToValue(
const sync_pb::ExtensionSpecifics& proto) {
DictionaryValue* value = new DictionaryValue();
@@ -242,6 +252,7 @@ DictionaryValue* NigoriSpecificsToValue(
SET_BOOL(encrypt_search_engines);
SET_BOOL(sync_tabs);
SET_BOOL(encrypt_everything);
+ SET_BOOL(encrypt_extension_settings);
return value;
}
@@ -321,6 +332,7 @@ DictionaryValue* EntitySpecificsToValue(
SET_EXTENSION(sync_pb, autofill_profile, AutofillProfileSpecificsToValue);
SET_EXTENSION(sync_pb, bookmark, BookmarkSpecificsToValue);
SET_EXTENSION(sync_pb, extension, ExtensionSpecificsToValue);
+ SET_EXTENSION(sync_pb, extension_setting, ExtensionSettingSpecificsToValue);
SET_EXTENSION(sync_pb, nigori, NigoriSpecificsToValue);
SET_EXTENSION(sync_pb, password, PasswordSpecificsToValue);
SET_EXTENSION(sync_pb, preference, PreferenceSpecificsToValue);

Powered by Google App Engine
This is Rietveld 408576698