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

Side by Side Diff: chrome/browser/favicon/favicon_service_factory.cc

Issue 983043003: Componentize FaviconService and FaviconHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@favicon_service
Patch Set: Fix android_aosp (reverted the change by mistake by switching computer) Created 5 years, 9 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
« no previous file with comments | « chrome/browser/favicon/favicon_service.cc ('k') | chrome/browser/favicon/favicon_tab_helper.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 (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 #include "chrome/browser/favicon/favicon_service_factory.h" 5 #include "chrome/browser/favicon/favicon_service_factory.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/favicon/chrome_favicon_client_factory.h" 9 #include "chrome/browser/favicon/chrome_favicon_client_factory.h"
10 #include "chrome/browser/favicon/favicon_service.h"
11 #include "chrome/browser/history/history_service_factory.h" 10 #include "chrome/browser/history/history_service_factory.h"
12 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "components/favicon/core/browser/favicon_service.h"
13 #include "components/history/core/browser/history_service.h" 13 #include "components/history/core/browser/history_service.h"
14 #include "components/keyed_service/content/browser_context_dependency_manager.h" 14 #include "components/keyed_service/content/browser_context_dependency_manager.h"
15 15
16 // static 16 // static
17 FaviconService* FaviconServiceFactory::GetForProfile(Profile* profile, 17 FaviconService* FaviconServiceFactory::GetForProfile(Profile* profile,
18 ServiceAccessType sat) { 18 ServiceAccessType sat) {
19 if (!profile->IsOffTheRecord()) { 19 if (!profile->IsOffTheRecord()) {
20 return static_cast<FaviconService*>( 20 return static_cast<FaviconService*>(
21 GetInstance()->GetServiceForBrowserContext(profile, true)); 21 GetInstance()->GetServiceForBrowserContext(profile, true));
22 } else if (sat == ServiceAccessType::EXPLICIT_ACCESS) { 22 } else if (sat == ServiceAccessType::EXPLICIT_ACCESS) {
(...skipping 28 matching lines...) Expand all
51 content::BrowserContext* context) const { 51 content::BrowserContext* context) const {
52 Profile* profile = Profile::FromBrowserContext(context); 52 Profile* profile = Profile::FromBrowserContext(context);
53 return new FaviconService(ChromeFaviconClientFactory::GetForProfile(profile), 53 return new FaviconService(ChromeFaviconClientFactory::GetForProfile(profile),
54 HistoryServiceFactory::GetForProfile( 54 HistoryServiceFactory::GetForProfile(
55 profile, ServiceAccessType::EXPLICIT_ACCESS)); 55 profile, ServiceAccessType::EXPLICIT_ACCESS));
56 } 56 }
57 57
58 bool FaviconServiceFactory::ServiceIsNULLWhileTesting() const { 58 bool FaviconServiceFactory::ServiceIsNULLWhileTesting() const {
59 return true; 59 return true;
60 } 60 }
OLDNEW
« no previous file with comments | « chrome/browser/favicon/favicon_service.cc ('k') | chrome/browser/favicon/favicon_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698