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

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

Issue 157813007: Remove Profile dependency from apps::ShellWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chrome_extensions_browser_client.h" 5 #include "chrome/browser/extensions/chrome_extensions_browser_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/version.h" 8 #include "base/version.h"
9 #include "chrome/browser/app_mode/app_mode_utils.h" 9 #include "chrome/browser/app_mode/app_mode_utils.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 content::BrowserContext* ChromeExtensionsBrowserClient::GetOffTheRecordContext( 74 content::BrowserContext* ChromeExtensionsBrowserClient::GetOffTheRecordContext(
75 content::BrowserContext* context) { 75 content::BrowserContext* context) {
76 return static_cast<Profile*>(context)->GetOffTheRecordProfile(); 76 return static_cast<Profile*>(context)->GetOffTheRecordProfile();
77 } 77 }
78 78
79 content::BrowserContext* ChromeExtensionsBrowserClient::GetOriginalContext( 79 content::BrowserContext* ChromeExtensionsBrowserClient::GetOriginalContext(
80 content::BrowserContext* context) { 80 content::BrowserContext* context) {
81 return static_cast<Profile*>(context)->GetOriginalProfile(); 81 return static_cast<Profile*>(context)->GetOriginalProfile();
82 } 82 }
83 83
84 bool ChromeExtensionsBrowserClient::IsGuestSession(
85 content::BrowserContext* context) {
86 return static_cast<Profile*>(context)->IsGuestSession();
87 }
88
84 bool ChromeExtensionsBrowserClient::IsExtensionIncognitoEnabled( 89 bool ChromeExtensionsBrowserClient::IsExtensionIncognitoEnabled(
85 const std::string& extension_id, 90 const std::string& extension_id,
86 content::BrowserContext* context) const { 91 content::BrowserContext* context) const {
87 return util::IsIncognitoEnabled(extension_id, context); 92 return util::IsIncognitoEnabled(extension_id, context);
88 } 93 }
89 94
90 bool ChromeExtensionsBrowserClient::CanExtensionCrossIncognito( 95 bool ChromeExtensionsBrowserClient::CanExtensionCrossIncognito(
91 const extensions::Extension* extension, 96 const extensions::Extension* extension,
92 content::BrowserContext* context) const { 97 content::BrowserContext* context) const {
93 return util::CanCrossIncognito(extension, context); 98 return util::CanCrossIncognito(extension, context);
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 dependencies.push_back(ExtensionSystemSharedFactory::GetInstance()); 209 dependencies.push_back(ExtensionSystemSharedFactory::GetInstance());
205 return dependencies; 210 return dependencies;
206 } 211 }
207 212
208 ExtensionSystem* ChromeExtensionsBrowserClient::CreateExtensionSystem( 213 ExtensionSystem* ChromeExtensionsBrowserClient::CreateExtensionSystem(
209 content::BrowserContext* context) { 214 content::BrowserContext* context) {
210 return new ExtensionSystemImpl(static_cast<Profile*>(context)); 215 return new ExtensionSystemImpl(static_cast<Profile*>(context));
211 } 216 }
212 217
213 } // namespace extensions 218 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698