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