summaryrefslogtreecommitdiffstats
path: root/cloud_print
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 /cloud_print
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 'cloud_print')
-rw-r--r--cloud_print/service/service_state.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/cloud_print/service/service_state.cc b/cloud_print/service/service_state.cc
index 68d3a89..fff7694 100644
--- a/cloud_print/service/service_state.cc
+++ b/cloud_print/service/service_state.cc
@@ -13,6 +13,7 @@
#include "net/base/escape.h"
#include "net/base/io_buffer.h"
#include "net/base/load_flags.h"
+#include "net/base/request_priority.h"
#include "net/base/upload_bytes_element_reader.h"
#include "net/base/upload_data_stream.h"
#include "net/url_request/url_request.h"
@@ -174,7 +175,8 @@ std::string ServiceState::LoginToGoogle(const std::string& service,
post_body += "&source=" + net::EscapeUrlEncodedData("CP-Service", true);
post_body += "&service=" + net::EscapeUrlEncodedData(service, true);
- net::URLRequest request(url, &fetcher_delegate, context.get());
+ net::URLRequest request(
+ url, net::DEFAULT_PRIORITY, &fetcher_delegate, context.get());
int load_flags = request.load_flags();
load_flags = load_flags | net::LOAD_DO_NOT_SEND_COOKIES;
load_flags = load_flags | net::LOAD_DO_NOT_SAVE_COOKIES;