Add capability to restrict variations studies by country.
commit761459b405fb12f703ce6f9636406815368ad3b4
authorsclittle <sclittle@chromium.org>
Thu, 7 May 2015 23:40:17 +0000 (7 16:40 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 7 May 2015 23:40:44 +0000 (7 23:40 +0000)
treec7c6a0d107da10ed721ffccb50f5c01ade8cf642
parent4cf7a62e423cdff018ffa3c4a60e5c7df0068fc8
Add capability to restrict variations studies by country.

This CL adds two new optional filter parameters to studies, "country"
and "exclude_country", that allow studies to be enabled or disabled in
specific countries.

The country code is supplied by the variations server as part of the
variations seed response. Chrome uses the latest country code received
for filtering session-consistency studies. For permanent-consistency
field trials, Chrome uses the first country code received for the
current Chrome version.

BUG=477039

Review URL: https://codereview.chromium.org/1122083004

Cr-Commit-Position: refs/heads/master@{#328879}
16 files changed:
chrome/browser/metrics/variations/variations_service.cc
chrome/browser/metrics/variations/variations_service.h
chrome/browser/metrics/variations/variations_service_unittest.cc
chrome/common/pref_names.cc
chrome/common/pref_names.h
components/variations/proto/study.proto
components/variations/proto/variations_seed.proto
components/variations/study_filtering.cc
components/variations/study_filtering.h
components/variations/study_filtering_unittest.cc
components/variations/variations_seed_processor.cc
components/variations/variations_seed_processor.h
components/variations/variations_seed_processor_unittest.cc
components/variations/variations_seed_simulator.cc
components/variations/variations_seed_simulator.h
tools/metrics/histograms/histograms.xml