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

Unified Diff: chrome/browser/extensions/chrome_extensions_browser_client.cc

Issue 89253002: Remove ExtensionPrefFactory's dependency on Profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/chrome_extensions_browser_client.cc
diff --git a/chrome/browser/extensions/chrome_extensions_browser_client.cc b/chrome/browser/extensions/chrome_extensions_browser_client.cc
index 500534e2c079c7201e5e49213507e13b03daf556..800582580567a8d44c22cd3cd0e073687c5d5517 100644
--- a/chrome/browser/extensions/chrome_extensions_browser_client.cc
+++ b/chrome/browser/extensions/chrome_extensions_browser_client.cc
@@ -34,6 +34,14 @@ bool ChromeExtensionsBrowserClient::IsShuttingDown() {
return g_browser_process->IsShuttingDown();
}
+bool ChromeExtensionsBrowserClient::AreExtensionsDisabled(
+ const CommandLine& command_line,
+ content::BrowserContext* context) {
+ Profile* profile = static_cast<Profile*>(context);
+ return command_line.HasSwitch(switches::kDisableExtensions) ||
+ profile->GetPrefs()->GetBoolean(prefs::kDisableExtensions);
+}
+
bool ChromeExtensionsBrowserClient::IsValidContext(
content::BrowserContext* context) {
Profile* profile = static_cast<Profile*>(context);
@@ -62,6 +70,11 @@ content::BrowserContext* ChromeExtensionsBrowserClient::GetOriginalContext(
return static_cast<Profile*>(context)->GetOriginalProfile();
}
+PrefService* ChromeExtensionsBrowserClient::GetPrefServiceForContext(
+ content::BrowserContext* context) {
+ return static_cast<Profile*>(context)->GetPrefs();
+}
+
bool ChromeExtensionsBrowserClient::DeferLoadingBackgroundHosts(
content::BrowserContext* context) const {
Profile* profile = static_cast<Profile*>(context);

Powered by Google App Engine
This is Rietveld 408576698