Chromium Code Reviews| 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 necessary when processing resource requests. | 6 // that's necessary when processing resource requests. |
| 7 | 7 |
| 8 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 8 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| 9 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 9 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| 10 | 10 |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <set> | 12 #include <set> |
| 13 #include <string> | 13 #include <string> |
| 14 | 14 |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 18 #include "base/threading/non_thread_safe.h" | 18 #include "base/threading/non_thread_safe.h" |
| 19 #include "base/trace_event/memory_dump_provider.h" | 19 #include "base/trace_event/memory_dump_provider.h" |
| 20 #include "net/base/net_export.h" | 20 #include "net/base/net_export.h" |
| 21 #include "net/base/request_priority.h" | 21 #include "net/base/request_priority.h" |
| 22 #include "net/http/http_network_session.h" | 22 #include "net/http/http_network_session.h" |
| 23 #include "net/http/http_server_properties.h" | 23 #include "net/http/http_server_properties.h" |
| 24 #include "net/http/transport_security_state.h" | 24 #include "net/http/transport_security_state.h" |
| 25 #include "net/ssl/ssl_config_service.h" | 25 #include "net/ssl/ssl_config_service.h" |
| 26 #include "net/traffic_annotation/network_traffic_annotation.h" | |
| 26 #include "net/url_request/url_request.h" | 27 #include "net/url_request/url_request.h" |
| 27 | 28 |
| 28 namespace base { | 29 namespace base { |
| 29 namespace trace_event { | 30 namespace trace_event { |
| 30 class ProcessMemoryDump; | 31 class ProcessMemoryDump; |
| 31 } | 32 } |
| 32 } | 33 } |
| 33 | 34 |
| 34 namespace net { | 35 namespace net { |
| 35 class CertVerifier; | 36 class CertVerifier; |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 64 URLRequestContext(); | 65 URLRequestContext(); |
| 65 ~URLRequestContext() override; | 66 ~URLRequestContext() override; |
| 66 | 67 |
| 67 // Copies the state from |other| into this context. | 68 // Copies the state from |other| into this context. |
| 68 void CopyFrom(const URLRequestContext* other); | 69 void CopyFrom(const URLRequestContext* other); |
| 69 | 70 |
| 70 // May return nullptr if this context doesn't have an associated network | 71 // May return nullptr if this context doesn't have an associated network |
| 71 // session. | 72 // session. |
| 72 const HttpNetworkSession::Params* GetNetworkSessionParams() const; | 73 const HttpNetworkSession::Params* GetNetworkSessionParams() const; |
| 73 | 74 |
| 75 // DEPRECATED. Please use the version with NetworkTrafficAnnotationTag in the | |
| 76 // future. | |
|
battre
2017/02/01 03:48:24
I think that this should not be deprecated.
Ramin Halavati
2017/02/01 10:11:13
Done.
| |
| 74 std::unique_ptr<URLRequest> CreateRequest( | 77 std::unique_ptr<URLRequest> CreateRequest( |
| 75 const GURL& url, | 78 const GURL& url, |
| 76 RequestPriority priority, | 79 RequestPriority priority, |
| 77 URLRequest::Delegate* delegate) const; | 80 URLRequest::Delegate* delegate) const; |
| 78 | 81 |
| 79 NetLog* net_log() const { | 82 std::unique_ptr<URLRequest> CreateRequest( |
| 80 return net_log_; | 83 const GURL& url, |
| 81 } | 84 RequestPriority priority, |
| 85 URLRequest::Delegate* delegate, | |
| 86 NetworkTrafficAnnotationTag traffic_classification) const; | |
| 87 | |
| 88 NetLog* net_log() const { return net_log_; } | |
| 82 | 89 |
| 83 void set_net_log(NetLog* net_log) { | 90 void set_net_log(NetLog* net_log) { |
| 84 net_log_ = net_log; | 91 net_log_ = net_log; |
| 85 } | 92 } |
| 86 | 93 |
| 87 HostResolver* host_resolver() const { | 94 HostResolver* host_resolver() const { |
| 88 return host_resolver_; | 95 return host_resolver_; |
| 89 } | 96 } |
| 90 | 97 |
| 91 void set_host_resolver(HostResolver* host_resolver) { | 98 void set_host_resolver(HostResolver* host_resolver) { |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 302 // Used in MemoryDumpProvier to annotate memory usage. The name does not need | 309 // Used in MemoryDumpProvier to annotate memory usage. The name does not need |
| 303 // to be unique. | 310 // to be unique. |
| 304 std::string name_; | 311 std::string name_; |
| 305 | 312 |
| 306 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 313 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
| 307 }; | 314 }; |
| 308 | 315 |
| 309 } // namespace net | 316 } // namespace net |
| 310 | 317 |
| 311 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 318 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |