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

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

Issue 51953002: [Net] Add a priority parameter to URLRequest's constructor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 2 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 75b24ac317822880df086302d883e1233167406b..468d63458b17ff7a3adf5c1bc95c82a011e46074 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
@@ -21,6 +21,7 @@
#include "content/public/browser/notification_source.h"
#include "content/public/test/test_browser_thread.h"
#include "content/public/test/test_renderer_host.h"
+#include "net/base/request_priority.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_context.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -34,11 +35,10 @@ void AssertInterceptedIO(
net::URLRequestJobFactory* interceptor) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
net::URLRequestContext context;
- net::NetworkDelegate *network_delegate = NULL;
- net::URLRequest request(url, NULL, &context);
+ net::URLRequest request(url, net::DEFAULT_PRIORITY, NULL, &context);
scoped_refptr<net::URLRequestJob> job =
interceptor->MaybeCreateJobWithProtocolHandler(
- url.scheme(), &request, network_delegate);
+ url.scheme(), &request, context.network_delegate());
ASSERT_TRUE(job.get() != NULL);
}

Powered by Google App Engine
This is Rietveld 408576698