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

Unified Diff: extensions/browser/test_extensions_browser_client.h

Issue 381283002: Refactor code that defers extension background page loading (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase on top of chrome_browser_extensions.gypi GN changes Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: extensions/browser/test_extensions_browser_client.h
diff --git a/extensions/browser/test_extensions_browser_client.h b/extensions/browser/test_extensions_browser_client.h
index b7932590ddfe64a1baef11f46317fa1ca3923706..1cfffee114b6b24bae02048713fa0b03ab76756e 100644
--- a/extensions/browser/test_extensions_browser_client.h
+++ b/extensions/browser/test_extensions_browser_client.h
@@ -15,10 +15,14 @@ namespace extensions {
// this class should call ExtensionsBrowserClient::Set() with its instance.
class TestExtensionsBrowserClient : public ExtensionsBrowserClient {
public:
- // |context| is required and must not be an incognito context.
+ // |main_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);
@@ -59,10 +63,7 @@ class TestExtensionsBrowserClient : public ExtensionsBrowserClient {
virtual void GetEarlyExtensionPrefsObservers(
content::BrowserContext* context,
std::vector<ExtensionPrefsObserver*>* observers) const OVERRIDE;
- virtual bool DeferLoadingBackgroundHosts(
- content::BrowserContext* context) const OVERRIDE;
- virtual bool IsBackgroundPageAllowed(content::BrowserContext* context) const
- OVERRIDE;
+ virtual ProcessManagerDelegate* GetProcessManagerDelegate() const OVERRIDE;
virtual scoped_ptr<ExtensionHostDelegate> CreateExtensionHostDelegate()
OVERRIDE;
virtual bool DidVersionUpdate(content::BrowserContext* context) OVERRIDE;
@@ -82,6 +83,9 @@ 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);
};
« no previous file with comments | « extensions/browser/process_manager_unittest.cc ('k') | extensions/browser/test_extensions_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698