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

Unified Diff: components/variations/variations_associated_data.cc

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.cc
diff --git a/components/variations/variations_associated_data.cc b/components/variations/variations_associated_data.cc
index 6ef2343a74a2698abe5a53f007e8345d5d877069..857ded57d5e3bf95fa48e4130ef52eac04e58781 100644
--- a/components/variations/variations_associated_data.cc
+++ b/components/variations/variations_associated_data.cc
@@ -184,17 +184,29 @@ void AssociateGoogleVariationIDForce(IDCollectionKey key,
const std::string& trial_name,
const std::string& group_name,
VariationID id) {
- GroupMapAccessor::GetInstance()->AssociateID(
- key, MakeActiveGroupId(trial_name, group_name), id, true);
+ AssociateGoogleVariationIDForceHashes(
+ key, MakeActiveGroupId(trial_name, group_name), id);
+}
+
+void AssociateGoogleVariationIDForceHashes(IDCollectionKey key,
+ const ActiveGroupId& active_group,
+ VariationID id) {
+ GroupMapAccessor::GetInstance()->AssociateID(key, active_group, id, true);
}
VariationID GetGoogleVariationID(IDCollectionKey key,
const std::string& trial_name,
const std::string& group_name) {
- return GroupMapAccessor::GetInstance()->GetID(
+ return GetGoogleVariationIDFromHashes(
key, MakeActiveGroupId(trial_name, group_name));
}
+VariationID GetGoogleVariationIDFromHashes(
+ IDCollectionKey key,
+ const ActiveGroupId& active_group) {
+ return GroupMapAccessor::GetInstance()->GetID(key, active_group);
+}
+
bool AssociateVariationParams(
const std::string& trial_name,
const std::string& group_name,

Powered by Google App Engine
This is Rietveld 408576698