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

Side by Side Diff: chrome/browser/sync/glue/favicon_cache.cc

Issue 15701022: [Sync] Add support for sync Persistence Errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move bookmark change into separate patch Created 7 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "chrome/browser/sync/glue/favicon_cache.h" 5 #include "chrome/browser/sync/glue/favicon_cache.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "chrome/browser/favicon/favicon_service.h" 9 #include "chrome/browser/favicon/favicon_service.h"
10 #include "chrome/browser/favicon/favicon_service_factory.h" 10 #include "chrome/browser/favicon/favicon_service_factory.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 } 319 }
320 return data_list; 320 return data_list;
321 } 321 }
322 322
323 syncer::SyncError FaviconCache::ProcessSyncChanges( 323 syncer::SyncError FaviconCache::ProcessSyncChanges(
324 const tracked_objects::Location& from_here, 324 const tracked_objects::Location& from_here,
325 const syncer::SyncChangeList& change_list) { 325 const syncer::SyncChangeList& change_list) {
326 if (!favicon_images_sync_processor_.get() || 326 if (!favicon_images_sync_processor_.get() ||
327 !favicon_tracking_sync_processor_.get()) { 327 !favicon_tracking_sync_processor_.get()) {
328 return syncer::SyncError(FROM_HERE, 328 return syncer::SyncError(FROM_HERE,
329 syncer::SyncError::DATATYPE_ERROR,
329 "One or both favicon types disabled.", 330 "One or both favicon types disabled.",
330 change_list[0].sync_data().GetDataType()); 331 change_list[0].sync_data().GetDataType());
331 } 332 }
332 333
333 syncer::SyncChangeList new_changes; 334 syncer::SyncChangeList new_changes;
334 syncer::SyncError error; 335 syncer::SyncError error;
335 syncer::ModelType type = syncer::UNSPECIFIED; 336 syncer::ModelType type = syncer::UNSPECIFIED;
336 for (syncer::SyncChangeList::const_iterator iter = change_list.begin(); 337 for (syncer::SyncChangeList::const_iterator iter = change_list.begin();
337 iter != change_list.end(); ++iter) { 338 iter != change_list.end(); ++iter) {
338 type = iter->sync_data().GetDataType(); 339 type = iter->sync_data().GetDataType();
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 1021
1021 size_t FaviconCache::NumFaviconsForTest() const { 1022 size_t FaviconCache::NumFaviconsForTest() const {
1022 return synced_favicons_.size(); 1023 return synced_favicons_.size();
1023 } 1024 }
1024 1025
1025 size_t FaviconCache::NumTasksForTest() const { 1026 size_t FaviconCache::NumTasksForTest() const {
1026 return page_task_map_.size(); 1027 return page_task_map_.size();
1027 } 1028 }
1028 1029
1029 } // namespace browser_sync 1030 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/fake_data_type_controller.cc ('k') | chrome/browser/sync/glue/favicon_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698