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

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

Issue 2883053003: Delete unused chrome://fallback-icon/ handling (Closed)
Patch Set: Merge branch 'master' into searchbox3 Created 3 years, 6 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/favicon/fallback_icon_service_factory.h"
6
7 #include "base/memory/singleton.h"
8 #include "chrome/browser/favicon/chrome_fallback_icon_client_factory.h"
9 #include "chrome/browser/profiles/incognito_helpers.h"
10 #include "components/favicon/core/fallback_icon_service.h"
11 #include "components/keyed_service/content/browser_context_dependency_manager.h"
12 #include "content/public/browser/browser_context.h"
13
14 // static
15 favicon::FallbackIconService* FallbackIconServiceFactory::GetForBrowserContext(
16 content::BrowserContext* context) {
17 return static_cast<favicon::FallbackIconService*>(
18 GetInstance()->GetServiceForBrowserContext(context, true));
19 }
20
21 // static
22 FallbackIconServiceFactory* FallbackIconServiceFactory::GetInstance() {
23 return base::Singleton<FallbackIconServiceFactory>::get();
24 }
25
26 FallbackIconServiceFactory::FallbackIconServiceFactory()
27 : BrowserContextKeyedServiceFactory(
28 "FallbackIconService",
29 BrowserContextDependencyManager::GetInstance()) {
30 DependsOn(ChromeFallbackIconClientFactory::GetInstance());
31 }
32
33 FallbackIconServiceFactory::~FallbackIconServiceFactory() {}
34
35 content::BrowserContext* FallbackIconServiceFactory::GetBrowserContextToUse(
36 content::BrowserContext* context) const {
37 return chrome::GetBrowserContextRedirectedInIncognito(context);
38 }
39
40 KeyedService* FallbackIconServiceFactory::BuildServiceInstanceFor(
41 content::BrowserContext* context) const {
42 favicon::FallbackIconClient* fallback_icon_client =
43 ChromeFallbackIconClientFactory::GetForBrowserContext(context);
44 return new favicon::FallbackIconService(fallback_icon_client);
45 }
46
47 bool FallbackIconServiceFactory::ServiceIsNULLWhileTesting() const {
48 return true;
49 }
OLDNEW
« no previous file with comments | « chrome/browser/favicon/fallback_icon_service_factory.h ('k') | chrome/browser/search/instant_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698