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 <queue> | 8 #include <queue> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 namespace cronet { | 30 namespace cronet { |
31 | 31 |
32 struct URLRequestContextConfig; | 32 struct URLRequestContextConfig; |
33 typedef base::Callback<void(void)> RunAfterContextInitTask; | 33 typedef base::Callback<void(void)> RunAfterContextInitTask; |
34 | 34 |
35 // Implementation of the Chromium NetLog observer interface. | 35 // Implementation of the Chromium NetLog observer interface. |
36 class NetLogObserver : public net::NetLog::ThreadSafeObserver { | 36 class NetLogObserver : public net::NetLog::ThreadSafeObserver { |
37 public: | 37 public: |
38 NetLogObserver() {} | 38 NetLogObserver() {} |
39 | 39 |
40 virtual ~NetLogObserver() {} | 40 ~NetLogObserver() override {} |
41 | 41 |
42 void OnAddEntry(const net::NetLog::Entry& entry) override; | 42 void OnAddEntry(const net::NetLog::Entry& entry) override; |
43 | 43 |
44 private: | 44 private: |
45 DISALLOW_COPY_AND_ASSIGN(NetLogObserver); | 45 DISALLOW_COPY_AND_ASSIGN(NetLogObserver); |
46 }; | 46 }; |
47 | 47 |
48 // Fully configured |URLRequestContext|. | 48 // Fully configured |URLRequestContext|. |
49 class URLRequestContextAdapter : public net::URLRequestContextGetter { | 49 class URLRequestContextAdapter : public net::URLRequestContextGetter { |
50 public: | 50 public: |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // A queue of tasks that need to be run after context has been initialized. | 114 // A queue of tasks that need to be run after context has been initialized. |
115 std::queue<RunAfterContextInitTask> tasks_waiting_for_context_; | 115 std::queue<RunAfterContextInitTask> tasks_waiting_for_context_; |
116 bool is_context_initialized_; | 116 bool is_context_initialized_; |
117 | 117 |
118 DISALLOW_COPY_AND_ASSIGN(URLRequestContextAdapter); | 118 DISALLOW_COPY_AND_ASSIGN(URLRequestContextAdapter); |
119 }; | 119 }; |
120 | 120 |
121 } // namespace cronet | 121 } // namespace cronet |
122 | 122 |
123 #endif // COMPONENTS_CRONET_ANDROID_URL_REQUEST_CONTEXT_ADAPTER_H_ | 123 #endif // COMPONENTS_CRONET_ANDROID_URL_REQUEST_CONTEXT_ADAPTER_H_ |
OLD | NEW |