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/browser/worker_host/worker_process_host.h" | 5 #include "content/browser/worker_host/worker_process_host.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 #include "webkit/glue/resource_type.h" | 53 #include "webkit/glue/resource_type.h" |
54 | 54 |
55 namespace content { | 55 namespace content { |
56 namespace { | 56 namespace { |
57 | 57 |
58 // Helper class that we pass to SocketStreamDispatcherHost so that it can find | 58 // Helper class that we pass to SocketStreamDispatcherHost so that it can find |
59 // the right net::URLRequestContext for a request. | 59 // the right net::URLRequestContext for a request. |
60 class URLRequestContextSelector | 60 class URLRequestContextSelector |
61 : public ResourceMessageFilter::URLRequestContextSelector { | 61 : public ResourceMessageFilter::URLRequestContextSelector { |
62 public: | 62 public: |
63 explicit URLRequestContextSelector( | 63 URLRequestContextSelector( |
64 net::URLRequestContextGetter* url_request_context, | 64 net::URLRequestContextGetter* url_request_context, |
65 net::URLRequestContextGetter* media_url_request_context) | 65 net::URLRequestContextGetter* media_url_request_context) |
66 : url_request_context_(url_request_context), | 66 : url_request_context_(url_request_context), |
67 media_url_request_context_(media_url_request_context) { | 67 media_url_request_context_(media_url_request_context) { |
68 } | 68 } |
69 virtual ~URLRequestContextSelector() {} | 69 virtual ~URLRequestContextSelector() {} |
70 | 70 |
71 virtual net::URLRequestContext* GetRequestContext( | 71 virtual net::URLRequestContext* GetRequestContext( |
72 ResourceType::Type resource_type) { | 72 ResourceType::Type resource_type) { |
73 if (resource_type == ResourceType::MEDIA) | 73 if (resource_type == ResourceType::MEDIA) |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 return false; | 666 return false; |
667 } | 667 } |
668 | 668 |
669 WorkerProcessHost::WorkerInstance::FilterInfo | 669 WorkerProcessHost::WorkerInstance::FilterInfo |
670 WorkerProcessHost::WorkerInstance::GetFilter() const { | 670 WorkerProcessHost::WorkerInstance::GetFilter() const { |
671 DCHECK(NumFilters() == 1); | 671 DCHECK(NumFilters() == 1); |
672 return *filters_.begin(); | 672 return *filters_.begin(); |
673 } | 673 } |
674 | 674 |
675 } // namespace content | 675 } // namespace content |
OLD | NEW |