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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 SyncLoadResult result; | 141 SyncLoadResult result; |
142 result.status = status; | 142 result.status = status; |
143 ResourceHostMsg_SyncLoad::WriteReplyParams(sync_result, result); | 143 ResourceHostMsg_SyncLoad::WriteReplyParams(sync_result, result); |
144 filter->Send(sync_result); | 144 filter->Send(sync_result); |
145 } else { | 145 } else { |
146 // Tell the renderer that this request was disallowed. | 146 // Tell the renderer that this request was disallowed. |
147 filter->Send(new ResourceMsg_RequestComplete( | 147 filter->Send(new ResourceMsg_RequestComplete( |
148 route_id, | 148 route_id, |
149 request_id, | 149 request_id, |
150 status, | 150 status, |
151 std::string(), // No security info needed, connection was not | 151 std::string(), // No security info needed, connection not established. |
152 base::Time())); // established. | 152 base::TimeTicks())); |
153 } | 153 } |
154 } | 154 } |
155 | 155 |
156 GURL MaybeStripReferrer(const GURL& possible_referrer) { | 156 GURL MaybeStripReferrer(const GURL& possible_referrer) { |
157 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoReferrers)) | 157 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoReferrers)) |
158 return GURL(); | 158 return GURL(); |
159 return possible_referrer; | 159 return possible_referrer; |
160 } | 160 } |
161 | 161 |
162 // Consults the RendererSecurity policy to determine whether the | 162 // Consults the RendererSecurity policy to determine whether the |
(...skipping 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2133 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS; | 2133 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS; |
2134 } | 2134 } |
2135 | 2135 |
2136 bool ResourceDispatcherHost::allow_cross_origin_auth_prompt() { | 2136 bool ResourceDispatcherHost::allow_cross_origin_auth_prompt() { |
2137 return allow_cross_origin_auth_prompt_; | 2137 return allow_cross_origin_auth_prompt_; |
2138 } | 2138 } |
2139 | 2139 |
2140 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { | 2140 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { |
2141 allow_cross_origin_auth_prompt_ = value; | 2141 allow_cross_origin_auth_prompt_ = value; |
2142 } | 2142 } |
OLD | NEW |