OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef COMPONENTS_CRONET_ANDROID_URL_REQUEST_CONTEXT_ADAPTER_H_ | 5 #ifndef COMPONENTS_CRONET_ANDROID_URL_REQUEST_CONTEXT_ADAPTER_H_ |
6 #define COMPONENTS_CRONET_ANDROID_URL_REQUEST_CONTEXT_ADAPTER_H_ | 6 #define COMPONENTS_CRONET_ANDROID_URL_REQUEST_CONTEXT_ADAPTER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 const std::string& GetUserAgent(const GURL& url) const; | 59 const std::string& GetUserAgent(const GURL& url) const; |
60 | 60 |
61 // net::URLRequestContextGetter implementation: | 61 // net::URLRequestContextGetter implementation: |
62 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; | 62 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; |
63 virtual scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() | 63 virtual scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() |
64 const OVERRIDE; | 64 const OVERRIDE; |
65 | 65 |
66 void StartNetLogToFile(const std::string& file_name); | 66 void StartNetLogToFile(const std::string& file_name); |
67 void StopNetLog(); | 67 void StopNetLog(); |
68 | 68 |
69 void SetQuicHint(const net::HostPortPair& server, | |
Ryan Hamilton
2014/09/10 20:58:19
Please add a comment for this method.
mef
2014/09/12 19:44:33
Acknowledged. Per discussion with mmenke@ I'm goin
| |
70 uint16 alternate_port, | |
71 double probability); | |
72 | |
69 private: | 73 private: |
70 scoped_refptr<URLRequestContextAdapterDelegate> delegate_; | 74 scoped_refptr<URLRequestContextAdapterDelegate> delegate_; |
71 scoped_ptr<net::URLRequestContext> context_; | 75 scoped_ptr<net::URLRequestContext> context_; |
72 std::string user_agent_; | 76 std::string user_agent_; |
73 base::Thread* network_thread_; | 77 base::Thread* network_thread_; |
74 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; | 78 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; |
75 scoped_ptr<NetLogObserver> net_log_observer_; | 79 scoped_ptr<NetLogObserver> net_log_observer_; |
76 scoped_ptr<net::NetLogLogger> net_log_logger_; | 80 scoped_ptr<net::NetLogLogger> net_log_logger_; |
77 | 81 |
78 virtual ~URLRequestContextAdapter(); | 82 virtual ~URLRequestContextAdapter(); |
79 | 83 |
80 // Initializes |context_| on the IO thread. | 84 // Initializes |context_| on the Network thread. |
81 void InitializeURLRequestContext(scoped_ptr<URLRequestContextConfig> config); | 85 void InitializeURLRequestContext(scoped_ptr<URLRequestContextConfig> config); |
82 | 86 |
83 DISALLOW_COPY_AND_ASSIGN(URLRequestContextAdapter); | 87 DISALLOW_COPY_AND_ASSIGN(URLRequestContextAdapter); |
84 }; | 88 }; |
85 | 89 |
86 } // namespace cronet | 90 } // namespace cronet |
87 | 91 |
88 #endif // COMPONENTS_CRONET_ANDROID_URL_REQUEST_CONTEXT_ADAPTER_H_ | 92 #endif // COMPONENTS_CRONET_ANDROID_URL_REQUEST_CONTEXT_ADAPTER_H_ |
OLD | NEW |