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

Unified Diff: components/update_client/test_configurator.cc

Issue 2873533002: Prepare to abstract PersistedData by making it part of the configurator.
Patch Set: Rename pref_ to pref_service_. Created 3 years, 6 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 | « components/update_client/test_configurator.h ('k') | components/update_client/update_checker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/test_configurator.cc
diff --git a/components/update_client/test_configurator.cc b/components/update_client/test_configurator.cc
index b2bf95ddccb1ed233d802af4be81e215b5da866d..6ef0603fb42aae3ab743a083bcfeae7b495a903f 100644
--- a/components/update_client/test_configurator.cc
+++ b/components/update_client/test_configurator.cc
@@ -8,7 +8,8 @@
#include "base/single_thread_task_runner.h"
#include "base/version.h"
#include "components/prefs/pref_service.h"
-#include "components/update_client/out_of_process_patcher.h"
+#include "components/update_client/component_patcher_operation.h"
+#include "components/update_client/persisted_data.h"
#include "net/url_request/url_request_test_util.h"
#include "url/gurl.h"
@@ -34,6 +35,7 @@ TestConfigurator::TestConfigurator(
ondemand_time_(0),
enabled_cup_signing_(false),
enabled_component_updates_(true),
+ pref_service_(nullptr),
context_(new net::TestURLRequestContextGetter(network_task_runner)) {}
TestConfigurator::~TestConfigurator() {
@@ -161,18 +163,22 @@ void TestConfigurator::SetPingUrl(const GURL& url) {
ping_url_ = url;
}
+void TestConfigurator::SetPrefService(PrefService* pref_service) {
+ pref_service_ = pref_service;
+}
+
scoped_refptr<base::SequencedTaskRunner>
TestConfigurator::GetSequencedTaskRunner() const {
DCHECK(worker_task_runner_.get());
return worker_task_runner_;
}
-PrefService* TestConfigurator::GetPrefService() const {
- return nullptr;
-}
-
bool TestConfigurator::IsPerUserInstall() const {
return true;
}
+std::unique_ptr<PersistedData> TestConfigurator::CreateMetadata() const {
+ return base::MakeUnique<PersistedData>(pref_service_);
+}
+
} // namespace update_client
« no previous file with comments | « components/update_client/test_configurator.h ('k') | components/update_client/update_checker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698