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

Unified Diff: components/variations/variations_associated_data.h

Issue 688973004: Plumbing for variations headers from synthetic field trials. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Expose another hashed API in variations_associated_data.h Created 6 years, 2 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/variations/variations_associated_data.h
diff --git a/components/variations/variations_associated_data.h b/components/variations/variations_associated_data.h
index 8bacae1dda0e951b1bcd71e6106d75e1d6764707..3fe70f82785c87a036b577c006298c4376d7b41b 100644
--- a/components/variations/variations_associated_data.h
+++ b/components/variations/variations_associated_data.h
@@ -82,6 +82,11 @@ void AssociateGoogleVariationIDForce(IDCollectionKey key,
const std::string& group_name,
VariationID id);
+// As above, but takes an ActiveGroupId hash pair, rather than the string names.
+void AssociateGoogleVariationIDForceHashes(IDCollectionKey key,
+ const ActiveGroupId& active_group,
+ VariationID id);
+
// Retrieve the variations::VariationID associated with a FieldTrial group for
// collection |key|. The group is denoted by |trial_name| and |group_name|.
// This will return variations::kEmptyID if there is currently no associated ID
@@ -92,6 +97,11 @@ VariationID GetGoogleVariationID(IDCollectionKey key,
const std::string& trial_name,
const std::string& group_name);
+// Same as GetGoogleVariationID(), but takes in a hashed |active_group| rather
+// than the string trial and group name.
+VariationID GetGoogleVariationIDFromHashes(IDCollectionKey key,
+ const ActiveGroupId& active_group);
+
// Associates the specified set of key-value |params| with the variation
// specified by |trial_name| and |group_name|. Fails and returns false if the
// specified variation already has params associated with it or the field trial

Powered by Google App Engine
This is Rietveld 408576698