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

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

Issue 391393002: Fix for uninitialized access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix initilization ordering. 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 | content/browser/loader/resource_scheduler_unittest.cc » ('j') | 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 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(): should_coalesce_(false),
638 should_throttle_(false),
639 active_clients_loading_(0) {
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
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
OLDNEW
« no previous file with comments | « no previous file | content/browser/loader/resource_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698