Index: components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc |
diff --git a/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc b/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc |
index 1959a86f0c86aa63ecc8b52d56485d73019906d0..9715630f5e8420171d5e48af63623eff8b7ad1fe 100644 |
--- a/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc |
+++ b/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc |
@@ -121,15 +121,16 @@ class TestIOThreadState { |
RedirectMode redirect_mode, |
MockInterceptCallbackReceiver* callback_receiver) |
: resource_context_(&test_url_request_context_), |
- request_(url, |
- net::DEFAULT_PRIORITY, |
- NULL, |
- resource_context_.GetRequestContext()) { |
+ request_(resource_context_.GetRequestContext()->CreateRequest( |
+ url, |
+ net::DEFAULT_PRIORITY, |
+ NULL /* delegate */, |
+ NULL /* cookie_store */)) { |
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); |
if (render_process_id != MSG_ROUTING_NONE && |
render_frame_id != MSG_ROUTING_NONE) { |
content::ResourceRequestInfo::AllocateForTesting( |
- &request_, |
+ request_.get(), |
content::RESOURCE_TYPE_MAIN_FRAME, |
&resource_context_, |
render_process_id, |
@@ -138,15 +139,15 @@ class TestIOThreadState { |
false); |
} |
throttle_.reset(new InterceptNavigationResourceThrottle( |
- &request_, |
+ request_.get(), |
base::Bind(&MockInterceptCallbackReceiver::ShouldIgnoreNavigation, |
base::Unretained(callback_receiver)))); |
throttle_->set_controller_for_testing(&throttle_controller_); |
- request_.set_method(request_method); |
+ request_->set_method(request_method); |
if (redirect_mode == REDIRECT_MODE_302) { |
net::HttpResponseInfo& response_info = |
- const_cast<net::HttpResponseInfo&>(request_.response_info()); |
+ const_cast<net::HttpResponseInfo&>(request_->response_info()); |
response_info.headers = new net::HttpResponseHeaders( |
"Status: 302 Found\0\0"); |
} |
@@ -175,7 +176,7 @@ class TestIOThreadState { |
private: |
net::TestURLRequestContext test_url_request_context_; |
content::MockResourceContext resource_context_; |
- net::URLRequest request_; |
+ scoped_ptr<net::URLRequest> request_; |
scoped_ptr<InterceptNavigationResourceThrottle> throttle_; |
MockResourceController throttle_controller_; |
}; |