OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
6 | 6 |
7 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 7 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1568 InsertIntoResourceQueue(request, *info); | 1568 InsertIntoResourceQueue(request, *info); |
1569 } | 1569 } |
1570 | 1570 |
1571 void ResourceDispatcherHost::InsertIntoResourceQueue( | 1571 void ResourceDispatcherHost::InsertIntoResourceQueue( |
1572 net::URLRequest* request, | 1572 net::URLRequest* request, |
1573 const ResourceDispatcherHostRequestInfo& request_info) { | 1573 const ResourceDispatcherHostRequestInfo& request_info) { |
1574 resource_queue_.AddRequest(request, request_info); | 1574 resource_queue_.AddRequest(request, request_info); |
1575 | 1575 |
1576 // Make sure we have the load state monitor running | 1576 // Make sure we have the load state monitor running |
1577 if (!update_load_states_timer_.IsRunning()) { | 1577 if (!update_load_states_timer_.IsRunning()) { |
1578 update_load_states_timer_.Start(FROM_HERE, | 1578 update_load_states_timer_.Start( |
1579 TimeDelta::FromMilliseconds(kUpdateLoadStatesIntervalMsec), | 1579 TimeDelta::FromMilliseconds(kUpdateLoadStatesIntervalMsec), |
1580 this, &ResourceDispatcherHost::UpdateLoadStates); | 1580 this, &ResourceDispatcherHost::UpdateLoadStates); |
1581 } | 1581 } |
1582 } | 1582 } |
1583 | 1583 |
1584 bool ResourceDispatcherHost::PauseRequestIfNeeded( | 1584 bool ResourceDispatcherHost::PauseRequestIfNeeded( |
1585 ResourceDispatcherHostRequestInfo* info) { | 1585 ResourceDispatcherHostRequestInfo* info) { |
1586 if (info->pause_count() > 0) | 1586 if (info->pause_count() > 0) |
1587 info->set_is_paused(true); | 1587 info->set_is_paused(true); |
1588 return info->is_paused(); | 1588 return info->is_paused(); |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2132 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS; | 2132 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS; |
2133 } | 2133 } |
2134 | 2134 |
2135 bool ResourceDispatcherHost::allow_cross_origin_auth_prompt() { | 2135 bool ResourceDispatcherHost::allow_cross_origin_auth_prompt() { |
2136 return allow_cross_origin_auth_prompt_; | 2136 return allow_cross_origin_auth_prompt_; |
2137 } | 2137 } |
2138 | 2138 |
2139 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { | 2139 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { |
2140 allow_cross_origin_auth_prompt_ = value; | 2140 allow_cross_origin_auth_prompt_ = value; |
2141 } | 2141 } |
OLD | NEW |