| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 SyncLoadResult result; | 144 SyncLoadResult result; |
| 145 result.status = status; | 145 result.status = status; |
| 146 ResourceHostMsg_SyncLoad::WriteReplyParams(sync_result, result); | 146 ResourceHostMsg_SyncLoad::WriteReplyParams(sync_result, result); |
| 147 filter->Send(sync_result); | 147 filter->Send(sync_result); |
| 148 } else { | 148 } else { |
| 149 // Tell the renderer that this request was disallowed. | 149 // Tell the renderer that this request was disallowed. |
| 150 filter->Send(new ResourceMsg_RequestComplete( | 150 filter->Send(new ResourceMsg_RequestComplete( |
| 151 route_id, | 151 route_id, |
| 152 request_id, | 152 request_id, |
| 153 status, | 153 status, |
| 154 std::string(), // No security info needed, connection was not | 154 std::string(), // No security info needed, connection not established. |
| 155 base::Time())); // established. | 155 base::TimeTicks())); |
| 156 } | 156 } |
| 157 } | 157 } |
| 158 | 158 |
| 159 GURL MaybeStripReferrer(const GURL& possible_referrer) { | 159 GURL MaybeStripReferrer(const GURL& possible_referrer) { |
| 160 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoReferrers)) | 160 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoReferrers)) |
| 161 return GURL(); | 161 return GURL(); |
| 162 return possible_referrer; | 162 return possible_referrer; |
| 163 } | 163 } |
| 164 | 164 |
| 165 // Consults the RendererSecurity policy to determine whether the | 165 // Consults the RendererSecurity policy to determine whether the |
| (...skipping 2003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2169 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS; | 2169 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS; |
| 2170 } | 2170 } |
| 2171 | 2171 |
| 2172 bool ResourceDispatcherHost::allow_cross_origin_auth_prompt() { | 2172 bool ResourceDispatcherHost::allow_cross_origin_auth_prompt() { |
| 2173 return allow_cross_origin_auth_prompt_; | 2173 return allow_cross_origin_auth_prompt_; |
| 2174 } | 2174 } |
| 2175 | 2175 |
| 2176 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { | 2176 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { |
| 2177 allow_cross_origin_auth_prompt_ = value; | 2177 allow_cross_origin_auth_prompt_ = value; |
| 2178 } | 2178 } |
| OLD | NEW |