| Index: content/browser/loader/resource_dispatcher_host_impl.cc
|
| diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
|
| index 1e66263b635f5bb2383e156ad495d3e286b5cee5..df80da539675947ff85800099e963f3d77418af3 100644
|
| --- a/content/browser/loader/resource_dispatcher_host_impl.cc
|
| +++ b/content/browser/loader/resource_dispatcher_host_impl.cc
|
| @@ -485,7 +485,7 @@ net::Error ResourceDispatcherHostImpl::BeginDownload(
|
| } else {
|
| extra_load_flags |= net::LOAD_DISABLE_CACHE;
|
| }
|
| - request->set_load_flags(request->load_flags() | extra_load_flags);
|
| + request->SetLoadFlags(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.
|
| @@ -1037,6 +1037,15 @@ void ResourceDispatcherHostImpl::BeginRequest(
|
| 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;
|
| @@ -1052,7 +1061,7 @@ void ResourceDispatcherHostImpl::BeginRequest(
|
| headers.AddHeadersFromString(request_data.headers);
|
| request->SetExtraRequestHeaders(headers);
|
|
|
| - request->set_load_flags(load_flags);
|
| + request->SetLoadFlags(load_flags);
|
|
|
| // Resolve elements from request_body and prepare upload data.
|
| if (request_data.request_body.get()) {
|
| @@ -1299,7 +1308,7 @@ void ResourceDispatcherHostImpl::BeginSaveFile(
|
|
|
| // 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->set_load_flags(net::LOAD_PREFERRING_CACHE);
|
| + request->SetLoadFlags(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.
|
| @@ -1587,7 +1596,7 @@ void ResourceDispatcherHostImpl::BeginRequestInternal(
|
|
|
| if ((TimeTicks::Now() - last_user_gesture_time_) <
|
| TimeDelta::FromMilliseconds(kUserGestureWindowMs)) {
|
| - request->set_load_flags(
|
| + request->SetLoadFlags(
|
| request->load_flags() | net::LOAD_MAYBE_USER_GESTURE);
|
| }
|
|
|
|
|