| OLD | NEW |
| 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 #include "extensions/browser/updater/null_extension_cache.h" |
| 11 | 12 |
| 12 using content::BrowserContext; | 13 using content::BrowserContext; |
| 13 | 14 |
| 14 namespace extensions { | 15 namespace extensions { |
| 15 | 16 |
| 16 TestExtensionsBrowserClient::TestExtensionsBrowserClient( | 17 TestExtensionsBrowserClient::TestExtensionsBrowserClient( |
| 17 BrowserContext* main_context) | 18 BrowserContext* main_context) |
| 18 : main_context_(main_context), | 19 : main_context_(main_context), |
| 19 incognito_context_(NULL), | 20 incognito_context_(NULL), |
| 20 process_manager_delegate_(NULL), | 21 process_manager_delegate_(NULL), |
| 21 extension_system_factory_(NULL) { | 22 extension_system_factory_(NULL), |
| 23 extension_cache_(new NullExtensionCache) { |
| 22 DCHECK(main_context_); | 24 DCHECK(main_context_); |
| 23 DCHECK(!main_context_->IsOffTheRecord()); | 25 DCHECK(!main_context_->IsOffTheRecord()); |
| 24 } | 26 } |
| 25 | 27 |
| 26 TestExtensionsBrowserClient::~TestExtensionsBrowserClient() {} | 28 TestExtensionsBrowserClient::~TestExtensionsBrowserClient() {} |
| 27 | 29 |
| 28 void TestExtensionsBrowserClient::SetIncognitoContext(BrowserContext* context) { | 30 void TestExtensionsBrowserClient::SetIncognitoContext(BrowserContext* context) { |
| 29 // If a context is provided it must be off-the-record. | 31 // If a context is provided it must be off-the-record. |
| 30 DCHECK(!context || context->IsOffTheRecord()); | 32 DCHECK(!context || context->IsOffTheRecord()); |
| 31 incognito_context_ = context; | 33 incognito_context_ = context; |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 166 |
| 165 void TestExtensionsBrowserClient::BroadcastEventToRenderers( | 167 void TestExtensionsBrowserClient::BroadcastEventToRenderers( |
| 166 const std::string& event_name, | 168 const std::string& event_name, |
| 167 scoped_ptr<base::ListValue> args) { | 169 scoped_ptr<base::ListValue> args) { |
| 168 } | 170 } |
| 169 | 171 |
| 170 net::NetLog* TestExtensionsBrowserClient::GetNetLog() { | 172 net::NetLog* TestExtensionsBrowserClient::GetNetLog() { |
| 171 return NULL; | 173 return NULL; |
| 172 } | 174 } |
| 173 | 175 |
| 176 ExtensionCache* TestExtensionsBrowserClient::GetExtensionCache() { |
| 177 return extension_cache_.get(); |
| 178 } |
| 179 |
| 174 } // namespace extensions | 180 } // namespace extensions |
| OLD | NEW |