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