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

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

Issue 839193002: Move ServiceAccessType into //components/keyed_service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on android Created 5 years, 11 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 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/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/favicon/favicon_service.h" 10 #include "chrome/browser/favicon/favicon_service.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 return; 427 return;
428 } 428 }
429 } 429 }
430 430
431 DVLOG(1) << "Triggering favicon load for url " << page_url.spec(); 431 DVLOG(1) << "Triggering favicon load for url " << page_url.spec();
432 432
433 if (!profile_) { 433 if (!profile_) {
434 page_task_map_[page_url] = 0; // For testing only. 434 page_task_map_[page_url] = 0; // For testing only.
435 return; 435 return;
436 } 436 }
437 FaviconService* favicon_service = 437 FaviconService* favicon_service = FaviconServiceFactory::GetForProfile(
438 FaviconServiceFactory::GetForProfile(profile_, Profile::EXPLICIT_ACCESS); 438 profile_, ServiceAccessType::EXPLICIT_ACCESS);
439 if (!favicon_service) 439 if (!favicon_service)
440 return; 440 return;
441 // TODO(zea): This appears to only fetch one favicon (best match based on 441 // TODO(zea): This appears to only fetch one favicon (best match based on
442 // desired_size_in_dip). Figure out a way to fetch all favicons we support. 442 // desired_size_in_dip). Figure out a way to fetch all favicons we support.
443 // See crbug.com/181068. 443 // See crbug.com/181068.
444 base::CancelableTaskTracker::TaskId id = 444 base::CancelableTaskTracker::TaskId id =
445 favicon_service->GetFaviconForPageURL( 445 favicon_service->GetFaviconForPageURL(
446 page_url, 446 page_url,
447 SupportedFaviconTypes(), 447 SupportedFaviconTypes(),
448 kMaxFaviconResolution, 448 kMaxFaviconResolution,
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 1059
1060 size_t FaviconCache::NumFaviconsForTest() const { 1060 size_t FaviconCache::NumFaviconsForTest() const {
1061 return synced_favicons_.size(); 1061 return synced_favicons_.size();
1062 } 1062 }
1063 1063
1064 size_t FaviconCache::NumTasksForTest() const { 1064 size_t FaviconCache::NumTasksForTest() const {
1065 return page_task_map_.size(); 1065 return page_task_map_.size();
1066 } 1066 }
1067 1067
1068 } // namespace browser_sync 1068 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/bookmark_data_type_controller.cc ('k') | chrome/browser/sync/glue/password_data_type_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698