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

Unified Diff: chrome/browser/component_updater/chrome_component_updater_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 | « no previous file | chrome/browser/extensions/updater/chrome_update_client_config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component_updater/chrome_component_updater_configurator.cc
diff --git a/chrome/browser/component_updater/chrome_component_updater_configurator.cc b/chrome/browser/component_updater/chrome_component_updater_configurator.cc
index ced40dc884115b947cac49cb5f8887ba18ee386d..bb3af8d37fc25d2cbce73ba505654ff6bfd9c6cd 100644
--- a/chrome/browser/component_updater/chrome_component_updater_configurator.cc
+++ b/chrome/browser/component_updater/chrome_component_updater_configurator.cc
@@ -22,6 +22,7 @@
#include "components/component_updater/configurator_impl.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
+#include "components/update_client/persisted_data.h"
#include "components/update_client/update_query_params.h"
#if defined(OS_WIN)
@@ -63,8 +64,8 @@ class ChromeConfigurator : public update_client::Configurator {
bool EnabledCupSigning() const override;
scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner()
const override;
- PrefService* GetPrefService() const override;
bool IsPerUserInstall() const override;
+ std::unique_ptr<update_client::PersistedData> CreateMetadata() const override;
private:
friend class base::RefCountedThreadSafe<ChromeConfigurator>;
@@ -190,15 +191,16 @@ ChromeConfigurator::GetSequencedTaskRunner() const {
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN});
}
-PrefService* ChromeConfigurator::GetPrefService() const {
- DCHECK(pref_service_);
- return pref_service_;
-}
-
bool ChromeConfigurator::IsPerUserInstall() const {
return component_updater::IsPerUserInstall();
}
+std::unique_ptr<update_client::PersistedData>
+ChromeConfigurator::CreateMetadata() const {
+ DCHECK(pref_service_);
+ return base::MakeUnique<update_client::PersistedData>(pref_service_);
+}
+
} // namespace
void RegisterPrefsForChromeComponentUpdaterConfigurator(
« no previous file with comments | « no previous file | chrome/browser/extensions/updater/chrome_update_client_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698