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

Unified Diff: extensions/browser/test_extensions_browser_client.cc

Issue 1362043005: Add extensions code to use common updater in components/update_client/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merged latest origin/master Created 5 years, 2 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.cc
diff --git a/extensions/browser/test_extensions_browser_client.cc b/extensions/browser/test_extensions_browser_client.cc
index d98f7af31d540f732dd2fe4c8ce0b0a1d1bac8b4..da5ef277cc83d286fac614150ee925be4b7d0f9e 100644
--- a/extensions/browser/test_extensions_browser_client.cc
+++ b/extensions/browser/test_extensions_browser_client.cc
@@ -27,6 +27,11 @@ TestExtensionsBrowserClient::TestExtensionsBrowserClient(
TestExtensionsBrowserClient::~TestExtensionsBrowserClient() {}
+void TestExtensionsBrowserClient::SetUpdateClientFactory(
+ const base::Callback<update_client::UpdateClient*(void)>& factory) {
+ update_client_factory_ = factory;
+}
+
void TestExtensionsBrowserClient::SetIncognitoContext(BrowserContext* context) {
// If a context is provided it must be off-the-record.
DCHECK(!context || context->IsOffTheRecord());
@@ -204,4 +209,12 @@ TestExtensionsBrowserClient::GetExtensionWebContentsObserver(
return nullptr;
}
+scoped_refptr<update_client::UpdateClient>
+TestExtensionsBrowserClient::CreateUpdateClient(
+ content::BrowserContext* context) {
+ return update_client_factory_.is_null()
+ ? nullptr
+ : make_scoped_refptr(update_client_factory_.Run());
+}
+
} // namespace extensions
« no previous file with comments | « extensions/browser/test_extensions_browser_client.h ('k') | extensions/browser/updater/update_client_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698