Chromium Code Reviews| 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 "content/browser/loader/resource_scheduler.h" | 5 #include "content/browser/loader/resource_scheduler.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 414 void OnLoadingStateChanged(bool is_loaded) { | 414 void OnLoadingStateChanged(bool is_loaded) { |
| 415 is_loaded_ = is_loaded; | 415 is_loaded_ = is_loaded; |
| 416 } | 416 } |
| 417 | 417 |
| 418 void OnNavigate() { | 418 void OnNavigate() { |
| 419 has_html_body_ = false; | 419 has_html_body_ = false; |
| 420 is_loaded_ = false; | 420 is_loaded_ = false; |
| 421 } | 421 } |
| 422 | 422 |
| 423 void OnWillInsertBody() { | 423 void OnWillInsertBody() { |
| 424 // Can be called multiple times per RVH in the case of OOPIFs. | |
|
nasko
2017/01/31 15:50:34
nit: Let's not use the abbreviation OOPIF, as not
Charlie Harrison
2017/01/31 20:19:31
Done.
| |
| 425 if (has_html_body_) | |
| 426 return; | |
| 424 has_html_body_ = true; | 427 has_html_body_ = true; |
| 425 LoadAnyStartablePendingRequests(RequestStartTrigger::BODY_REACHED); | 428 LoadAnyStartablePendingRequests(RequestStartTrigger::BODY_REACHED); |
| 426 } | 429 } |
| 427 | 430 |
| 428 void OnReceivedSpdyProxiedHttpResponse() { | 431 void OnReceivedSpdyProxiedHttpResponse() { |
| 429 if (!using_spdy_proxy_) { | 432 if (!using_spdy_proxy_) { |
| 430 using_spdy_proxy_ = true; | 433 using_spdy_proxy_ = true; |
| 431 LoadAnyStartablePendingRequests(RequestStartTrigger::SPDY_PROXY_DETECTED); | 434 LoadAnyStartablePendingRequests(RequestStartTrigger::SPDY_PROXY_DETECTED); |
| 432 } | 435 } |
| 433 } | 436 } |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 960 client->ReprioritizeRequest(scheduled_resource_request, old_priority_params, | 963 client->ReprioritizeRequest(scheduled_resource_request, old_priority_params, |
| 961 new_priority_params); | 964 new_priority_params); |
| 962 } | 965 } |
| 963 | 966 |
| 964 ResourceScheduler::ClientId ResourceScheduler::MakeClientId( | 967 ResourceScheduler::ClientId ResourceScheduler::MakeClientId( |
| 965 int child_id, int route_id) { | 968 int child_id, int route_id) { |
| 966 return (static_cast<ResourceScheduler::ClientId>(child_id) << 32) | route_id; | 969 return (static_cast<ResourceScheduler::ClientId>(child_id) << 32) | route_id; |
| 967 } | 970 } |
| 968 | 971 |
| 969 } // namespace content | 972 } // namespace content |
| OLD | NEW |