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

Side by Side Diff: chrome/browser/extensions/chrome_app_icon_service_factory.cc

Issue 2819413003: Refactor extension app icon. (Closed)
Patch Set: rebase Created 3 years, 7 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 2017 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/extensions/chrome_app_icon_service_factory.h"
6
7 #include "chrome/browser/extensions/chrome_app_icon_service.h"
8 #include "chrome/browser/profiles/incognito_helpers.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10 #include "extensions/browser/extension_registry_factory.h"
11
12 namespace extensions {
13
14 // static
15 ChromeAppIconService* ChromeAppIconServiceFactory::GetForBrowserContext(
16 content::BrowserContext* context) {
17 return static_cast<ChromeAppIconService*>(
18 GetInstance()->GetServiceForBrowserContext(context, true));
19 }
20
21 // static
22 ChromeAppIconServiceFactory* ChromeAppIconServiceFactory::GetInstance() {
23 return base::Singleton<ChromeAppIconServiceFactory>::get();
24 }
25
26 ChromeAppIconServiceFactory::ChromeAppIconServiceFactory()
27 : BrowserContextKeyedServiceFactory(
28 "ChromeAppIconService",
29 BrowserContextDependencyManager::GetInstance()) {
30 DependsOn(ExtensionRegistryFactory::GetInstance());
msw 2017/05/08 19:59:54 Does this also depend on some similar arc componen
khmel 2017/05/09 00:05:05 No, ChromeAppIconService may work without ArcAppLi
31 }
32
33 ChromeAppIconServiceFactory::~ChromeAppIconServiceFactory() = default;
34
35 KeyedService* ChromeAppIconServiceFactory::BuildServiceInstanceFor(
36 content::BrowserContext* context) const {
37 return new ChromeAppIconService(context);
38 }
39
40 content::BrowserContext* ChromeAppIconServiceFactory::GetBrowserContextToUse(
41 content::BrowserContext* context) const {
42 return chrome::GetBrowserContextRedirectedInIncognito(context);
43 }
44
45 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698