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

Unified Diff: extensions/browser/test_extensions_browser_client.h

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
« no previous file with comments | « extensions/browser/mock_extension_system.cc ('k') | extensions/browser/test_extensions_browser_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 274a8a98157310eb5e589db79e0b11340b4d1790..be660e7e6d80f813525c33b01ef491ba1b1fda25 100644
--- a/extensions/browser/test_extensions_browser_client.h
+++ b/extensions/browser/test_extensions_browser_client.h
@@ -5,7 +5,13 @@
#ifndef EXTENSIONS_BROWSER_TEST_EXTENSIONS_BROWSER_CLIENT_H_
#define EXTENSIONS_BROWSER_TEST_EXTENSIONS_BROWSER_CLIENT_H_
+#include <string>
+#include <vector>
+
+#include "base/callback.h"
#include "base/compiler_specific.h"
+#include "base/memory/ref_counted.h"
+#include "components/update_client/update_client.h"
#include "extensions/browser/extensions_browser_client.h"
#include "extensions/browser/updater/extension_cache.h"
@@ -30,6 +36,10 @@ class TestExtensionsBrowserClient : public ExtensionsBrowserClient {
extension_cache_ = extension_cache.Pass();
}
+ // Sets a factory to respond to calls of the CreateUpdateClient method.
+ void SetUpdateClientFactory(
+ const base::Callback<update_client::UpdateClient*(void)>& factory);
+
// Associates an incognito context with |main_context_|.
void SetIncognitoContext(content::BrowserContext* incognito_context);
@@ -97,6 +107,8 @@ class TestExtensionsBrowserClient : public ExtensionsBrowserClient {
bool IsMinBrowserVersionSupported(const std::string& min_version) override;
ExtensionWebContentsObserver* GetExtensionWebContentsObserver(
content::WebContents* web_contents) override;
+ scoped_refptr<update_client::UpdateClient> CreateUpdateClient(
+ content::BrowserContext* context) override;
private:
content::BrowserContext* main_context_; // Not owned.
@@ -110,6 +122,8 @@ class TestExtensionsBrowserClient : public ExtensionsBrowserClient {
scoped_ptr<ExtensionCache> extension_cache_;
+ base::Callback<update_client::UpdateClient*(void)> update_client_factory_;
+
DISALLOW_COPY_AND_ASSIGN(TestExtensionsBrowserClient);
};
« no previous file with comments | « extensions/browser/mock_extension_system.cc ('k') | extensions/browser/test_extensions_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698