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

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

Issue 10825137: FYI: Control Data + Per-Device Metadata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add PER_USER_METADATA, refactor some encryption code Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "sync/protocol/proto_value_conversions.h" 7 #include "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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 SET_BOOL(encrypt_autofill); 301 SET_BOOL(encrypt_autofill);
302 SET_BOOL(encrypt_themes); 302 SET_BOOL(encrypt_themes);
303 SET_BOOL(encrypt_typed_urls); 303 SET_BOOL(encrypt_typed_urls);
304 SET_BOOL(encrypt_extension_settings); 304 SET_BOOL(encrypt_extension_settings);
305 SET_BOOL(encrypt_extensions); 305 SET_BOOL(encrypt_extensions);
306 SET_BOOL(encrypt_sessions); 306 SET_BOOL(encrypt_sessions);
307 SET_BOOL(encrypt_app_settings); 307 SET_BOOL(encrypt_app_settings);
308 SET_BOOL(encrypt_apps); 308 SET_BOOL(encrypt_apps);
309 SET_BOOL(encrypt_search_engines); 309 SET_BOOL(encrypt_search_engines);
310 SET_BOOL(encrypt_everything); 310 SET_BOOL(encrypt_everything);
311 SET_REP(device_information, DeviceInformationToValue);
312 SET_BOOL(sync_tab_favicons); 311 SET_BOOL(sync_tab_favicons);
313 return value; 312 return value;
314 } 313 }
315 314
316 DictionaryValue* PasswordSpecificsToValue( 315 DictionaryValue* PasswordSpecificsToValue(
317 const sync_pb::PasswordSpecifics& proto) { 316 const sync_pb::PasswordSpecifics& proto) {
318 DictionaryValue* value = new DictionaryValue(); 317 DictionaryValue* value = new DictionaryValue();
319 SET(encrypted, EncryptedDataToValue); 318 SET(encrypted, EncryptedDataToValue);
320 return value; 319 return value;
321 } 320 }
322 321
322 DictionaryValue* PerDeviceSpecificsToValue(
323 const sync_pb::PerDeviceSpecifics& proto) {
324 DictionaryValue* value = new DictionaryValue();
325 SET(device_information, DeviceInformationToValue);
326 return value;
327 }
328
329 DictionaryValue* PerUserSpecificsToValue(
330 const sync_pb::PerUserSpecifics& proto) {
331 DictionaryValue* value = new DictionaryValue();
332 return value;
333 }
334
323 DictionaryValue* PreferenceSpecificsToValue( 335 DictionaryValue* PreferenceSpecificsToValue(
324 const sync_pb::PreferenceSpecifics& proto) { 336 const sync_pb::PreferenceSpecifics& proto) {
325 DictionaryValue* value = new DictionaryValue(); 337 DictionaryValue* value = new DictionaryValue();
326 SET_STR(name); 338 SET_STR(name);
327 SET_STR(value); 339 SET_STR(value);
328 return value; 340 return value;
329 } 341 }
330 342
331 DictionaryValue* SearchEngineSpecificsToValue( 343 DictionaryValue* SearchEngineSpecificsToValue(
332 const sync_pb::SearchEngineSpecifics& proto) { 344 const sync_pb::SearchEngineSpecifics& proto) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 SET_FIELD(app, AppSpecificsToValue); 399 SET_FIELD(app, AppSpecificsToValue);
388 SET_FIELD(app_notification, AppNotificationToValue); 400 SET_FIELD(app_notification, AppNotificationToValue);
389 SET_FIELD(app_setting, AppSettingSpecificsToValue); 401 SET_FIELD(app_setting, AppSettingSpecificsToValue);
390 SET_FIELD(autofill, AutofillSpecificsToValue); 402 SET_FIELD(autofill, AutofillSpecificsToValue);
391 SET_FIELD(autofill_profile, AutofillProfileSpecificsToValue); 403 SET_FIELD(autofill_profile, AutofillProfileSpecificsToValue);
392 SET_FIELD(bookmark, BookmarkSpecificsToValue); 404 SET_FIELD(bookmark, BookmarkSpecificsToValue);
393 SET_FIELD(extension, ExtensionSpecificsToValue); 405 SET_FIELD(extension, ExtensionSpecificsToValue);
394 SET_FIELD(extension_setting, ExtensionSettingSpecificsToValue); 406 SET_FIELD(extension_setting, ExtensionSettingSpecificsToValue);
395 SET_FIELD(nigori, NigoriSpecificsToValue); 407 SET_FIELD(nigori, NigoriSpecificsToValue);
396 SET_FIELD(password, PasswordSpecificsToValue); 408 SET_FIELD(password, PasswordSpecificsToValue);
409 SET_FIELD(per_device_metadata, PerDeviceSpecificsToValue);
410 SET_FIELD(per_user_metadata, PerUserSpecificsToValue);
397 SET_FIELD(preference, PreferenceSpecificsToValue); 411 SET_FIELD(preference, PreferenceSpecificsToValue);
398 SET_FIELD(search_engine, SearchEngineSpecificsToValue); 412 SET_FIELD(search_engine, SearchEngineSpecificsToValue);
399 SET_FIELD(session, SessionSpecificsToValue); 413 SET_FIELD(session, SessionSpecificsToValue);
400 SET_FIELD(theme, ThemeSpecificsToValue); 414 SET_FIELD(theme, ThemeSpecificsToValue);
401 SET_FIELD(typed_url, TypedUrlSpecificsToValue); 415 SET_FIELD(typed_url, TypedUrlSpecificsToValue);
402 return value; 416 return value;
403 } 417 }
404 418
405 namespace { 419 namespace {
406 420
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 #undef SET_BYTES 601 #undef SET_BYTES
588 #undef SET_INT32 602 #undef SET_INT32
589 #undef SET_INT64 603 #undef SET_INT64
590 #undef SET_INT64_REP 604 #undef SET_INT64_REP
591 #undef SET_STR 605 #undef SET_STR
592 #undef SET_STR_REP 606 #undef SET_STR_REP
593 607
594 #undef SET_FIELD 608 #undef SET_FIELD
595 609
596 } // namespace syncer 610 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698