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

Unified Diff: components/update_client/configurator.h

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
Index: components/update_client/configurator.h
diff --git a/components/update_client/configurator.h b/components/update_client/configurator.h
index be2caff58d870274f40463d99995f94dc01e990b..9fca17a3b0f3a4b945a505ca57859c7625f6cc34 100644
--- a/components/update_client/configurator.h
+++ b/components/update_client/configurator.h
@@ -26,6 +26,7 @@ class URLRequestContextGetter;
namespace update_client {
class OutOfProcessPatcher;
+class PersistedData;
// Controls the component updater behavior.
// TODO(sorin): this class will be split soon in two. One class controls
@@ -120,19 +121,18 @@ class Configurator : public base::RefCountedThreadSafe<Configurator> {
virtual scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner()
const = 0;
- // Returns a PrefService that the update_client can use to store persistent
- // update information. The PrefService must outlive the entire update_client,
- // and be safe to access from the thread the update_client is constructed
- // on.
- // Returning null is safe and will disable any functionality that requires
- // persistent storage.
- virtual PrefService* GetPrefService() const = 0;
-
// Returns true if the Chrome is installed for the current user only, or false
// if Chrome is installed for all users on the machine. This function must be
// called only from a blocking pool thread, as it may access the file system.
virtual bool IsPerUserInstall() const = 0;
+ // Returns a PersistedData object that update_client can use to store
+ // persistent update information. This persisted data depends on a
+ // PrefService, which must outlive the entire update_client.
+ // When this PrefService is null, any functionality requaring persistent
+ // storage will be disabled.
+ virtual std::unique_ptr<PersistedData> CreateMetadata() const = 0;
+
protected:
friend class base::RefCountedThreadSafe<Configurator>;
« no previous file with comments | « chrome/browser/extensions/updater/chrome_update_client_config.cc ('k') | components/update_client/test_configurator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698