OLD | NEW |
---|---|
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 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
627 bool has_body_; | 627 bool has_body_; |
628 bool using_spdy_proxy_; | 628 bool using_spdy_proxy_; |
629 RequestQueue pending_requests_; | 629 RequestQueue pending_requests_; |
630 RequestSet in_flight_requests_; | 630 RequestSet in_flight_requests_; |
631 ResourceScheduler* scheduler_; | 631 ResourceScheduler* scheduler_; |
632 // The number of delayable in-flight requests. | 632 // The number of delayable in-flight requests. |
633 size_t total_delayable_count_; | 633 size_t total_delayable_count_; |
634 ResourceScheduler::ClientThrottleState throttle_state_; | 634 ResourceScheduler::ClientThrottleState throttle_state_; |
635 }; | 635 }; |
636 | 636 |
637 ResourceScheduler::ResourceScheduler() : active_clients_loading_(0) { | 637 ResourceScheduler::ResourceScheduler(): active_clients_loading_(0), |
mmenke
2014/07/16 17:37:02
nit: Need another space before the colon.
| |
638 should_throttle(false), | |
639 should_coalesce(false) { | |
638 } | 640 } |
639 | 641 |
640 ResourceScheduler::~ResourceScheduler() { | 642 ResourceScheduler::~ResourceScheduler() { |
641 DCHECK(unowned_requests_.empty()); | 643 DCHECK(unowned_requests_.empty()); |
642 DCHECK(client_map_.empty()); | 644 DCHECK(client_map_.empty()); |
643 } | 645 } |
644 | 646 |
645 void ResourceScheduler::SetThrottleOptionsForTesting(bool should_throttle, | 647 void ResourceScheduler::SetThrottleOptionsForTesting(bool should_throttle, |
646 bool should_coalesce) { | 648 bool should_coalesce) { |
647 should_coalesce_ = should_coalesce; | 649 should_coalesce_ = should_coalesce; |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
881 client->ReprioritizeRequest( | 883 client->ReprioritizeRequest( |
882 request, old_priority_params, new_priority_params); | 884 request, old_priority_params, new_priority_params); |
883 } | 885 } |
884 | 886 |
885 ResourceScheduler::ClientId ResourceScheduler::MakeClientId( | 887 ResourceScheduler::ClientId ResourceScheduler::MakeClientId( |
886 int child_id, int route_id) { | 888 int child_id, int route_id) { |
887 return (static_cast<ResourceScheduler::ClientId>(child_id) << 32) | route_id; | 889 return (static_cast<ResourceScheduler::ClientId>(child_id) << 32) | route_id; |
888 } | 890 } |
889 | 891 |
890 } // namespace content | 892 } // namespace content |
OLD | NEW |