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 // This class represents contextual information (cookies, cache, etc.) | 5 // This class represents contextual information (cookies, cache, etc.) |
6 // that's useful when processing resource requests. | 6 // that's useful when processing resource requests. |
7 // The class is reference-counted so that it can be cleaned up after any | 7 // The class is reference-counted so that it can be cleaned up after any |
8 // requests that are using it have been completed. | 8 // requests that are using it have been completed. |
9 | 9 |
10 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 10 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
11 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 11 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
12 | 12 |
13 #include <set> | 13 #include <set> |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
19 #include "base/threading/non_thread_safe.h" | 19 #include "base/threading/non_thread_safe.h" |
20 #include "net/base/net_export.h" | 20 #include "net/base/net_export.h" |
21 #include "net/base/net_log.h" | 21 #include "net/base/net_log.h" |
| 22 #include "net/base/request_priority.h" |
22 #include "net/http/http_network_session.h" | 23 #include "net/http/http_network_session.h" |
23 #include "net/http/http_server_properties.h" | 24 #include "net/http/http_server_properties.h" |
24 #include "net/http/transport_security_state.h" | 25 #include "net/http/transport_security_state.h" |
25 #include "net/ssl/ssl_config_service.h" | 26 #include "net/ssl/ssl_config_service.h" |
26 #include "net/url_request/url_request.h" | 27 #include "net/url_request/url_request.h" |
27 | 28 |
28 namespace net { | 29 namespace net { |
29 class CertVerifier; | 30 class CertVerifier; |
30 class CookieStore; | 31 class CookieStore; |
31 class FraudulentCertificateReporter; | 32 class FraudulentCertificateReporter; |
(...skipping 17 matching lines...) Expand all Loading... |
49 public: | 50 public: |
50 URLRequestContext(); | 51 URLRequestContext(); |
51 virtual ~URLRequestContext(); | 52 virtual ~URLRequestContext(); |
52 | 53 |
53 // Copies the state from |other| into this context. | 54 // Copies the state from |other| into this context. |
54 void CopyFrom(const URLRequestContext* other); | 55 void CopyFrom(const URLRequestContext* other); |
55 | 56 |
56 // May return NULL if this context doesn't have an associated network session. | 57 // May return NULL if this context doesn't have an associated network session. |
57 const HttpNetworkSession::Params* GetNetworkSessionParams() const; | 58 const HttpNetworkSession::Params* GetNetworkSessionParams() const; |
58 | 59 |
59 URLRequest* CreateRequest( | 60 scoped_ptr<URLRequest> CreateRequest(const GURL& url, |
60 const GURL& url, URLRequest::Delegate* delegate) const; | 61 RequestPriority priority, |
| 62 URLRequest::Delegate* delegate) const; |
61 | 63 |
62 NetLog* net_log() const { | 64 NetLog* net_log() const { |
63 return net_log_; | 65 return net_log_; |
64 } | 66 } |
65 | 67 |
66 void set_net_log(NetLog* net_log) { | 68 void set_net_log(NetLog* net_log) { |
67 net_log_ = net_log; | 69 net_log_ = net_log; |
68 } | 70 } |
69 | 71 |
70 HostResolver* host_resolver() const { | 72 HostResolver* host_resolver() const { |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 // --------------------------------------------------------------------------- | 232 // --------------------------------------------------------------------------- |
231 | 233 |
232 scoped_ptr<std::set<const URLRequest*> > url_requests_; | 234 scoped_ptr<std::set<const URLRequest*> > url_requests_; |
233 | 235 |
234 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 236 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
235 }; | 237 }; |
236 | 238 |
237 } // namespace net | 239 } // namespace net |
238 | 240 |
239 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 241 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
OLD | NEW |