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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/service_factory.cc

Issue 1138423002: Enable file_system_provider::Service in incognito. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « chrome/browser/chromeos/file_system_provider/service_factory.h ('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 "chrome/browser/chromeos/file_system_provider/service_factory.h" 5 #include "chrome/browser/chromeos/file_system_provider/service_factory.h"
6 6
7 #include "chrome/browser/chromeos/file_system_provider/service.h" 7 #include "chrome/browser/chromeos/file_system_provider/service.h"
8 #include "chrome/browser/extensions/extension_system_factory.h" 8 #include "chrome/browser/extensions/extension_system_factory.h"
9 #include "chrome/browser/profiles/incognito_helpers.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h" 10 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10 #include "extensions/browser/extension_registry.h" 11 #include "extensions/browser/extension_registry.h"
11 #include "extensions/browser/extension_registry_factory.h" 12 #include "extensions/browser/extension_registry_factory.h"
12 13
13 namespace chromeos { 14 namespace chromeos {
14 namespace file_system_provider { 15 namespace file_system_provider {
15 16
16 // static 17 // static
17 Service* ServiceFactory::Get(content::BrowserContext* context) { 18 Service* ServiceFactory::Get(content::BrowserContext* context) {
18 return static_cast<Service*>( 19 return static_cast<Service*>(
(...skipping 22 matching lines...) Expand all
41 42
42 KeyedService* ServiceFactory::BuildServiceInstanceFor( 43 KeyedService* ServiceFactory::BuildServiceInstanceFor(
43 content::BrowserContext* profile) const { 44 content::BrowserContext* profile) const {
44 return new Service( 45 return new Service(
45 Profile::FromBrowserContext(profile), 46 Profile::FromBrowserContext(profile),
46 extensions::ExtensionRegistry::Get(Profile::FromBrowserContext(profile))); 47 extensions::ExtensionRegistry::Get(Profile::FromBrowserContext(profile)));
47 } 48 }
48 49
49 bool ServiceFactory::ServiceIsCreatedWithBrowserContext() const { return true; } 50 bool ServiceFactory::ServiceIsCreatedWithBrowserContext() const { return true; }
50 51
52 content::BrowserContext* ServiceFactory::GetBrowserContextToUse(
53 content::BrowserContext* context) const {
54 return chrome::GetBrowserContextRedirectedInIncognito(context);
55 }
56
51 } // namespace file_system_provider 57 } // namespace file_system_provider
52 } // namespace chromeos 58 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/file_system_provider/service_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698