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

Side by Side Diff: content/browser/loader/resource_scheduler.cc

Issue 12701011: [Net] Propagate priority changes from URLRequest to HttpTransaction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix leaks 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 "content/browser/loader/resource_scheduler.h" 5 #include "content/browser/loader/resource_scheduler.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "content/common/resource_messages.h" 8 #include "content/common/resource_messages.h"
9 #include "content/browser/loader/resource_message_delegate.h" 9 #include "content/browser/loader/resource_message_delegate.h"
10 #include "content/public/browser/resource_controller.h" 10 #include "content/public/browser/resource_controller.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 return handled; 58 return handled;
59 } 59 }
60 60
61 // ResourceThrottle interface: 61 // ResourceThrottle interface:
62 virtual void WillStartRequest(bool* defer) OVERRIDE { 62 virtual void WillStartRequest(bool* defer) OVERRIDE {
63 deferred_ = *defer = !ready_; 63 deferred_ = *defer = !ready_;
64 } 64 }
65 65
66 void DidChangePriority(int request_id, net::RequestPriority new_priority) { 66 void DidChangePriority(int request_id, net::RequestPriority new_priority) {
67 net::RequestPriority old_priority = request_->priority(); 67 net::RequestPriority old_priority = request_->priority();
68 request_->set_priority(new_priority); 68 request_->SetPriority(new_priority);
69 if (new_priority > old_priority) { 69 if (new_priority > old_priority) {
70 Start(); 70 Start();
71 } 71 }
72 } 72 }
73 73
74 ClientId client_id_; 74 ClientId client_id_;
75 net::URLRequest* request_; 75 net::URLRequest* request_;
76 bool ready_; 76 bool ready_;
77 bool deferred_; 77 bool deferred_;
78 ResourceScheduler* scheduler_; 78 ResourceScheduler* scheduler_;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 } 248 }
249 249
250 ResourceScheduler::Client::Client() 250 ResourceScheduler::Client::Client()
251 : has_body(false) { 251 : has_body(false) {
252 } 252 }
253 253
254 ResourceScheduler::Client::~Client() { 254 ResourceScheduler::Client::~Client() {
255 } 255 }
256 256
257 } // namespace content 257 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/browser/loader/resource_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698