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

Unified Diff: components/update_client/persisted_data.h

Issue 2252093002: Add support for Omaha cohorts to the component updater. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit test Created 4 years, 4 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 | components/update_client/persisted_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/persisted_data.h
diff --git a/components/update_client/persisted_data.h b/components/update_client/persisted_data.h
index 6b24e571258cf8d739fa0fdc8fd2ae2bc527bb08..06d4d0d2d0762f81337df9fe3147f4e1b3c85d9a 100644
--- a/components/update_client/persisted_data.h
+++ b/components/update_client/persisted_data.h
@@ -52,7 +52,27 @@ class PersistedData {
// This is called only via update_client's RegisterUpdateClientPreferences.
static void RegisterPrefs(PrefRegistrySimple* registry);
+ // These functions return cohort data for the specified |id|. "Cohort"
+ // indicates the membership of the client in any release channels components
+ // have set up in a machine-readable format, while "CohortName" does so in a
+ // human-readable form. "CohortHint" indicates the client's channel selection
+ // preference.
+ std::string GetCohort(const std::string& id) const;
+ std::string GetCohortHint(const std::string& id) const;
+ std::string GetCohortName(const std::string& id) const;
+
+ // These functions set cohort data for the specified |id|.
+ void SetCohort(const std::string& id, const std::string& cohort);
+ void SetCohortHint(const std::string& id, const std::string& cohort_hint);
+ void SetCohortName(const std::string& id, const std::string& cohort_name);
+
private:
+ int GetInt(const std::string& id, const std::string& key, int fallback) const;
+ std::string GetString(const std::string& id, const std::string& key) const;
+ void SetString(const std::string& id,
+ const std::string& key,
+ const std::string& value);
+
base::ThreadChecker thread_checker_;
PrefService* pref_service_;
« no previous file with comments | « no previous file | components/update_client/persisted_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698