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

Unified Diff: ios/chrome/browser/component_updater/ios_component_updater_configurator.cc

Issue 2873533002: Prepare to abstract PersistedData by making it part of the configurator.
Patch Set: Fix ios compile error. Created 3 years, 7 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: ios/chrome/browser/component_updater/ios_component_updater_configurator.cc
diff --git a/ios/chrome/browser/component_updater/ios_component_updater_configurator.cc b/ios/chrome/browser/component_updater/ios_component_updater_configurator.cc
index f171fb32d7e409706e1c946008ac8f5aa6dea353..4634a441af7e500f1a061db0c6d8734fbc7bcaaa 100644
--- a/ios/chrome/browser/component_updater/ios_component_updater_configurator.cc
+++ b/ios/chrome/browser/component_updater/ios_component_updater_configurator.cc
@@ -7,10 +7,12 @@
#include <string>
#include <vector>
+#include "base/memory/ptr_util.h"
#include "base/threading/sequenced_worker_pool.h"
#include "base/version.h"
#include "components/component_updater/configurator_impl.h"
#include "components/update_client/out_of_process_patcher.h"
+#include "components/update_client/persisted_data.h"
#include "components/update_client/update_query_params.h"
#include "ios/chrome/browser/application_context.h"
#include "ios/chrome/browser/google/google_brand.h"
@@ -52,6 +54,7 @@ class IOSConfigurator : public update_client::Configurator {
const override;
PrefService* GetPrefService() const override;
bool IsPerUserInstall() const override;
+ std::unique_ptr<update_client::PersistedData> CreateMetadata() const override;
private:
friend class base::RefCountedThreadSafe<IOSConfigurator>;
@@ -169,6 +172,11 @@ bool IOSConfigurator::IsPerUserInstall() const {
return true;
}
+std::unique_ptr<update_client::PersistedData> IOSConfigurator::CreateMetadata()
+ const {
+ return base::MakeUnique<update_client::PersistedData>(GetPrefService());
+}
+
} // namespace
scoped_refptr<update_client::Configurator> MakeIOSComponentUpdaterConfigurator(
« components/update_client/configurator.h ('K') | « components/update_client/update_engine.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698