summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authordavidben <davidben@chromium.org>2015-03-23 11:48:36 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-23 18:49:16 +0000
commit151423e1851b45000257ef2d32ee0984a24133c7 (patch)
treecea7e7af8cf5771d650b8a72ebf74a887a4b8f94 /components
parent8758634a7c0c79481469f50c9c8f1c580169adec (diff)
downloadchromium_src-151423e1851b45000257ef2d32ee0984a24133c7.zip
chromium_src-151423e1851b45000257ef2d32ee0984a24133c7.tar.gz
chromium_src-151423e1851b45000257ef2d32ee0984a24133c7.tar.bz2
Remove prerender cookie store, part 4.
This removes the ability to pass in a custom CookieStore to a URLRequest. It's a small change to net/url_request which then balloons to everything in the project that ever makes a URLRequest. This reverts the rest of https://codereview.chromium.org/188693003 (and then does a whole lot more because URLRequest constructors were unified recently to always require passing in the fourth argument). BUG=457344 Review URL: https://codereview.chromium.org/1003953008 Cr-Commit-Position: refs/heads/master@{#321820}
Diffstat (limited to 'components')
-rw-r--r--components/cronet/android/cronet_url_request_adapter.cc2
-rw-r--r--components/cronet/android/url_request_adapter.cc2
-rw-r--r--components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_resource_throttle_unittest.cc2
-rw-r--r--components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_ui_manager_unittest.cc2
-rw-r--r--components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc7
-rw-r--r--components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc8
-rw-r--r--components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data_unittest.cc2
-rw-r--r--components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics_unittest.cc2
-rw-r--r--components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc2
-rw-r--r--components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats_unittest.cc7
-rw-r--r--components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc3
-rw-r--r--components/policy/core/common/cloud/policy_header_io_helper_unittest.cc8
-rw-r--r--components/policy/core/common/cloud/policy_header_service_unittest.cc4
-rw-r--r--components/webp_transcode/webp_network_client_unittest.mm3
14 files changed, 24 insertions, 30 deletions
diff --git a/components/cronet/android/cronet_url_request_adapter.cc b/components/cronet/android/cronet_url_request_adapter.cc
index 80e1c63..ff36601 100644
--- a/components/cronet/android/cronet_url_request_adapter.cc
+++ b/components/cronet/android/cronet_url_request_adapter.cc
@@ -71,7 +71,7 @@ void CronetURLRequestAdapter::Start() {
<< initial_url_.possibly_invalid_spec().c_str()
<< " priority: " << RequestPriorityToString(initial_priority_);
url_request_ = context_->GetURLRequestContext()->CreateRequest(
- initial_url_, net::DEFAULT_PRIORITY, this, NULL);
+ initial_url_, net::DEFAULT_PRIORITY, this);
url_request_->SetLoadFlags(load_flags_);
url_request_->set_method(initial_method_);
url_request_->SetExtraRequestHeaders(initial_request_headers_);
diff --git a/components/cronet/android/url_request_adapter.cc b/components/cronet/android/url_request_adapter.cc
index 52c97bd..59d2aed 100644
--- a/components/cronet/android/url_request_adapter.cc
+++ b/components/cronet/android/url_request_adapter.cc
@@ -144,7 +144,7 @@ void URLRequestAdapter::OnInitiateConnection() {
<< url_.possibly_invalid_spec().c_str()
<< " priority: " << RequestPriorityToString(priority_);
url_request_ = context_->GetURLRequestContext()->CreateRequest(
- url_, net::DEFAULT_PRIORITY, this, NULL);
+ url_, net::DEFAULT_PRIORITY, this);
int flags = net::LOAD_DO_NOT_SAVE_COOKIES | net::LOAD_DO_NOT_SEND_COOKIES;
if (context_->load_disable_cache())
flags |= net::LOAD_DISABLE_CACHE;
diff --git a/components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_resource_throttle_unittest.cc b/components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_resource_throttle_unittest.cc
index cca6bfa..e7e3789 100644
--- a/components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_resource_throttle_unittest.cc
+++ b/components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_resource_throttle_unittest.cc
@@ -73,7 +73,7 @@ class DataReductionProxyDebugResourceThrottleTest : public testing::Test {
.WithMockConfig()
.Build();
request_ = context_.CreateRequest(GURL("http://www.google.com/"), net::IDLE,
- &delegate_, NULL);
+ &delegate_);
ui_service_.reset(new ContentDataReductionProxyDebugUIService(
base::Bind(
&DataReductionProxyDebugResourceThrottleTest::
diff --git a/components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_ui_manager_unittest.cc b/components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_ui_manager_unittest.cc
index a6caefe..d0da16b 100644
--- a/components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_ui_manager_unittest.cc
+++ b/components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_ui_manager_unittest.cc
@@ -62,7 +62,7 @@ class DataReductionProxyDebugUIManagerTest
public:
DataReductionProxyDebugUIManagerTest()
: state_(NOT_CALLED),
- request_(context_.CreateRequest(GURL(), net::IDLE, &delegate_, NULL)) {
+ request_(context_.CreateRequest(GURL(), net::IDLE, &delegate_)) {
ui_manager_ = new TestDataReductionProxyDebugUIManager(
content::BrowserThread::GetMessageLoopProxyForThread(
content::BrowserThread::UI),
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc
index ba34dc7..281b308 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc
@@ -251,8 +251,7 @@ class DataReductionProxyProtocolTest : public testing::Test {
scoped_ptr<URLRequest> r(context_->CreateRequest(
GURL("http://www.google.com/"),
net::DEFAULT_PRIORITY,
- &d,
- NULL));
+ &d));
r->set_method(method);
r->SetLoadFlags(net::LOAD_NORMAL);
@@ -358,7 +357,6 @@ TEST_F(DataReductionProxyProtocolTest, TestIdempotency) {
scoped_ptr<net::URLRequest> request(
context.CreateRequest(GURL("http://www.google.com/"),
net::DEFAULT_PRIORITY,
- NULL,
NULL));
request->set_method(tests[i].method);
EXPECT_EQ(
@@ -852,8 +850,7 @@ TEST_F(DataReductionProxyProtocolTest,
scoped_ptr<URLRequest> r(context_->CreateRequest(
GURL("http://www.google.com/"),
net::DEFAULT_PRIORITY,
- &d,
- NULL));
+ &d));
r->set_method("GET");
r->SetLoadFlags(net::LOAD_NORMAL);
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc
index 57c8beb..10b91ed 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc
@@ -158,7 +158,7 @@ TEST_F(DataReductionProxyInterceptorTest, TestJobFactoryChaining) {
net::TestDelegate d;
scoped_ptr<net::URLRequest> req(default_context_->CreateRequest(
- GURL("http://foo"), net::DEFAULT_PRIORITY, &d, nullptr));
+ GURL("http://foo"), net::DEFAULT_PRIORITY, &d));
req->Start();
base::RunLoop().Run();
@@ -252,7 +252,7 @@ TEST_F(DataReductionProxyInterceptorWithServerTest, TestBypass) {
net::TestDelegate delegate;
scoped_ptr<net::URLRequest> request(
context().CreateRequest(direct().GetURL("/block10.html"),
- net::DEFAULT_PRIORITY, &delegate, NULL));
+ net::DEFAULT_PRIORITY, &delegate));
request->Start();
EXPECT_TRUE(request->is_pending());
base::RunLoop().Run();
@@ -266,7 +266,7 @@ TEST_F(DataReductionProxyInterceptorWithServerTest, TestNoBypass) {
net::TestDelegate delegate;
scoped_ptr<net::URLRequest> request(
context().CreateRequest(direct().GetURL("/noblock.html"),
- net::DEFAULT_PRIORITY, &delegate, NULL));
+ net::DEFAULT_PRIORITY, &delegate));
request->Start();
EXPECT_TRUE(request->is_pending());
base::RunLoop().Run();
@@ -310,7 +310,7 @@ class DataReductionProxyInterceptorEndToEndTest : public testing::Test {
// it. Returns the created URLRequest.
scoped_ptr<net::URLRequest> CreateAndExecuteRequest(const GURL& url) {
scoped_ptr<net::URLRequest> request(
- context_.CreateRequest(url, net::IDLE, &delegate_, NULL));
+ context_.CreateRequest(url, net::IDLE, &delegate_));
request->Start();
drp_test_context_->RunUntilIdle();
return request.Pass();
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data_unittest.cc
index e877e85..0d240e9 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data_unittest.cc
@@ -103,7 +103,7 @@ TEST_F(DataReductionProxyIODataTest, TestConstruction) {
// DataReductionProxyNetworkDelegateTest.
scoped_ptr<net::URLRequest> fake_request =
context().CreateRequest(
- GURL("http://www.foo.com/"), net::IDLE, delegate(), NULL);
+ GURL("http://www.foo.com/"), net::IDLE, delegate());
CountingNetworkDelegate* wrapped_network_delegate =
new CountingNetworkDelegate();
scoped_ptr<DataReductionProxyNetworkDelegate> network_delegate =
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics_unittest.cc
index 87df9bfe..1abf5c2 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics_unittest.cc
@@ -787,7 +787,7 @@ TEST_F(ChromeNetworkDailyDataSavingMetricsTest,
net::TestDelegate delegate;
scoped_ptr<net::URLRequest> request =
- context.CreateRequest(test_case.url, net::IDLE, &delegate, nullptr);
+ context.CreateRequest(test_case.url, net::IDLE, &delegate);
request->SetLoadFlags(test_case.load_flags);
request->Start();
test_context->RunUntilIdle();
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc
index f88505a..d3b534f 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc
@@ -107,7 +107,7 @@ class DataReductionProxyNetworkDelegateTest : public testing::Test {
const std::string& raw_response_headers,
int64 response_content_length) {
scoped_ptr<net::URLRequest> request = context_.CreateRequest(
- url, net::IDLE, &delegate_, NULL);
+ url, net::IDLE, &delegate_);
// Create a test job that will fill in the given response headers for the
// |fake_request|.
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats_unittest.cc
index ac75479..d5c2e68 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats_unittest.cc
@@ -81,15 +81,14 @@ class DataReductionProxyUsageStatsTest : public testing::Test {
~TestDataReductionProxyParams::HAS_DEV_FALLBACK_ORIGIN)
.WithMockConfig()
.Build();
- mock_url_request_ = context_.CreateRequest(GURL(), net::IDLE, &delegate_,
- NULL);
+ mock_url_request_ = context_.CreateRequest(GURL(), net::IDLE, &delegate_);
}
scoped_ptr<net::URLRequest> CreateURLRequestWithResponseHeaders(
const GURL& url,
const std::string& raw_response_headers) {
scoped_ptr<net::URLRequest> fake_request = context_.CreateRequest(
- url, net::IDLE, &delegate_, NULL);
+ url, net::IDLE, &delegate_);
// Create a test job that will fill in the given response headers for the
// |fake_request|.
@@ -622,7 +621,7 @@ class DataReductionProxyUsageStatsEndToEndTest : public testing::Test {
}
scoped_ptr<net::URLRequest> request(
- context_.CreateRequest(url, net::IDLE, &delegate_, NULL));
+ context_.CreateRequest(url, net::IDLE, &delegate_));
request->set_method("GET");
request->SetLoadFlags(net::LOAD_NORMAL);
request->Start();
diff --git a/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc b/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc
index 52ba76a..3640e8f 100644
--- a/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc
+++ b/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc
@@ -118,8 +118,7 @@ class TestIOThreadState {
request_(resource_context_.GetRequestContext()->CreateRequest(
url,
net::DEFAULT_PRIORITY,
- NULL /* delegate */,
- NULL /* cookie_store */)) {
+ NULL /* delegate */)) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
if (render_process_id != MSG_ROUTING_NONE &&
render_frame_id != MSG_ROUTING_NONE) {
diff --git a/components/policy/core/common/cloud/policy_header_io_helper_unittest.cc b/components/policy/core/common/cloud/policy_header_io_helper_unittest.cc
index cbec8f39..3a5adf8 100644
--- a/components/policy/core/common/cloud/policy_header_io_helper_unittest.cc
+++ b/components/policy/core/common/cloud/policy_header_io_helper_unittest.cc
@@ -52,14 +52,14 @@ class PolicyHeaderIOHelperTest : public testing::Test {
TEST_F(PolicyHeaderIOHelperTest, InitialHeader) {
scoped_ptr<net::URLRequest> request(context_.CreateRequest(
- GURL(kDMServerURL), net::DEFAULT_PRIORITY, NULL, NULL));
+ GURL(kDMServerURL), net::DEFAULT_PRIORITY, NULL));
helper_->AddPolicyHeaders(request->url(), request.get());
ValidateHeader(request->extra_request_headers(), kInitialPolicyHeader);
}
TEST_F(PolicyHeaderIOHelperTest, NoHeaderOnNonMatchingURL) {
scoped_ptr<net::URLRequest> request(context_.CreateRequest(
- GURL("http://non-matching.com"), net::DEFAULT_PRIORITY, NULL, NULL));
+ GURL("http://non-matching.com"), net::DEFAULT_PRIORITY, NULL));
helper_->AddPolicyHeaders(request->url(), request.get());
EXPECT_TRUE(request->extra_request_headers().IsEmpty());
}
@@ -69,7 +69,7 @@ TEST_F(PolicyHeaderIOHelperTest, HeaderChange) {
helper_->UpdateHeader(new_header);
task_runner_->RunUntilIdle();
scoped_ptr<net::URLRequest> request(context_.CreateRequest(
- GURL(kDMServerURL), net::DEFAULT_PRIORITY, NULL, NULL));
+ GURL(kDMServerURL), net::DEFAULT_PRIORITY, NULL));
helper_->AddPolicyHeaders(request->url(), request.get());
ValidateHeader(request->extra_request_headers(), new_header);
}
@@ -78,7 +78,7 @@ TEST_F(PolicyHeaderIOHelperTest, ChangeToNoHeader) {
helper_->UpdateHeader("");
task_runner_->RunUntilIdle();
scoped_ptr<net::URLRequest> request(context_.CreateRequest(
- GURL(kDMServerURL), net::DEFAULT_PRIORITY, NULL, NULL));
+ GURL(kDMServerURL), net::DEFAULT_PRIORITY, NULL));
helper_->AddPolicyHeaders(request->url(), request.get());
EXPECT_TRUE(request->extra_request_headers().IsEmpty());
}
diff --git a/components/policy/core/common/cloud/policy_header_service_unittest.cc b/components/policy/core/common/cloud/policy_header_service_unittest.cc
index 2903ec4..7d5c752 100644
--- a/components/policy/core/common/cloud/policy_header_service_unittest.cc
+++ b/components/policy/core/common/cloud/policy_header_service_unittest.cc
@@ -109,7 +109,7 @@ TEST_F(PolicyHeaderServiceTest, TestWithAndWithoutPolicyHeader) {
net::TestURLRequestContext context;
scoped_ptr<net::URLRequest> request(context.CreateRequest(
- GURL(kDMServerURL), net::DEFAULT_PRIORITY, NULL, NULL));
+ GURL(kDMServerURL), net::DEFAULT_PRIORITY, NULL));
helper_->AddPolicyHeaders(request->url(), request.get());
ValidateHeader(request->extra_request_headers(), expected_dmtoken,
expected_policy_token);
@@ -119,7 +119,7 @@ TEST_F(PolicyHeaderServiceTest, TestWithAndWithoutPolicyHeader) {
task_runner_->RunUntilIdle();
scoped_ptr<net::URLRequest> request2(context.CreateRequest(
- GURL(kDMServerURL), net::DEFAULT_PRIORITY, NULL, NULL));
+ GURL(kDMServerURL), net::DEFAULT_PRIORITY, NULL));
helper_->AddPolicyHeaders(request2->url(), request2.get());
ValidateHeader(request2->extra_request_headers(), "", "");
}
diff --git a/components/webp_transcode/webp_network_client_unittest.mm b/components/webp_transcode/webp_network_client_unittest.mm
index da0ec0b..c5c425b 100644
--- a/components/webp_transcode/webp_network_client_unittest.mm
+++ b/components/webp_transcode/webp_network_client_unittest.mm
@@ -60,8 +60,7 @@ TEST_F(WebPNetworkClientTest, TestAcceptHeaders) {
new net::TestURLRequestContext(false));
for (size_t i = 0; i < arraysize(tests); ++i) {
scoped_ptr<net::URLRequest> request =
- request_context->CreateRequest(url, net::DEFAULT_PRIORITY, nullptr,
- nullptr).Pass();
+ request_context->CreateRequest(url, net::DEFAULT_PRIORITY, nullptr);
if (!tests[i].header_in.empty())
request->SetExtraRequestHeaderByName("Accept", tests[i].header_in, true);
[webp_client_ didCreateNativeRequest:request.get()];