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

Side by Side Diff: chrome/browser/sync/protocol/proto_value_conversions.cc

Issue 8399022: Add a couple of notifications related settings to app/extensions sync: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Keep this file in sync with the .proto files in this directory. 5 // Keep this file in sync with the .proto files in this directory.
6 6
7 #include "chrome/browser/sync/protocol/proto_value_conversions.h" 7 #include "chrome/browser/sync/protocol/proto_value_conversions.h"
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // of this file, too. 95 // of this file, too.
96 96
97 DictionaryValue* EncryptedDataToValue(const sync_pb::EncryptedData& proto) { 97 DictionaryValue* EncryptedDataToValue(const sync_pb::EncryptedData& proto) {
98 DictionaryValue* value = new DictionaryValue(); 98 DictionaryValue* value = new DictionaryValue();
99 SET_STR(key_name); 99 SET_STR(key_name);
100 // TODO(akalin): Shouldn't blob be of type bytes instead of string? 100 // TODO(akalin): Shouldn't blob be of type bytes instead of string?
101 SET_BYTES(blob); 101 SET_BYTES(blob);
102 return value; 102 return value;
103 } 103 }
104 104
105 DictionaryValue* AppSettingsToValue(
106 const sync_pb::AppNotificationSettings& proto) {
107 DictionaryValue* value = new DictionaryValue();
108 SET_BOOL(initial_setup_done);
109 SET_BOOL(disabled);
110 return value;
111 }
112
105 DictionaryValue* SessionHeaderToValue( 113 DictionaryValue* SessionHeaderToValue(
106 const sync_pb::SessionHeader& proto) { 114 const sync_pb::SessionHeader& proto) {
107 DictionaryValue* value = new DictionaryValue(); 115 DictionaryValue* value = new DictionaryValue();
108 SET_REP(window, SessionWindowToValue); 116 SET_REP(window, SessionWindowToValue);
109 SET_STR(client_name); 117 SET_STR(client_name);
110 SET_ENUM(device_type, GetDeviceTypeString); 118 SET_ENUM(device_type, GetDeviceTypeString);
111 return value; 119 return value;
112 } 120 }
113 121
114 DictionaryValue* SessionTabToValue( 122 DictionaryValue* SessionTabToValue(
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 SET_STR(body_text); 183 SET_STR(body_text);
176 SET_STR(link_url); 184 SET_STR(link_url);
177 SET_STR(link_text); 185 SET_STR(link_text);
178 return value; 186 return value;
179 } 187 }
180 188
181 DictionaryValue* AppSpecificsToValue( 189 DictionaryValue* AppSpecificsToValue(
182 const sync_pb::AppSpecifics& proto) { 190 const sync_pb::AppSpecifics& proto) {
183 DictionaryValue* value = new DictionaryValue(); 191 DictionaryValue* value = new DictionaryValue();
184 SET(extension, ExtensionSpecificsToValue); 192 SET(extension, ExtensionSpecificsToValue);
193 SET(notification_settings, AppSettingsToValue);
185 return value; 194 return value;
186 } 195 }
187 196
188 DictionaryValue* AutofillSpecificsToValue( 197 DictionaryValue* AutofillSpecificsToValue(
189 const sync_pb::AutofillSpecifics& proto) { 198 const sync_pb::AutofillSpecifics& proto) {
190 DictionaryValue* value = new DictionaryValue(); 199 DictionaryValue* value = new DictionaryValue();
191 SET_STR(name); 200 SET_STR(name);
192 SET_STR(value); 201 SET_STR(value);
193 SET_INT64_REP(usage_timestamp); 202 SET_INT64_REP(usage_timestamp);
194 SET(profile, AutofillProfileSpecificsToValue); 203 SET(profile, AutofillProfileSpecificsToValue);
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 #undef SET_BOOL 372 #undef SET_BOOL
364 #undef SET_BYTES 373 #undef SET_BYTES
365 #undef SET_INT32 374 #undef SET_INT32
366 #undef SET_INT64 375 #undef SET_INT64
367 #undef SET_INT64_REP 376 #undef SET_INT64_REP
368 #undef SET_STR 377 #undef SET_STR
369 378
370 #undef SET_EXTENSION 379 #undef SET_EXTENSION
371 380
372 } // namespace browser_sync 381 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698