Commit 3878c70d authored by Lily Chen's avatar Lily Chen Committed by Commit Bot

HatsSurveyStatusChecker: Remove use of attach_same_site_cookies param

Bug: 1068792
Change-Id: I47df5c385a7b5fc67cca14ac92a94b2d1ceb32c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2141142Reviewed-by: default avatarWei Li <weili@chromium.org>
Commit-Queue: Lily Chen <chlily@chromium.org>
Cr-Commit-Position: refs/heads/master@{#757566}
parent 8376eaeb
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "content/public/browser/storage_partition.h" #include "content/public/browser/storage_partition.h"
#include "net/base/load_flags.h" #include "net/base/load_flags.h"
#include "net/cookies/canonical_cookie.h" #include "net/cookies/canonical_cookie.h"
#include "net/cookies/site_for_cookies.h"
#include "net/http/http_status_code.h" #include "net/http/http_status_code.h"
#include "net/traffic_annotation/network_traffic_annotation.h" #include "net/traffic_annotation/network_traffic_annotation.h"
#include "services/network/public/cpp/resource_request.h" #include "services/network/public/cpp/resource_request.h"
...@@ -71,8 +72,9 @@ void HatsSurveyStatusChecker::CheckSurveyStatus( ...@@ -71,8 +72,9 @@ void HatsSurveyStatusChecker::CheckSurveyStatus(
auto request = std::make_unique<network::ResourceRequest>(); auto request = std::make_unique<network::ResourceRequest>();
std::string url_without_id(HatsSurveyURLWithoutId()); std::string url_without_id(HatsSurveyURLWithoutId());
request->url = GURL(url_without_id + site_id); request->url = GURL(url_without_id + site_id);
// Treat this request as same-site for the purposes of cookie inclusion.
request->site_for_cookies = net::SiteForCookies::FromUrl(request->url);
// Send stored cookie along with the request, but don't save any cookie. // Send stored cookie along with the request, but don't save any cookie.
request->attach_same_site_cookies = true;
request->load_flags = net::LOAD_BYPASS_CACHE | net::LOAD_DISABLE_CACHE | request->load_flags = net::LOAD_BYPASS_CACHE | net::LOAD_DISABLE_CACHE |
net::LOAD_DO_NOT_SAVE_COOKIES; net::LOAD_DO_NOT_SAVE_COOKIES;
DCHECK(!url_loader_); DCHECK(!url_loader_);
......
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