Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(535)

Side by Side Diff: content/browser/renderer_host/resource_dispatcher_host_impl.cc

Issue 10416003: RefCounted types should not have public destructors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_impl.h" 7 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h"
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 return false; 188 return false;
189 } 189 }
190 } 190 }
191 } 191 }
192 192
193 return true; 193 return true;
194 } 194 }
195 195
196 void PopulateResourceResponse(net::URLRequest* request, 196 void PopulateResourceResponse(net::URLRequest* request,
197 ResourceResponse* response) { 197 ResourceResponse* response) {
198 response->status = request->status(); 198 response->data.status = request->status();
199 response->request_time = request->request_time(); 199 response->data.request_time = request->request_time();
200 response->response_time = request->response_time(); 200 response->data.response_time = request->response_time();
201 response->headers = request->response_headers(); 201 response->data.headers = request->response_headers();
202 request->GetCharset(&response->charset); 202 request->GetCharset(&response->data.charset);
203 response->content_length = request->GetExpectedContentSize(); 203 response->data.content_length = request->GetExpectedContentSize();
204 request->GetMimeType(&response->mime_type); 204 request->GetMimeType(&response->data.mime_type);
205 net::HttpResponseInfo response_info = request->response_info(); 205 net::HttpResponseInfo response_info = request->response_info();
206 response->was_fetched_via_spdy = response_info.was_fetched_via_spdy; 206 response->data.was_fetched_via_spdy = response_info.was_fetched_via_spdy;
207 response->was_npn_negotiated = response_info.was_npn_negotiated; 207 response->data.was_npn_negotiated = response_info.was_npn_negotiated;
208 response->npn_negotiated_protocol = response_info.npn_negotiated_protocol; 208 response->data.npn_negotiated_protocol =
209 response->was_fetched_via_proxy = request->was_fetched_via_proxy(); 209 response_info.npn_negotiated_protocol;
210 response->socket_address = request->GetSocketAddress(); 210 response->data.was_fetched_via_proxy = request->was_fetched_via_proxy();
211 response->data.socket_address = request->GetSocketAddress();
211 appcache::AppCacheInterceptor::GetExtraResponseInfo( 212 appcache::AppCacheInterceptor::GetExtraResponseInfo(
212 request, 213 request,
213 &response->appcache_id, 214 &response->data.appcache_id,
214 &response->appcache_manifest_url); 215 &response->data.appcache_manifest_url);
215 } 216 }
216 217
217 void RemoveDownloadFileFromChildSecurityPolicy(int child_id, 218 void RemoveDownloadFileFromChildSecurityPolicy(int child_id,
218 const FilePath& path) { 219 const FilePath& path) {
219 ChildProcessSecurityPolicyImpl::GetInstance()->RevokeAllPermissionsForFile( 220 ChildProcessSecurityPolicyImpl::GetInstance()->RevokeAllPermissionsForFile(
220 child_id, path); 221 child_id, path);
221 } 222 }
222 223
223 #if defined(OS_WIN) 224 #if defined(OS_WIN)
224 #pragma warning(disable: 4748) 225 #pragma warning(disable: 4748)
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 net::URLRequest* request) { 1578 net::URLRequest* request) {
1578 ResourceRequestInfoImpl* info = ResourceRequestInfoImpl::ForRequest(request); 1579 ResourceRequestInfoImpl* info = ResourceRequestInfoImpl::ForRequest(request);
1579 1580
1580 scoped_refptr<ResourceResponse> response(new ResourceResponse); 1581 scoped_refptr<ResourceResponse> response(new ResourceResponse);
1581 PopulateResourceResponse(request, response); 1582 PopulateResourceResponse(request, response);
1582 1583
1583 if (request->ssl_info().cert) { 1584 if (request->ssl_info().cert) {
1584 int cert_id = 1585 int cert_id =
1585 CertStore::GetInstance()->StoreCert(request->ssl_info().cert, 1586 CertStore::GetInstance()->StoreCert(request->ssl_info().cert,
1586 info->GetChildID()); 1587 info->GetChildID());
1587 response->security_info = SerializeSecurityInfo( 1588 response->data.security_info = SerializeSecurityInfo(
1588 cert_id, request->ssl_info().cert_status, 1589 cert_id, request->ssl_info().cert_status,
1589 request->ssl_info().security_bits, 1590 request->ssl_info().security_bits,
1590 request->ssl_info().connection_status); 1591 request->ssl_info().connection_status);
1591 } else { 1592 } else {
1592 // We should not have any SSL state. 1593 // We should not have any SSL state.
1593 DCHECK(!request->ssl_info().cert_status && 1594 DCHECK(!request->ssl_info().cert_status &&
1594 request->ssl_info().security_bits == -1 && 1595 request->ssl_info().security_bits == -1 &&
1595 !request->ssl_info().connection_status); 1596 !request->ssl_info().connection_status);
1596 } 1597 }
1597 1598
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
2334 return allow_cross_origin_auth_prompt_; 2335 return allow_cross_origin_auth_prompt_;
2335 } 2336 }
2336 2337
2337 bool ResourceDispatcherHostImpl::IsTransferredNavigation( 2338 bool ResourceDispatcherHostImpl::IsTransferredNavigation(
2338 const GlobalRequestID& transferred_request_id) const { 2339 const GlobalRequestID& transferred_request_id) const {
2339 return transferred_navigations_.find(transferred_request_id) != 2340 return transferred_navigations_.find(transferred_request_id) !=
2340 transferred_navigations_.end(); 2341 transferred_navigations_.end();
2341 } 2342 }
2342 2343
2343 } // namespace content 2344 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698