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

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: Don't serialize the attrs when they are empty. 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
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..5a4c4c62d2c34604b9f3152cfa79e3ab1cd6c63e 100644
--- a/components/update_client/persisted_data.h
+++ b/components/update_client/persisted_data.h
@@ -52,6 +52,20 @@ 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:
base::ThreadChecker thread_checker_;
PrefService* pref_service_;
« no previous file with comments | « no previous file | components/update_client/persisted_data.cc » ('j') | components/update_client/persisted_data.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698