summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-31 22:05:19 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-31 22:05:19 +0000
commit2ca01e54e2a4b4aa3996dc6a5eb83def3dd4cab1 (patch)
tree65eae8674a5f174856f79a2d14758b271aa33843 /chrome_frame
parent93b7afd44a79bfdc4ce282cd6a848671b14762f9 (diff)
downloadchromium_src-2ca01e54e2a4b4aa3996dc6a5eb83def3dd4cab1.zip
chromium_src-2ca01e54e2a4b4aa3996dc6a5eb83def3dd4cab1.tar.gz
chromium_src-2ca01e54e2a4b4aa3996dc6a5eb83def3dd4cab1.tar.bz2
[Net] Add a priority parameter to URLRequest's constructor
This is so that it is clearer what the intended initial priority of a URLRequest is. It is also needed so that we can later enforce that if a URLRequest is set to ignore limits, it has MAXIMUM_PRIORITY; otherwise, we'd have to mandate that SetPriority() is called before set_load_flags(), which is fiddly. Also standardize on a single URLRequest constructor. BUG=166689 R=jam@chromium.org, jamesr@chromium.org, joth@chromium.org, mmenke@chromium.org, scottbyer@chromium.org, sky@chromium.org, tommi@chromium.org Review URL: https://codereview.chromium.org/51953002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232219 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/test/test_server_test.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome_frame/test/test_server_test.cc b/chrome_frame/test/test_server_test.cc
index 74c8c97..92d8e0e 100644
--- a/chrome_frame/test/test_server_test.cc
+++ b/chrome_frame/test/test_server_test.cc
@@ -11,6 +11,7 @@
#include "base/strings/stringprintf.h"
#include "base/win/scoped_handle.h"
#include "chrome_frame/test/test_server.h"
+#include "net/base/request_priority.h"
#include "net/cookies/cookie_monster.h"
#include "net/disk_cache/disk_cache.h"
#include "net/dns/host_resolver_proc.h"
@@ -64,10 +65,10 @@ class ScopedInternet {
class TestURLRequest : public net::URLRequest {
public:
TestURLRequest(const GURL& url,
+ net::RequestPriority priority,
Delegate* delegate,
- net::TestURLRequestContext* context)
- : net::URLRequest(url, delegate, context) {
- }
+ const net::TestURLRequestContext* context)
+ : net::URLRequest(url, priority, delegate, context) {}
};
class UrlTaskChain {
@@ -82,7 +83,7 @@ class UrlTaskChain {
base::MessageLoopForIO loop;
net::TestURLRequestContext context;
- TestURLRequest r(GURL(url_), &delegate_, &context);
+ TestURLRequest r(GURL(url_), net::DEFAULT_PRIORITY, &delegate_, &context);
r.Start();
EXPECT_TRUE(r.is_pending());