| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |