Skip to content

Commit

Permalink
Move loading_test_util.cc off the deprecated URLRequestContext::Creat…
Browse files Browse the repository at this point in the history
…eRequest()

CreateRequest() needs to take in a traffic annotation.

Bug: 837333
Change-Id: Iaa4b8e0cbff89a4ffff4afef9c9cc6accdaba26f
Reviewed-on: https://chromium-review.googlesource.com/1039124
Reviewed-by: Alexandr Ilin <alexilin@chromium.org>
Commit-Queue: Helen Li <xunjieli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555377}
  • Loading branch information
Helen Li authored and Commit Bot committed May 2, 2018
1 parent 5274977 commit 63ce1d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chrome/browser/predictors/loading_test_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "content/public/browser/resource_request_info.h"
#include "net/http/http_response_headers.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "net/url_request/url_request_test_util.h"

namespace {
Expand Down Expand Up @@ -233,7 +234,8 @@ std::unique_ptr<net::URLRequest> CreateURLRequest(
content::ResourceType resource_type,
bool is_main_frame) {
std::unique_ptr<net::URLRequest> request = url_request_context.CreateRequest(
url, priority, &g_empty_url_request_delegate);
url, priority, &g_empty_url_request_delegate,
TRAFFIC_ANNOTATION_FOR_TESTS);
request->set_site_for_cookies(url);
content::ResourceRequestInfo::AllocateForTesting(
request.get(), resource_type, nullptr, -1, -1, -1, is_main_frame, false,
Expand Down

0 comments on commit 63ce1d9

Please sign in to comment.