| 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 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| 6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 std::unique_ptr<net::HttpTransactionFactory> http_factory_; | 260 std::unique_ptr<net::HttpTransactionFactory> http_factory_; |
| 261 }; | 261 }; |
| 262 | 262 |
| 263 // A URLRequestContext for apps that owns its cookie store and HTTP factory, | 263 // A URLRequestContext for apps that owns its cookie store and HTTP factory, |
| 264 // to ensure they are deleted. | 264 // to ensure they are deleted. |
| 265 class AppRequestContext : public net::URLRequestContext { | 265 class AppRequestContext : public net::URLRequestContext { |
| 266 public: | 266 public: |
| 267 AppRequestContext(); | 267 AppRequestContext(); |
| 268 | 268 |
| 269 void SetCookieStore(std::unique_ptr<net::CookieStore> cookie_store); | 269 void SetCookieStore(std::unique_ptr<net::CookieStore> cookie_store); |
| 270 void SetChannelIDService( |
| 271 std::unique_ptr<net::ChannelIDService> channel_id_service); |
| 272 void SetHttpNetworkSession( |
| 273 std::unique_ptr<net::HttpNetworkSession> http_network_session); |
| 270 void SetHttpTransactionFactory( | 274 void SetHttpTransactionFactory( |
| 271 std::unique_ptr<net::HttpTransactionFactory> http_factory); | 275 std::unique_ptr<net::HttpTransactionFactory> http_factory); |
| 272 void SetJobFactory(std::unique_ptr<net::URLRequestJobFactory> job_factory); | 276 void SetJobFactory(std::unique_ptr<net::URLRequestJobFactory> job_factory); |
| 273 | 277 |
| 274 private: | 278 private: |
| 275 ~AppRequestContext() override; | 279 ~AppRequestContext() override; |
| 276 | 280 |
| 277 std::unique_ptr<net::CookieStore> cookie_store_; | 281 std::unique_ptr<net::CookieStore> cookie_store_; |
| 282 std::unique_ptr<net::ChannelIDService> channel_id_service_; |
| 283 std::unique_ptr<net::HttpNetworkSession> http_network_session_; |
| 278 std::unique_ptr<net::HttpTransactionFactory> http_factory_; | 284 std::unique_ptr<net::HttpTransactionFactory> http_factory_; |
| 279 std::unique_ptr<net::URLRequestJobFactory> job_factory_; | 285 std::unique_ptr<net::URLRequestJobFactory> job_factory_; |
| 280 }; | 286 }; |
| 281 | 287 |
| 282 // Created on the UI thread, read on the IO thread during ProfileIOData lazy | 288 // Created on the UI thread, read on the IO thread during ProfileIOData lazy |
| 283 // initialization. | 289 // initialization. |
| 284 struct ProfileParams { | 290 struct ProfileParams { |
| 285 ProfileParams(); | 291 ProfileParams(); |
| 286 ~ProfileParams(); | 292 ~ProfileParams(); |
| 287 | 293 |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 | 601 |
| 596 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 602 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
| 597 bool initialized_on_UI_thread_; | 603 bool initialized_on_UI_thread_; |
| 598 | 604 |
| 599 const Profile::ProfileType profile_type_; | 605 const Profile::ProfileType profile_type_; |
| 600 | 606 |
| 601 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 607 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
| 602 }; | 608 }; |
| 603 | 609 |
| 604 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 610 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| OLD | NEW |