OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 IOS_COMPONENTS_IO_THREAD_IOS_IO_THREAD_H_ | 5 #ifndef IOS_COMPONENTS_IO_THREAD_IOS_IO_THREAD_H_ |
6 #define IOS_COMPONENTS_IO_THREAD_IOS_IO_THREAD_H_ | 6 #define IOS_COMPONENTS_IO_THREAD_IOS_IO_THREAD_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 // Provide SystemURLRequestContextGetter with access to | 170 // Provide SystemURLRequestContextGetter with access to |
171 // InitSystemRequestContext(). | 171 // InitSystemRequestContext(). |
172 friend class SystemURLRequestContextGetter; | 172 friend class SystemURLRequestContextGetter; |
173 | 173 |
174 // WebThreadDelegate implementation, runs on the IO thread. | 174 // WebThreadDelegate implementation, runs on the IO thread. |
175 // This handles initialization and destruction of state that must | 175 // This handles initialization and destruction of state that must |
176 // live on the IO thread. | 176 // live on the IO thread. |
177 void Init() override; | 177 void Init() override; |
178 void CleanUp() override; | 178 void CleanUp() override; |
179 | 179 |
180 // Global state must be initialized on the IO thread, then this | |
181 // method must be invoked on the UI thread. | |
182 void InitSystemRequestContext(); | |
183 | |
184 // Lazy initialization of system request context for | |
185 // SystemURLRequestContextGetter. To be called on IO thread only | |
186 // after global state has been initialized on the IO thread, and | |
187 // SystemRequestContext state has been initialized on the UI thread. | |
188 void InitSystemRequestContextOnIOThread(); | |
189 | |
190 // Sets up HttpAuthPreferences and HttpAuthHandlerFactory on Globals. | 180 // Sets up HttpAuthPreferences and HttpAuthHandlerFactory on Globals. |
191 void CreateDefaultAuthHandlerFactory(); | 181 void CreateDefaultAuthHandlerFactory(); |
192 | 182 |
193 // Returns an SSLConfigService instance. | 183 // Returns an SSLConfigService instance. |
194 net::SSLConfigService* GetSSLConfigService(); | 184 net::SSLConfigService* GetSSLConfigService(); |
195 | 185 |
196 // Discards confidental data. To be called on IO thread only. | 186 // Discards confidental data. To be called on IO thread only. |
197 void ChangedToOnTheRecordOnIOThread(); | 187 void ChangedToOnTheRecordOnIOThread(); |
198 | 188 |
199 static net::URLRequestContext* ConstructSystemRequestContext( | 189 static net::URLRequestContext* ConstructSystemRequestContext( |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 const base::TimeTicks creation_time_; | 228 const base::TimeTicks creation_time_; |
239 | 229 |
240 base::WeakPtrFactory<IOSIOThread> weak_factory_; | 230 base::WeakPtrFactory<IOSIOThread> weak_factory_; |
241 | 231 |
242 DISALLOW_COPY_AND_ASSIGN(IOSIOThread); | 232 DISALLOW_COPY_AND_ASSIGN(IOSIOThread); |
243 }; | 233 }; |
244 | 234 |
245 } // namespace io_thread | 235 } // namespace io_thread |
246 | 236 |
247 #endif // IOS_COMPONENTS_IO_THREAD_IO_THREAD_H_ | 237 #endif // IOS_COMPONENTS_IO_THREAD_IO_THREAD_H_ |
OLD | NEW |