diff options
author | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-03 00:31:02 +0000 |
---|---|---|
committer | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-03 00:31:02 +0000 |
commit | 367d9b17688f47133ad03d522fc5caf1ac428d01 (patch) | |
tree | 5ec3428ef017c959f8a0ae4016ac5de1e48c40e6 /extensions | |
parent | 55ca88fb8016cfe219cd097283e012362d929807 (diff) | |
download | chromium_src-367d9b17688f47133ad03d522fc5caf1ac428d01.zip chromium_src-367d9b17688f47133ad03d522fc5caf1ac428d01.tar.gz chromium_src-367d9b17688f47133ad03d522fc5caf1ac428d01.tar.bz2 |
Remove ExtensionPrefFactory's dependency on Profile.
Move the code that checks whether the command-line flag or
pref to disable extensions is set into
ExtensionsBrowserClient, and make ExtensionPrefFactory work
with a BrowserContext instead of requiring a Profile.
BUG=313284
Review URL: https://codereview.chromium.org/89253002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238243 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/browser/extensions_browser_client.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/extensions/browser/extensions_browser_client.h b/extensions/browser/extensions_browser_client.h index 6331dae..61641a7 100644 --- a/extensions/browser/extensions_browser_client.h +++ b/extensions/browser/extensions_browser_client.h @@ -7,6 +7,9 @@ #include "base/memory/scoped_ptr.h" +class CommandLine; +class PrefService; + namespace content { class BrowserContext; } @@ -28,6 +31,11 @@ class ExtensionsBrowserClient { // Returns true if the embedder has started shutting down. virtual bool IsShuttingDown() = 0; + // Returns true if extensions have been disabled (e.g. via a command-line flag + // or preference). + virtual bool AreExtensionsDisabled(const CommandLine& command_line, + content::BrowserContext* context) = 0; + // Returns true if the |context| is known to the embedder. virtual bool IsValidContext(content::BrowserContext* context) = 0; @@ -51,6 +59,10 @@ class ExtensionsBrowserClient { virtual content::BrowserContext* GetOriginalContext( content::BrowserContext* context) = 0; + // Returns the PrefService associated with |context|. + virtual PrefService* GetPrefServiceForContext( + content::BrowserContext* context) = 0; + // Returns true if loading background pages should be deferred. virtual bool DeferLoadingBackgroundHosts( content::BrowserContext* context) const = 0; |