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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 content::SyncLoadResult result; | 130 content::SyncLoadResult result; |
131 result.status = status; | 131 result.status = status; |
132 ResourceHostMsg_SyncLoad::WriteReplyParams(sync_result, result); | 132 ResourceHostMsg_SyncLoad::WriteReplyParams(sync_result, result); |
133 filter->Send(sync_result); | 133 filter->Send(sync_result); |
134 } else { | 134 } else { |
135 // Tell the renderer that this request was disallowed. | 135 // Tell the renderer that this request was disallowed. |
136 filter->Send(new ResourceMsg_RequestComplete( | 136 filter->Send(new ResourceMsg_RequestComplete( |
137 route_id, | 137 route_id, |
138 request_id, | 138 request_id, |
139 status, | 139 status, |
140 std::string(), // No security info needed, connection was not | 140 std::string(), // No security info needed, connection not established. |
141 base::Time())); // established. | 141 base::TimeTicks())); |
142 } | 142 } |
143 } | 143 } |
144 | 144 |
145 GURL MaybeStripReferrer(const GURL& possible_referrer) { | 145 GURL MaybeStripReferrer(const GURL& possible_referrer) { |
146 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoReferrers)) | 146 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoReferrers)) |
147 return GURL(); | 147 return GURL(); |
148 return possible_referrer; | 148 return possible_referrer; |
149 } | 149 } |
150 | 150 |
151 // Consults the RendererSecurity policy to determine whether the | 151 // Consults the RendererSecurity policy to determine whether the |
(...skipping 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2235 | 2235 |
2236 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { | 2236 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { |
2237 allow_cross_origin_auth_prompt_ = value; | 2237 allow_cross_origin_auth_prompt_ = value; |
2238 } | 2238 } |
2239 | 2239 |
2240 void ResourceDispatcherHost::MarkAsTransferredNavigation( | 2240 void ResourceDispatcherHost::MarkAsTransferredNavigation( |
2241 const GlobalRequestID& transferred_request_id, | 2241 const GlobalRequestID& transferred_request_id, |
2242 net::URLRequest* ransferred_request) { | 2242 net::URLRequest* ransferred_request) { |
2243 transferred_navigations_[transferred_request_id] = ransferred_request; | 2243 transferred_navigations_[transferred_request_id] = ransferred_request; |
2244 } | 2244 } |
OLD | NEW |