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

Side by Side Diff: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc

Issue 12701011: [Net] Propagate priority changes from URLRequest to HttpTransaction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate. h" 5 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate. h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 ScopedVector<content::ResourceThrottle>* throttles) { 141 ScopedVector<content::ResourceThrottle>* throttles) {
142 if (is_continuation_of_transferred_request) 142 if (is_continuation_of_transferred_request)
143 ChromeURLRequestUserData::Delete(request); 143 ChromeURLRequestUserData::Delete(request);
144 144
145 ChromeURLRequestUserData* user_data = 145 ChromeURLRequestUserData* user_data =
146 ChromeURLRequestUserData::Create(request); 146 ChromeURLRequestUserData::Create(request);
147 bool is_prerendering = prerender_tracker_->IsPrerenderingOnIOThread( 147 bool is_prerendering = prerender_tracker_->IsPrerenderingOnIOThread(
148 child_id, route_id); 148 child_id, route_id);
149 if (is_prerendering) { 149 if (is_prerendering) {
150 user_data->set_is_prerender(true); 150 user_data->set_is_prerender(true);
151 request->set_priority(net::IDLE); 151 request->SetPriority(net::IDLE);
152 } 152 }
153 153
154 #if defined(OS_ANDROID) 154 #if defined(OS_ANDROID)
155 if (!is_prerendering && resource_type == ResourceType::MAIN_FRAME) { 155 if (!is_prerendering && resource_type == ResourceType::MAIN_FRAME) {
156 throttles->push_back( 156 throttles->push_back(
157 components::InterceptNavigationDelegate::CreateThrottleFor(request)); 157 components::InterceptNavigationDelegate::CreateThrottleFor(request));
158 } 158 }
159 #endif 159 #endif
160 #if defined(OS_CHROMEOS) 160 #if defined(OS_CHROMEOS)
161 if (resource_type == ResourceType::MAIN_FRAME) { 161 if (resource_type == ResourceType::MAIN_FRAME) {
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 info->GetChildID(), 452 info->GetChildID(),
453 info->GetRouteID()); 453 info->GetRouteID());
454 AppendChromeSyncGaiaHeader(request, resource_context); 454 AppendChromeSyncGaiaHeader(request, resource_context);
455 #endif 455 #endif
456 456
457 if (io_data->resource_prefetch_predictor_observer()) { 457 if (io_data->resource_prefetch_predictor_observer()) {
458 io_data->resource_prefetch_predictor_observer()->OnRequestRedirected( 458 io_data->resource_prefetch_predictor_observer()->OnRequestRedirected(
459 redirect_url, request); 459 redirect_url, request);
460 } 460 }
461 } 461 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698