Commit 5b5afc05 authored by Becca Hughes's avatar Becca Hughes Committed by Commit Bot

Add variations header to NTP module request

Adds the variations header that communicates
experiment state to the server. This will be used
for launch gating.

Change-Id: If0b8d3175bd4856a0e255d67792da424f0ce80bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2463551
Auto-Submit: Becca Hughes <beccahughes@chromium.org>
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Reviewed-by: default avatarTommy Steimel <steimel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#815742}
parent 648203ad
......@@ -17,6 +17,7 @@
#include "chrome/browser/media/kaleidoscope/kaleidoscope_switches.h"
#include "chrome/browser/profiles/profile.h"
#include "components/prefs/pref_service.h"
#include "components/variations/net/variations_http_headers.h"
#include "content/public/browser/storage_partition.h"
#include "media/base/media_switches.h"
#include "net/base/load_flags.h"
......@@ -95,6 +96,12 @@ class GetCollectionsRequest {
resource_request->headers.SetHeader("X-Goog-Encode-Response-If-Executable",
"base64");
variations::AppendVariationsHeader(
resource_request->url, variations::InIncognito::kNo,
credentials->access_token.has_value() ? variations::SignedIn::kYes
: variations::SignedIn::kNo,
resource_request.get());
resource_request->headers.SetHeader(net::HttpRequestHeaders::kContentType,
kRequestContentType);
pending_request_ = network::SimpleURLLoader::Create(
......
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