Commit b2d302e0 authored by Tibor Goldschwendt's avatar Tibor Goldschwendt Committed by Commit Bot

[ntp][modules] Add variation headers to shopping tasks request

This is necessary to trigger the shopping tasks experiment.

Bug: 1135401
Change-Id: I030f073dd9c4b69bed037fa8f7923d8860249b83
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2451575
Commit-Queue: Tibor Goldschwendt <tiborg@chromium.org>
Auto-Submit: Tibor Goldschwendt <tiborg@chromium.org>
Reviewed-by: default avatarMoe Ahmadi <mahmadi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814290}
parent a26e56ba
......@@ -11,6 +11,7 @@
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"
#include "components/variations/net/variations_http_headers.h"
#include "net/base/url_util.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
......@@ -92,6 +93,10 @@ void ShoppingTasksService::GetPrimaryShoppingTask(
network::mojom::CredentialsMode::kInclude;
resource_request->request_initiator =
url::Origin::Create(GURL(chrome::kChromeUINewTabURL));
variations::AppendVariationsHeaderUnknownSignedIn(
resource_request->url,
/* Modules are only shown in non-incognito. */
variations::InIncognito::kNo, resource_request.get());
loaders_.push_back(network::SimpleURLLoader::Create(
std::move(resource_request), traffic_annotation));
......
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