OLD | NEW |
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 #include "content/public/browser/resource_request_details.h" | 5 #include "content/public/browser/resource_request_details.h" |
6 | 6 |
7 #include "content/browser/worker_host/worker_service_impl.h" | 7 #include "content/browser/worker_host/worker_service_impl.h" |
8 #include "content/public/browser/resource_request_info.h" | 8 #include "content/public/browser/resource_request_info.h" |
9 #include "net/url_request/url_request.h" | 9 #include "net/url_request/url_request.h" |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 resource_type = info->GetResourceType(); | 26 resource_type = info->GetResourceType(); |
27 frame_id = info->GetFrameID(); | 27 frame_id = info->GetFrameID(); |
28 | 28 |
29 // If request is from the worker process on behalf of a renderer, use | 29 // If request is from the worker process on behalf of a renderer, use |
30 // the renderer process id, since it consumes the notification response | 30 // the renderer process id, since it consumes the notification response |
31 // such as ssl state etc. | 31 // such as ssl state etc. |
32 // TODO(atwilson): need to notify all associated renderers in the case | 32 // TODO(atwilson): need to notify all associated renderers in the case |
33 // of ssl state change (http://crbug.com/25357). For now, just notify | 33 // of ssl state change (http://crbug.com/25357). For now, just notify |
34 // the first one (works for dedicated workers and shared workers with | 34 // the first one (works for dedicated workers and shared workers with |
35 // a single process). | 35 // a single process). |
36 int render_view_id, render_frame_id; | 36 int render_frame_id; |
37 if (!WorkerServiceImpl::GetInstance()->GetRendererForWorker( | 37 if (!WorkerServiceImpl::GetInstance()->GetRendererForWorker( |
38 info->GetChildID(), &origin_child_id, &render_view_id, | 38 info->GetChildID(), &origin_child_id, &render_frame_id)) { |
39 &render_frame_id)) { | |
40 origin_child_id = info->GetChildID(); | 39 origin_child_id = info->GetChildID(); |
41 } | 40 } |
42 } | 41 } |
43 | 42 |
44 ResourceRequestDetails::~ResourceRequestDetails() {} | 43 ResourceRequestDetails::~ResourceRequestDetails() {} |
45 | 44 |
46 ResourceRedirectDetails::ResourceRedirectDetails(const net::URLRequest* request, | 45 ResourceRedirectDetails::ResourceRedirectDetails(const net::URLRequest* request, |
47 int cert_id, | 46 int cert_id, |
48 const GURL& new_url) | 47 const GURL& new_url) |
49 : ResourceRequestDetails(request, cert_id), | 48 : ResourceRequestDetails(request, cert_id), |
50 new_url(new_url) { | 49 new_url(new_url) { |
51 } | 50 } |
52 | 51 |
53 ResourceRedirectDetails::~ResourceRedirectDetails() {} | 52 ResourceRedirectDetails::~ResourceRedirectDetails() {} |
54 | 53 |
55 } // namespace content | 54 } // namespace content |
OLD | NEW |