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_ |
(...skipping 27 matching lines...) Expand all Loading... |
38 class ProxyService; | 38 class ProxyService; |
39 class URLRequest; | 39 class URLRequest; |
40 class URLRequestJobFactory; | 40 class URLRequestJobFactory; |
41 class URLRequestThrottlerManager; | 41 class URLRequestThrottlerManager; |
42 | 42 |
43 // Subclass to provide application-specific context for URLRequest | 43 // Subclass to provide application-specific context for URLRequest |
44 // instances. Note that URLRequestContext typically does not provide storage for | 44 // instances. Note that URLRequestContext typically does not provide storage for |
45 // these member variables, since they may be shared. For the ones that aren't | 45 // these member variables, since they may be shared. For the ones that aren't |
46 // shared, URLRequestContextStorage can be helpful in defining their storage. | 46 // shared, URLRequestContextStorage can be helpful in defining their storage. |
47 class NET_EXPORT URLRequestContext | 47 class NET_EXPORT URLRequestContext |
48 : NON_EXPORTED_BASE(public base::NonThreadSafe), | 48 : NON_EXPORTED_BASE(public base::NonThreadSafe) { |
49 public base::SupportsWeakPtr<URLRequestContext> { | |
50 public: | 49 public: |
51 URLRequestContext(); | 50 URLRequestContext(); |
52 virtual ~URLRequestContext(); | 51 virtual ~URLRequestContext(); |
53 | 52 |
54 // Copies the state from |other| into this context. | 53 // Copies the state from |other| into this context. |
55 void CopyFrom(const URLRequestContext* other); | 54 void CopyFrom(const URLRequestContext* other); |
56 | 55 |
57 // May return NULL if this context doesn't have an associated network session. | 56 // May return NULL if this context doesn't have an associated network session. |
58 const HttpNetworkSession::Params* GetNetworkSessionParams() const; | 57 const HttpNetworkSession::Params* GetNetworkSessionParams() const; |
59 | 58 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 // --------------------------------------------------------------------------- | 230 // --------------------------------------------------------------------------- |
232 | 231 |
233 scoped_ptr<std::set<const URLRequest*> > url_requests_; | 232 scoped_ptr<std::set<const URLRequest*> > url_requests_; |
234 | 233 |
235 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 234 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
236 }; | 235 }; |
237 | 236 |
238 } // namespace net | 237 } // namespace net |
239 | 238 |
240 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 239 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
OLD | NEW |