Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5526)

Unified Diff: chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc

Issue 407093011: Allow URLRequests from one context to have different NetworkDelegates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix new tests Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
index c3a9a1f43fc86dc429da9e384ae32b9821c268e3..d6b85a8f92ee288db3d4c2affd8d70b89503536b 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
@@ -36,10 +36,11 @@ void AssertInterceptedIO(
net::URLRequestJobFactory* interceptor) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
net::URLRequestContext context;
- net::URLRequest request(url, net::DEFAULT_PRIORITY, NULL, &context);
+ scoped_ptr<net::URLRequest> request(context.CreateRequest(
+ url, net::DEFAULT_PRIORITY, NULL, NULL));
scoped_refptr<net::URLRequestJob> job =
interceptor->MaybeCreateJobWithProtocolHandler(
- url.scheme(), &request, context.network_delegate());
+ url.scheme(), request.get(), context.network_delegate());
ASSERT_TRUE(job.get() != NULL);
}

Powered by Google App Engine
This is Rietveld 408576698