Commit ccfafc3b authored by Caitlin Fischer's avatar Caitlin Fischer Committed by Commit Bot

Add support for GoogleWebVisibility to Study.

This change paves the way for limiting the set of experiment IDs
included in X-Client-Data headers sent in third-party contexts.

Bug: 1094303
Change-Id: Ib5b094e1fa9aa1e508d9b8f14886d69ce18cbfa4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363076Reviewed-by: default avatarAlexei Svitkine <asvitkine@chromium.org>
Commit-Queue: Alexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799300}
parent 04b837a9
...@@ -45,9 +45,28 @@ message Study { ...@@ -45,9 +45,28 @@ message Study {
// Ex: "default" // Ex: "default"
optional string default_experiment_name = 8; optional string default_experiment_name = 8;
// Specifies under which conditions a |google_web_experiment_id| or
// |google_web_trigger_experiment_id| is visible to Google web properties.
enum GoogleWebVisibility {
// Eligible requests to Google web properties include the experiment ID. See
// AppendHeaderIfNeeded() in variations_http_headers.cc for eligibility
// details.
ANY = 0;
// Only eligible requests initiated from a first-party context include the
// experiment ID.
//
// The following requests are considered to be from a first-party context:
// requests initiated by (i) the browser, (ii) a Chrome internal page,
// (iii) a main frame with a Google-owned domain, and (iv) a subframe
// whose associated main frame has a Google-owned domain. See
// IsFirstPartyContext() in variations_http_headers.cc for more details.
FIRST_PARTY = 1;
}
// An experiment within the study. // An experiment within the study.
// //
// Next tag: 16 // Next tag: 17
message Experiment { message Experiment {
// A named parameter value for this experiment. // A named parameter value for this experiment.
// //
...@@ -76,6 +95,10 @@ message Study { ...@@ -76,6 +95,10 @@ message Study {
// behavior on Google web properties. // behavior on Google web properties.
optional uint64 google_web_trigger_experiment_id = 8; optional uint64 google_web_trigger_experiment_id = 8;
// Optional id that specifies under which conditions Google web and web
// trigger experiment ids are visible to Google web properties.
optional GoogleWebVisibility google_web_visibility = 16;
// Optional id used to uniquely identify this experiment for Chrome Sync. // Optional id used to uniquely identify this experiment for Chrome Sync.
optional uint64 chrome_sync_experiment_id = 10; optional uint64 chrome_sync_experiment_id = 10;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment