summaryrefslogtreecommitdiff
path: root/chromium/components/update_client/test_configurator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/components/update_client/test_configurator.cc')
-rw-r--r--chromium/components/update_client/test_configurator.cc19
1 files changed, 18 insertions, 1 deletions
diff --git a/chromium/components/update_client/test_configurator.cc b/chromium/components/update_client/test_configurator.cc
index cbc177ee6a9..882e5db3cb0 100644
--- a/chromium/components/update_client/test_configurator.cc
+++ b/chromium/components/update_client/test_configurator.cc
@@ -13,6 +13,7 @@
#include "components/services/unzip/unzip_service.h"
#include "components/update_client/activity_data_service.h"
#include "net/url_request/url_request_test_util.h"
+#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/service_manager/public/cpp/connector.h"
#include "services/service_manager/public/cpp/service.h"
#include "services/service_manager/public/cpp/test/test_connector_factory.h"
@@ -38,7 +39,10 @@ TestConfigurator::TestConfigurator()
enabled_cup_signing_(false),
enabled_component_updates_(true),
context_(base::MakeRefCounted<net::TestURLRequestContextGetter>(
- base::ThreadTaskRunnerHandle::Get())) {
+ base::ThreadTaskRunnerHandle::Get())),
+ test_shared_loader_factory_(
+ base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>(
+ &test_url_loader_factory_)) {
service_manager::TestConnectorFactory::NameToServiceMap services;
services.insert(
std::make_pair("patch_service", std::make_unique<patch::PatchService>()));
@@ -120,6 +124,11 @@ scoped_refptr<net::URLRequestContextGetter> TestConfigurator::RequestContext()
return context_;
}
+scoped_refptr<network::SharedURLLoaderFactory>
+TestConfigurator::URLLoaderFactory() const {
+ return test_shared_loader_factory_;
+}
+
std::unique_ptr<service_manager::Connector>
TestConfigurator::CreateServiceManagerConnector() const {
return connector_->Clone();
@@ -175,6 +184,10 @@ void TestConfigurator::SetPingUrl(const GURL& url) {
ping_url_ = url;
}
+void TestConfigurator::SetAppGuid(const std::string& app_guid) {
+ app_guid_ = app_guid;
+}
+
PrefService* TestConfigurator::GetPrefService() const {
return nullptr;
}
@@ -191,4 +204,8 @@ std::vector<uint8_t> TestConfigurator::GetRunActionKeyHash() const {
return std::vector<uint8_t>(std::begin(gjpm_hash), std::end(gjpm_hash));
}
+std::string TestConfigurator::GetAppGuid() const {
+ return app_guid_;
+}
+
} // namespace update_client