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

Unified Diff: trunk/src/content/browser/loader/resource_dispatcher_host_impl.cc

Issue 47563006: Revert 232802 "[Net] Assert that URLRequests with LOAD_IGNORE_LI..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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: trunk/src/content/browser/loader/resource_dispatcher_host_impl.cc
===================================================================
--- trunk/src/content/browser/loader/resource_dispatcher_host_impl.cc (revision 232831)
+++ trunk/src/content/browser/loader/resource_dispatcher_host_impl.cc (working copy)
@@ -473,7 +473,7 @@
} else {
extra_load_flags |= net::LOAD_DISABLE_CACHE;
}
- request->SetLoadFlags(request->load_flags() | extra_load_flags);
+ request->set_load_flags(request->load_flags() | extra_load_flags);
// No need to get offline load flags for downloads, but make sure
// we have an OfflinePolicy to receive request completions.
@@ -1027,15 +1027,6 @@
load_flags |= offline_policy_map_[id]->GetAdditionalLoadFlags(
load_flags, request_data.resource_type == ResourceType::MAIN_FRAME);
- // Sync loads should have maximum priority and should be the only
- // requets that have the ignore limits flag set.
- if (is_sync_load) {
- DCHECK_EQ(request_data.priority, net::MAXIMUM_PRIORITY);
- DCHECK_NE(load_flags & net::LOAD_IGNORE_LIMITS, 0);
- } else {
- DCHECK_EQ(load_flags & net::LOAD_IGNORE_LIMITS, 0);
- }
-
// Construct the request.
scoped_ptr<net::URLRequest> new_request;
net::URLRequest* request;
@@ -1051,7 +1042,7 @@
headers.AddHeadersFromString(request_data.headers);
request->SetExtraRequestHeaders(headers);
- request->SetLoadFlags(load_flags);
+ request->set_load_flags(load_flags);
// Resolve elements from request_body and prepare upload data.
if (request_data.request_body.get()) {
@@ -1294,7 +1285,7 @@
// So far, for saving page, we need fetch content from cache, in the
// future, maybe we can use a configuration to configure this behavior.
- request->SetLoadFlags(net::LOAD_PREFERRING_CACHE);
+ request->set_load_flags(net::LOAD_PREFERRING_CACHE);
// No need to get offline load flags for save files, but make sure
// we have an OfflinePolicy to receive request completions.
@@ -1581,7 +1572,7 @@
if ((TimeTicks::Now() - last_user_gesture_time_) <
TimeDelta::FromMilliseconds(kUserGestureWindowMs)) {
- request->SetLoadFlags(
+ request->set_load_flags(
request->load_flags() | net::LOAD_MAYBE_USER_GESTURE);
}
« no previous file with comments | « trunk/src/content/browser/download/download_manager_impl.cc ('k') | trunk/src/content/browser/loader/resource_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698