diff options
author | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-17 17:21:45 +0000 |
---|---|---|
committer | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-17 17:21:45 +0000 |
commit | 46a19f626f5794f298cd1e4d8bdcbfcb07fd0b4e (patch) | |
tree | 5a04abc6c4c823a4ddf1ca0d76fcc1ea47ff009a /extensions/browser/test_extensions_browser_client.h | |
parent | dddea5bb5ab70ac91118754eb09ccb30dcb178a2 (diff) | |
download | chromium_src-46a19f626f5794f298cd1e4d8bdcbfcb07fd0b4e.zip chromium_src-46a19f626f5794f298cd1e4d8bdcbfcb07fd0b4e.tar.gz chromium_src-46a19f626f5794f298cd1e4d8bdcbfcb07fd0b4e.tar.bz2 |
Revert 283678 "Refactor code that defers extension background pa..."
This broke Chrome OS valgrind bots, for example:
http://build.chromium.org/p/chromium.memory.fyi/builders/Chromium%20OS%20%28valgrind%29%284%29/builds/27033
> Refactor code that defers extension background page loading
>
> src/extensions depends on chrome::NOTIFICATION_PROFILE_CREATED to support deferred loading of extension background pages when the profile isn't ready yet. This is a layering violation.
>
> * Remove Chrome concepts like "browser window ready" and "profile created" from ProcessManager. Introduce ProcessManagerDelegate with a general concept of deferring background page loading.
> * Consolidate all the tricky Chrome-specific background page loading rules into ChromeProcessManagerDelegate. This keeps all the rules in one place. Annotate each block of special case code with the bug that inspired it.
> * Extend unit test coverage for ProcessManager.
>
> This will make it easier to eliminate chrome::NOTIFICATION_PROFILE_DESTROYED in ProcessManager in a later CL.
>
> BUG=392658
> TEST=unit_tests ProcessManagerTest, browser_tests ProcessManagerBrowserTest, manual
>
> Review URL: https://codereview.chromium.org/381283002
TBR=jamescook@chromium.org
Review URL: https://codereview.chromium.org/399153002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283801 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/browser/test_extensions_browser_client.h')
-rw-r--r-- | extensions/browser/test_extensions_browser_client.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/extensions/browser/test_extensions_browser_client.h b/extensions/browser/test_extensions_browser_client.h index 1cfffee..b793259 100644 --- a/extensions/browser/test_extensions_browser_client.h +++ b/extensions/browser/test_extensions_browser_client.h @@ -15,14 +15,10 @@ namespace extensions { // this class should call ExtensionsBrowserClient::Set() with its instance. class TestExtensionsBrowserClient : public ExtensionsBrowserClient { public: - // |main_context| is required and must not be an incognito context. + // |context| is required and must not be an incognito context. explicit TestExtensionsBrowserClient(content::BrowserContext* main_context); virtual ~TestExtensionsBrowserClient(); - void set_process_manager_delegate(ProcessManagerDelegate* delegate) { - process_manager_delegate_ = delegate; - } - // Associates an incognito context with |main_context_|. void SetIncognitoContext(content::BrowserContext* incognito_context); @@ -63,7 +59,10 @@ class TestExtensionsBrowserClient : public ExtensionsBrowserClient { virtual void GetEarlyExtensionPrefsObservers( content::BrowserContext* context, std::vector<ExtensionPrefsObserver*>* observers) const OVERRIDE; - virtual ProcessManagerDelegate* GetProcessManagerDelegate() const OVERRIDE; + virtual bool DeferLoadingBackgroundHosts( + content::BrowserContext* context) const OVERRIDE; + virtual bool IsBackgroundPageAllowed(content::BrowserContext* context) const + OVERRIDE; virtual scoped_ptr<ExtensionHostDelegate> CreateExtensionHostDelegate() OVERRIDE; virtual bool DidVersionUpdate(content::BrowserContext* context) OVERRIDE; @@ -83,9 +82,6 @@ class TestExtensionsBrowserClient : public ExtensionsBrowserClient { content::BrowserContext* main_context_; // Not owned. content::BrowserContext* incognito_context_; // Not owned, defaults to NULL. - // Not owned, defaults to NULL. - ProcessManagerDelegate* process_manager_delegate_; - DISALLOW_COPY_AND_ASSIGN(TestExtensionsBrowserClient); }; |