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

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

Issue 14117004: [Sync] Add support for server-controlled favicon sync limit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add proto conversions Created 7 years, 8 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
« no previous file with comments | « sync/protocol/experiments_specifics.proto ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 return value; 325 return value;
326 } 326 }
327 327
328 base::DictionaryValue* DictionarySpecificsToValue( 328 base::DictionaryValue* DictionarySpecificsToValue(
329 const sync_pb::DictionarySpecifics& proto) { 329 const sync_pb::DictionarySpecifics& proto) {
330 base::DictionaryValue* value = new base::DictionaryValue(); 330 base::DictionaryValue* value = new base::DictionaryValue();
331 SET_STR(word); 331 SET_STR(word);
332 return value; 332 return value;
333 } 333 }
334 334
335 namespace {
336
337 DictionaryValue* FaviconSyncFlagsToValue(
338 const sync_pb::FaviconSyncFlags& proto) {
339 base::DictionaryValue* value = new base::DictionaryValue();
340 SET_BOOL(enabled);
341 SET_INT32(favicon_sync_limit);
342 return value;
343 }
344
345 }
346
335 base::DictionaryValue* ExperimentsSpecificsToValue( 347 base::DictionaryValue* ExperimentsSpecificsToValue(
336 const sync_pb::ExperimentsSpecifics& proto) { 348 const sync_pb::ExperimentsSpecifics& proto) {
337 base::DictionaryValue* value = new base::DictionaryValue(); 349 base::DictionaryValue* value = new base::DictionaryValue();
338 SET_EXPERIMENT_ENABLED_FIELD(keystore_encryption); 350 SET_EXPERIMENT_ENABLED_FIELD(keystore_encryption);
339 SET_EXPERIMENT_ENABLED_FIELD(history_delete_directives); 351 SET_EXPERIMENT_ENABLED_FIELD(history_delete_directives);
340 SET_EXPERIMENT_ENABLED_FIELD(autofill_culling); 352 SET_EXPERIMENT_ENABLED_FIELD(autofill_culling);
341 SET_EXPERIMENT_ENABLED_FIELD(favicon_sync); 353 if (proto.has_favicon_sync())
354 SET(favicon_sync, FaviconSyncFlagsToValue);
342 return value; 355 return value;
343 } 356 }
344 357
345 base::DictionaryValue* ExtensionSettingSpecificsToValue( 358 base::DictionaryValue* ExtensionSettingSpecificsToValue(
346 const sync_pb::ExtensionSettingSpecifics& proto) { 359 const sync_pb::ExtensionSettingSpecifics& proto) {
347 base::DictionaryValue* value = new base::DictionaryValue(); 360 base::DictionaryValue* value = new base::DictionaryValue();
348 SET_STR(extension_id); 361 SET_STR(extension_id);
349 SET_STR(key); 362 SET_STR(key);
350 SET_STR(value); 363 SET_STR(value);
351 return value; 364 return value;
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 #undef SET_BYTES 825 #undef SET_BYTES
813 #undef SET_INT32 826 #undef SET_INT32
814 #undef SET_INT64 827 #undef SET_INT64
815 #undef SET_INT64_REP 828 #undef SET_INT64_REP
816 #undef SET_STR 829 #undef SET_STR
817 #undef SET_STR_REP 830 #undef SET_STR_REP
818 831
819 #undef SET_FIELD 832 #undef SET_FIELD
820 833
821 } // namespace syncer 834 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/protocol/experiments_specifics.proto ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698