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

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

Issue 368903004: removing explicit enum numbering in ResourceScheduler::Client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <set> 5 #include <set>
6 6
7 #include "content/browser/loader/resource_scheduler.h" 7 #include "content/browser/loader/resource_scheduler.h"
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "content/common/resource_messages.h" 10 #include "content/common/resource_messages.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 pending_requests_.Insert(request); 302 pending_requests_.Insert(request);
303 303
304 if (new_priority_params.priority > old_priority_params.priority) { 304 if (new_priority_params.priority > old_priority_params.priority) {
305 // Check if this request is now able to load at its new priority. 305 // Check if this request is now able to load at its new priority.
306 LoadAnyStartablePendingRequests(); 306 LoadAnyStartablePendingRequests();
307 } 307 }
308 } 308 }
309 309
310 private: 310 private:
311 enum ShouldStartReqResult { 311 enum ShouldStartReqResult {
312 DO_NOT_START_REQUEST_AND_STOP_SEARCHING = -2, 312 DO_NOT_START_REQUEST_AND_STOP_SEARCHING,
313 DO_NOT_START_REQUEST_AND_KEEP_SEARCHING = -1, 313 DO_NOT_START_REQUEST_AND_KEEP_SEARCHING,
314 START_REQUEST = 1, 314 START_REQUEST,
mmenke 2014/07/08 18:16:16 nit: While you're here, these should only be inde
315 }; 315 };
316 316
317 void InsertInFlightRequest(ScheduledResourceRequest* request) { 317 void InsertInFlightRequest(ScheduledResourceRequest* request) {
318 in_flight_requests_.insert(request); 318 in_flight_requests_.insert(request);
319 if (IsDelayableRequest(request)) 319 if (IsDelayableRequest(request))
320 SetRequestDelayable(request, true); 320 SetRequestDelayable(request, true);
321 } 321 }
322 322
323 void EraseInFlightRequest(ScheduledResourceRequest* request) { 323 void EraseInFlightRequest(ScheduledResourceRequest* request) {
324 size_t erased = in_flight_requests_.erase(request); 324 size_t erased = in_flight_requests_.erase(request);
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 client->ReprioritizeRequest( 648 client->ReprioritizeRequest(
649 request, old_priority_params, new_priority_params); 649 request, old_priority_params, new_priority_params);
650 } 650 }
651 651
652 ResourceScheduler::ClientId ResourceScheduler::MakeClientId( 652 ResourceScheduler::ClientId ResourceScheduler::MakeClientId(
653 int child_id, int route_id) { 653 int child_id, int route_id) {
654 return (static_cast<ResourceScheduler::ClientId>(child_id) << 32) | route_id; 654 return (static_cast<ResourceScheduler::ClientId>(child_id) << 32) | route_id;
655 } 655 }
656 656
657 } // namespace content 657 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698