| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_IO_DATA_H_ | 5 #ifndef IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_IO_DATA_H_ |
| 6 #define IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_IO_DATA_H_ | 6 #define IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_IO_DATA_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 bool GetMetricsEnabledStateOnIOThread() const; | 127 bool GetMetricsEnabledStateOnIOThread() const; |
| 128 | 128 |
| 129 protected: | 129 protected: |
| 130 // A URLRequestContext for apps that owns its cookie store and HTTP factory, | 130 // A URLRequestContext for apps that owns its cookie store and HTTP factory, |
| 131 // to ensure they are deleted. | 131 // to ensure they are deleted. |
| 132 class AppRequestContext : public net::URLRequestContext { | 132 class AppRequestContext : public net::URLRequestContext { |
| 133 public: | 133 public: |
| 134 AppRequestContext(); | 134 AppRequestContext(); |
| 135 | 135 |
| 136 void SetCookieStore(std::unique_ptr<net::CookieStore> cookie_store); | 136 void SetCookieStore(std::unique_ptr<net::CookieStore> cookie_store); |
| 137 void SetChannelIDService( |
| 138 std::unique_ptr<net::ChannelIDService> channel_id_service); |
| 139 void SetHttpNetworkSession( |
| 140 std::unique_ptr<net::HttpNetworkSession> http_network_session); |
| 137 void SetHttpTransactionFactory( | 141 void SetHttpTransactionFactory( |
| 138 std::unique_ptr<net::HttpTransactionFactory> http_factory); | 142 std::unique_ptr<net::HttpTransactionFactory> http_factory); |
| 139 void SetJobFactory(std::unique_ptr<net::URLRequestJobFactory> job_factory); | 143 void SetJobFactory(std::unique_ptr<net::URLRequestJobFactory> job_factory); |
| 140 | 144 |
| 141 ~AppRequestContext() override; | 145 ~AppRequestContext() override; |
| 142 | 146 |
| 143 private: | 147 private: |
| 144 std::unique_ptr<net::CookieStore> cookie_store_; | 148 std::unique_ptr<net::CookieStore> cookie_store_; |
| 149 std::unique_ptr<net::ChannelIDService> channel_id_service_; |
| 150 std::unique_ptr<net::HttpNetworkSession> http_network_session_; |
| 145 std::unique_ptr<net::HttpTransactionFactory> http_factory_; | 151 std::unique_ptr<net::HttpTransactionFactory> http_factory_; |
| 146 std::unique_ptr<net::URLRequestJobFactory> job_factory_; | 152 std::unique_ptr<net::URLRequestJobFactory> job_factory_; |
| 147 }; | 153 }; |
| 148 | 154 |
| 149 // Created on the UI thread, read on the IO thread during | 155 // Created on the UI thread, read on the IO thread during |
| 150 // ChromeBrowserStateIOData lazy initialization. | 156 // ChromeBrowserStateIOData lazy initialization. |
| 151 struct ProfileParams { | 157 struct ProfileParams { |
| 152 ProfileParams(); | 158 ProfileParams(); |
| 153 ~ProfileParams(); | 159 ~ProfileParams(); |
| 154 | 160 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 | 309 |
| 304 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 310 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
| 305 bool initialized_on_UI_thread_; | 311 bool initialized_on_UI_thread_; |
| 306 | 312 |
| 307 const ios::ChromeBrowserStateType browser_state_type_; | 313 const ios::ChromeBrowserStateType browser_state_type_; |
| 308 | 314 |
| 309 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserStateIOData); | 315 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserStateIOData); |
| 310 }; | 316 }; |
| 311 | 317 |
| 312 #endif // IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_IO_DATA_H_ | 318 #endif // IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_IO_DATA_H_ |
| OLD | NEW |