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

Side by Side Diff: chrome/browser/extensions/api/developer_private/developer_private_api_factory.cc

Issue 13865012: Change GetProfileToUse method from Profile to content::BrowserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trybots Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/api/developer_private/developer_private_api_ factory.h" 5 #include "chrome/browser/extensions/api/developer_private/developer_private_api_ factory.h"
6 6
7 #include "chrome/browser/extensions/api/developer_private/developer_private_api. h" 7 #include "chrome/browser/extensions/api/developer_private/developer_private_api. 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/profile.h" 10 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_dependency_manager.h" 11 #include "chrome/browser/profiles/profile_dependency_manager.h"
11 12
12 namespace extensions { 13 namespace extensions {
13 14
14 // static 15 // static
15 DeveloperPrivateAPI* DeveloperPrivateAPIFactory::GetForProfile( 16 DeveloperPrivateAPI* DeveloperPrivateAPIFactory::GetForProfile(
16 Profile* profile) { 17 Profile* profile) {
17 return static_cast<DeveloperPrivateAPI*>( 18 return static_cast<DeveloperPrivateAPI*>(
18 GetInstance()->GetServiceForProfile(profile, true)); 19 GetInstance()->GetServiceForProfile(profile, true));
(...skipping 11 matching lines...) Expand all
30 } 31 }
31 32
32 DeveloperPrivateAPIFactory::~DeveloperPrivateAPIFactory() { 33 DeveloperPrivateAPIFactory::~DeveloperPrivateAPIFactory() {
33 } 34 }
34 35
35 ProfileKeyedService* DeveloperPrivateAPIFactory::BuildServiceInstanceFor( 36 ProfileKeyedService* DeveloperPrivateAPIFactory::BuildServiceInstanceFor(
36 content::BrowserContext* profile) const { 37 content::BrowserContext* profile) const {
37 return new DeveloperPrivateAPI(static_cast<Profile*>(profile)); 38 return new DeveloperPrivateAPI(static_cast<Profile*>(profile));
38 } 39 }
39 40
40 bool DeveloperPrivateAPIFactory::ServiceRedirectedInIncognito() const { 41 content::BrowserContext* DeveloperPrivateAPIFactory::GetBrowserContextToUse(
41 return true; 42 content::BrowserContext* context) const {
43 return chrome::GetBrowserContextRedirectedInIncognito(context);
42 } 44 }
43 45
44 bool DeveloperPrivateAPIFactory::ServiceIsCreatedWithProfile() const { 46 bool DeveloperPrivateAPIFactory::ServiceIsCreatedWithProfile() const {
45 return true; 47 return true;
46 } 48 }
47 49
48 bool DeveloperPrivateAPIFactory::ServiceIsNULLWhileTesting() const { 50 bool DeveloperPrivateAPIFactory::ServiceIsNULLWhileTesting() const {
49 return true; 51 return true;
50 } 52 }
51 53
52 } // namespace extensions 54 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698