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

Side by Side Diff: extensions/browser/process_map_factory.cc

Issue 2945023002: Introduce profile for lock screen apps (Closed)
Patch Set: rebase Created 3 years, 5 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/test/base/testing_profile_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/process_map_factory.h" 5 #include "extensions/browser/process_map_factory.h"
6 6
7 #include "components/keyed_service/content/browser_context_dependency_manager.h" 7 #include "components/keyed_service/content/browser_context_dependency_manager.h"
8 #include "extensions/browser/extensions_browser_client.h" 8 #include "extensions/browser/extensions_browser_client.h"
9 #include "extensions/browser/process_map.h" 9 #include "extensions/browser/process_map.h"
10 10
(...skipping 16 matching lines...) Expand all
27 : BrowserContextKeyedServiceFactory( 27 : BrowserContextKeyedServiceFactory(
28 "ProcessMap", 28 "ProcessMap",
29 BrowserContextDependencyManager::GetInstance()) { 29 BrowserContextDependencyManager::GetInstance()) {
30 // No dependencies on other services. 30 // No dependencies on other services.
31 } 31 }
32 32
33 ProcessMapFactory::~ProcessMapFactory() {} 33 ProcessMapFactory::~ProcessMapFactory() {}
34 34
35 KeyedService* ProcessMapFactory::BuildServiceInstanceFor( 35 KeyedService* ProcessMapFactory::BuildServiceInstanceFor(
36 BrowserContext* context) const { 36 BrowserContext* context) const {
37 return new ProcessMap; 37 ProcessMap* process_map = new ProcessMap();
38 process_map->set_is_lock_screen_context(
39 ExtensionsBrowserClient::Get()->IsLockScreenContext(context));
40 return process_map;
38 } 41 }
39 42
40 BrowserContext* ProcessMapFactory::GetBrowserContextToUse( 43 BrowserContext* ProcessMapFactory::GetBrowserContextToUse(
41 BrowserContext* context) const { 44 BrowserContext* context) const {
42 // Redirected in incognito. 45 // Redirected in incognito.
43 return ExtensionsBrowserClient::Get()->GetOriginalContext(context); 46 return ExtensionsBrowserClient::Get()->GetOriginalContext(context);
44 } 47 }
45 48
46 } // namespace extensions 49 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/test/base/testing_profile_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698