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

Side by Side Diff: chrome/browser/sync/glue/favicon_cache.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 | « no previous file | chrome/browser/sync/glue/session_model_associator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 FaviconCacheObserver::~FaviconCacheObserver() {} 218 FaviconCacheObserver::~FaviconCacheObserver() {}
219 219
220 FaviconCache::FaviconCache(Profile* profile, int max_sync_favicon_limit) 220 FaviconCache::FaviconCache(Profile* profile, int max_sync_favicon_limit)
221 : profile_(profile), 221 : profile_(profile),
222 weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), 222 weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
223 legacy_delegate_(NULL), 223 legacy_delegate_(NULL),
224 max_sync_favicon_limit_(max_sync_favicon_limit) { 224 max_sync_favicon_limit_(max_sync_favicon_limit) {
225 notification_registrar_.Add(this, 225 notification_registrar_.Add(this,
226 chrome::NOTIFICATION_HISTORY_URLS_DELETED, 226 chrome::NOTIFICATION_HISTORY_URLS_DELETED,
227 content::Source<Profile>(profile_)); 227 content::Source<Profile>(profile_));
228 DVLOG(1) << "Setting favicon limit to " << max_sync_favicon_limit;
228 } 229 }
229 230
230 FaviconCache::~FaviconCache() {} 231 FaviconCache::~FaviconCache() {}
231 232
232 syncer::SyncMergeResult FaviconCache::MergeDataAndStartSyncing( 233 syncer::SyncMergeResult FaviconCache::MergeDataAndStartSyncing(
233 syncer::ModelType type, 234 syncer::ModelType type,
234 const syncer::SyncDataList& initial_sync_data, 235 const syncer::SyncDataList& initial_sync_data,
235 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, 236 scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
236 scoped_ptr<syncer::SyncErrorFactory> error_handler) { 237 scoped_ptr<syncer::SyncErrorFactory> error_handler) {
237 DCHECK(type == syncer::FAVICON_IMAGES || type == syncer::FAVICON_TRACKING); 238 DCHECK(type == syncer::FAVICON_IMAGES || type == syncer::FAVICON_TRACKING);
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 989
989 size_t FaviconCache::NumFaviconsForTest() const { 990 size_t FaviconCache::NumFaviconsForTest() const {
990 return synced_favicons_.size(); 991 return synced_favicons_.size();
991 } 992 }
992 993
993 size_t FaviconCache::NumTasksForTest() const { 994 size_t FaviconCache::NumTasksForTest() const {
994 return page_task_map_.size(); 995 return page_task_map_.size();
995 } 996 }
996 997
997 } // namespace browser_sync 998 } // namespace browser_sync
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/glue/session_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698