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

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

Issue 1165913002: [Cleanup] Used scoped pointers in KeyedServiceFactory's SetTestingFactory functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Finish renaming profile -> context Created 5 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
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 "chrome/browser/profiles/incognito_helpers.h"
10 #include "components/keyed_service/content/browser_context_dependency_manager.h" 10 #include "components/keyed_service/content/browser_context_dependency_manager.h"
(...skipping 24 matching lines...) Expand all
35 "Service", 35 "Service",
36 BrowserContextDependencyManager::GetInstance()) { 36 BrowserContextDependencyManager::GetInstance()) {
37 DependsOn(extensions::ExtensionRegistryFactory::GetInstance()); 37 DependsOn(extensions::ExtensionRegistryFactory::GetInstance());
38 DependsOn(extensions::ExtensionSystemFactory::GetInstance()); 38 DependsOn(extensions::ExtensionSystemFactory::GetInstance());
39 } 39 }
40 40
41 ServiceFactory::~ServiceFactory() {} 41 ServiceFactory::~ServiceFactory() {}
42 42
43 KeyedService* ServiceFactory::BuildServiceInstanceFor( 43 KeyedService* ServiceFactory::BuildServiceInstanceFor(
44 content::BrowserContext* profile) const { 44 content::BrowserContext* profile) const {
45 return new Service( 45 return new Service(Profile::FromBrowserContext(profile),
46 Profile::FromBrowserContext(profile), 46 extensions::ExtensionRegistry::Get(profile));
47 extensions::ExtensionRegistry::Get(Profile::FromBrowserContext(profile)));
48 } 47 }
49 48
50 bool ServiceFactory::ServiceIsCreatedWithBrowserContext() const { return true; } 49 bool ServiceFactory::ServiceIsCreatedWithBrowserContext() const { return true; }
51 50
52 content::BrowserContext* ServiceFactory::GetBrowserContextToUse( 51 content::BrowserContext* ServiceFactory::GetBrowserContextToUse(
53 content::BrowserContext* context) const { 52 content::BrowserContext* context) const {
54 return chrome::GetBrowserContextRedirectedInIncognito(context); 53 return chrome::GetBrowserContextRedirectedInIncognito(context);
55 } 54 }
56 55
57 } // namespace file_system_provider 56 } // namespace file_system_provider
58 } // namespace chromeos 57 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698