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

Side by Side Diff: trunk/src/extensions/browser/test_extensions_browser_client.cc

Issue 399153002: Revert 283678 "Refactor code that defers extension background pa..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/test_extensions_browser_client.h" 5 #include "extensions/browser/test_extensions_browser_client.h"
6 6
7 #include "content/public/browser/browser_context.h" 7 #include "content/public/browser/browser_context.h"
8 #include "extensions/browser/app_sorting.h" 8 #include "extensions/browser/app_sorting.h"
9 #include "extensions/browser/extension_host_delegate.h" 9 #include "extensions/browser/extension_host_delegate.h"
10 #include "extensions/browser/test_runtime_api_delegate.h" 10 #include "extensions/browser/test_runtime_api_delegate.h"
11 11
12 using content::BrowserContext; 12 using content::BrowserContext;
13 13
14 namespace extensions { 14 namespace extensions {
15 15
16 TestExtensionsBrowserClient::TestExtensionsBrowserClient( 16 TestExtensionsBrowserClient::TestExtensionsBrowserClient(
17 BrowserContext* main_context) 17 BrowserContext* main_context)
18 : main_context_(main_context), 18 : main_context_(main_context), incognito_context_(NULL) {
19 incognito_context_(NULL),
20 process_manager_delegate_(NULL) {
21 DCHECK(main_context_); 19 DCHECK(main_context_);
22 DCHECK(!main_context_->IsOffTheRecord()); 20 DCHECK(!main_context_->IsOffTheRecord());
23 } 21 }
24 22
25 TestExtensionsBrowserClient::~TestExtensionsBrowserClient() {} 23 TestExtensionsBrowserClient::~TestExtensionsBrowserClient() {}
26 24
27 void TestExtensionsBrowserClient::SetIncognitoContext(BrowserContext* context) { 25 void TestExtensionsBrowserClient::SetIncognitoContext(BrowserContext* context) {
28 // If a context is provided it must be off-the-record. 26 // If a context is provided it must be off-the-record.
29 DCHECK(!context || context->IsOffTheRecord()); 27 DCHECK(!context || context->IsOffTheRecord());
30 incognito_context_ = context; 28 incognito_context_ = context;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 109
112 PrefService* TestExtensionsBrowserClient::GetPrefServiceForContext( 110 PrefService* TestExtensionsBrowserClient::GetPrefServiceForContext(
113 BrowserContext* context) { 111 BrowserContext* context) {
114 return NULL; 112 return NULL;
115 } 113 }
116 114
117 void TestExtensionsBrowserClient::GetEarlyExtensionPrefsObservers( 115 void TestExtensionsBrowserClient::GetEarlyExtensionPrefsObservers(
118 content::BrowserContext* context, 116 content::BrowserContext* context,
119 std::vector<ExtensionPrefsObserver*>* observers) const {} 117 std::vector<ExtensionPrefsObserver*>* observers) const {}
120 118
121 ProcessManagerDelegate* TestExtensionsBrowserClient::GetProcessManagerDelegate() 119 bool TestExtensionsBrowserClient::DeferLoadingBackgroundHosts(
122 const { 120 BrowserContext* context) const {
123 return process_manager_delegate_; 121 return false;
122 }
123
124 bool TestExtensionsBrowserClient::IsBackgroundPageAllowed(
125 BrowserContext* context) const {
126 return true;
124 } 127 }
125 128
126 scoped_ptr<ExtensionHostDelegate> 129 scoped_ptr<ExtensionHostDelegate>
127 TestExtensionsBrowserClient::CreateExtensionHostDelegate() { 130 TestExtensionsBrowserClient::CreateExtensionHostDelegate() {
128 return scoped_ptr<ExtensionHostDelegate>(); 131 return scoped_ptr<ExtensionHostDelegate>();
129 } 132 }
130 133
131 bool TestExtensionsBrowserClient::DidVersionUpdate(BrowserContext* context) { 134 bool TestExtensionsBrowserClient::DidVersionUpdate(BrowserContext* context) {
132 return false; 135 return false;
133 } 136 }
(...skipping 24 matching lines...) Expand all
158 content::BrowserContext* context) const { 161 content::BrowserContext* context) const {
159 return scoped_ptr<RuntimeAPIDelegate>(new TestRuntimeAPIDelegate()); 162 return scoped_ptr<RuntimeAPIDelegate>(new TestRuntimeAPIDelegate());
160 } 163 }
161 164
162 ComponentExtensionResourceManager* 165 ComponentExtensionResourceManager*
163 TestExtensionsBrowserClient::GetComponentExtensionResourceManager() { 166 TestExtensionsBrowserClient::GetComponentExtensionResourceManager() {
164 return NULL; 167 return NULL;
165 } 168 }
166 169
167 } // namespace extensions 170 } // namespace extensions
OLDNEW
« no previous file with comments | « trunk/src/extensions/browser/test_extensions_browser_client.h ('k') | trunk/src/extensions/extensions.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698