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

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

Issue 1066623008: Sync bookmark app icon urls and sizes, and download icons for new apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated sync value conversions Created 5 years, 7 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
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 <string> 9 #include <string>
10 10
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 return value; 291 return value;
292 } 292 }
293 293
294 base::DictionaryValue* AppSettingSpecificsToValue( 294 base::DictionaryValue* AppSettingSpecificsToValue(
295 const sync_pb::AppSettingSpecifics& proto) { 295 const sync_pb::AppSettingSpecifics& proto) {
296 base::DictionaryValue* value = new base::DictionaryValue(); 296 base::DictionaryValue* value = new base::DictionaryValue();
297 SET(extension_setting, ExtensionSettingSpecificsToValue); 297 SET(extension_setting, ExtensionSettingSpecificsToValue);
298 return value; 298 return value;
299 } 299 }
300 300
301 base::DictionaryValue* LinkedAppIconInfoToValue(
302 const sync_pb::LinkedAppIconInfo& proto) {
303 base::DictionaryValue* value = new base::DictionaryValue();
304 SET_STR(url);
305 SET_INT32(size);
306 return value;
307 }
308
301 base::DictionaryValue* AppSpecificsToValue( 309 base::DictionaryValue* AppSpecificsToValue(
302 const sync_pb::AppSpecifics& proto) { 310 const sync_pb::AppSpecifics& proto) {
303 base::DictionaryValue* value = new base::DictionaryValue(); 311 base::DictionaryValue* value = new base::DictionaryValue();
304 SET(extension, ExtensionSpecificsToValue); 312 SET(extension, ExtensionSpecificsToValue);
305 SET(notification_settings, AppSettingsToValue); 313 SET(notification_settings, AppSettingsToValue);
306 SET_STR(app_launch_ordinal); 314 SET_STR(app_launch_ordinal);
307 SET_STR(page_ordinal); 315 SET_STR(page_ordinal);
308 SET_ENUM(launch_type, GetLaunchTypeString); 316 SET_ENUM(launch_type, GetLaunchTypeString);
309 SET_STR(bookmark_app_url); 317 SET_STR(bookmark_app_url);
310 SET_STR(bookmark_app_description); 318 SET_STR(bookmark_app_description);
319 SET_STR(bookmark_app_icon_color);
320 SET_REP(linked_app_icons, LinkedAppIconInfoToValue);
311 321
312 return value; 322 return value;
313 } 323 }
314 324
315 base::DictionaryValue* AutofillSpecificsToValue( 325 base::DictionaryValue* AutofillSpecificsToValue(
316 const sync_pb::AutofillSpecifics& proto) { 326 const sync_pb::AutofillSpecifics& proto) {
317 base::DictionaryValue* value = new base::DictionaryValue(); 327 base::DictionaryValue* value = new base::DictionaryValue();
318 SET_STR(name); 328 SET_STR(name);
319 SET_STR(value); 329 SET_STR(value);
320 SET_INT64_REP(usage_timestamp); 330 SET_INT64_REP(usage_timestamp);
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 #undef SET_BYTES 1069 #undef SET_BYTES
1060 #undef SET_INT32 1070 #undef SET_INT32
1061 #undef SET_INT64 1071 #undef SET_INT64
1062 #undef SET_INT64_REP 1072 #undef SET_INT64_REP
1063 #undef SET_STR 1073 #undef SET_STR
1064 #undef SET_STR_REP 1074 #undef SET_STR_REP
1065 1075
1066 #undef SET_FIELD 1076 #undef SET_FIELD
1067 1077
1068 } // namespace syncer 1078 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/protocol/proto_value_conversions.h ('k') | sync/protocol/proto_value_conversions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698