| 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 <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 // A URLRequestContext for media that owns its HTTP factory, to ensure | 266 // A URLRequestContext for media that owns its HTTP factory, to ensure |
| 267 // it is deleted. | 267 // it is deleted. |
| 268 class MediaRequestContext : public net::URLRequestContext { | 268 class MediaRequestContext : public net::URLRequestContext { |
| 269 public: | 269 public: |
| 270 MediaRequestContext(); | 270 MediaRequestContext(); |
| 271 | 271 |
| 272 void SetHttpTransactionFactory( | 272 void SetHttpTransactionFactory( |
| 273 scoped_ptr<net::HttpTransactionFactory> http_factory); | 273 scoped_ptr<net::HttpTransactionFactory> http_factory); |
| 274 | 274 |
| 275 private: | 275 private: |
| 276 virtual ~MediaRequestContext(); | 276 ~MediaRequestContext() override; |
| 277 | 277 |
| 278 scoped_ptr<net::HttpTransactionFactory> http_factory_; | 278 scoped_ptr<net::HttpTransactionFactory> http_factory_; |
| 279 }; | 279 }; |
| 280 | 280 |
| 281 // A URLRequestContext for apps that owns its cookie store and HTTP factory, | 281 // A URLRequestContext for apps that owns its cookie store and HTTP factory, |
| 282 // to ensure they are deleted. | 282 // to ensure they are deleted. |
| 283 class AppRequestContext : public net::URLRequestContext { | 283 class AppRequestContext : public net::URLRequestContext { |
| 284 public: | 284 public: |
| 285 AppRequestContext(); | 285 AppRequestContext(); |
| 286 | 286 |
| 287 void SetCookieStore(net::CookieStore* cookie_store); | 287 void SetCookieStore(net::CookieStore* cookie_store); |
| 288 void SetHttpTransactionFactory( | 288 void SetHttpTransactionFactory( |
| 289 scoped_ptr<net::HttpTransactionFactory> http_factory); | 289 scoped_ptr<net::HttpTransactionFactory> http_factory); |
| 290 void SetJobFactory(scoped_ptr<net::URLRequestJobFactory> job_factory); | 290 void SetJobFactory(scoped_ptr<net::URLRequestJobFactory> job_factory); |
| 291 | 291 |
| 292 private: | 292 private: |
| 293 virtual ~AppRequestContext(); | 293 ~AppRequestContext() override; |
| 294 | 294 |
| 295 scoped_refptr<net::CookieStore> cookie_store_; | 295 scoped_refptr<net::CookieStore> cookie_store_; |
| 296 scoped_ptr<net::HttpTransactionFactory> http_factory_; | 296 scoped_ptr<net::HttpTransactionFactory> http_factory_; |
| 297 scoped_ptr<net::URLRequestJobFactory> job_factory_; | 297 scoped_ptr<net::URLRequestJobFactory> job_factory_; |
| 298 }; | 298 }; |
| 299 | 299 |
| 300 // Created on the UI thread, read on the IO thread during ProfileIOData lazy | 300 // Created on the UI thread, read on the IO thread during ProfileIOData lazy |
| 301 // initialization. | 301 // initialization. |
| 302 struct ProfileParams { | 302 struct ProfileParams { |
| 303 ProfileParams(); | 303 ProfileParams(); |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 net::HttpCache::BackendFactory* backend) const; | 479 net::HttpCache::BackendFactory* backend) const; |
| 480 | 480 |
| 481 void SetCookieSettingsForTesting(CookieSettings* cookie_settings); | 481 void SetCookieSettingsForTesting(CookieSettings* cookie_settings); |
| 482 | 482 |
| 483 void set_signin_names_for_testing(SigninNamesOnIOThread* signin_names); | 483 void set_signin_names_for_testing(SigninNamesOnIOThread* signin_names); |
| 484 | 484 |
| 485 private: | 485 private: |
| 486 class ResourceContext : public content::ResourceContext { | 486 class ResourceContext : public content::ResourceContext { |
| 487 public: | 487 public: |
| 488 explicit ResourceContext(ProfileIOData* io_data); | 488 explicit ResourceContext(ProfileIOData* io_data); |
| 489 virtual ~ResourceContext(); | 489 ~ResourceContext() override; |
| 490 | 490 |
| 491 // ResourceContext implementation: | 491 // ResourceContext implementation: |
| 492 virtual net::HostResolver* GetHostResolver() override; | 492 net::HostResolver* GetHostResolver() override; |
| 493 virtual net::URLRequestContext* GetRequestContext() override; | 493 net::URLRequestContext* GetRequestContext() override; |
| 494 virtual scoped_ptr<net::ClientCertStore> CreateClientCertStore() override; | 494 scoped_ptr<net::ClientCertStore> CreateClientCertStore() override; |
| 495 virtual void CreateKeygenHandler( | 495 void CreateKeygenHandler( |
| 496 uint32 key_size_in_bits, | 496 uint32 key_size_in_bits, |
| 497 const std::string& challenge_string, | 497 const std::string& challenge_string, |
| 498 const GURL& url, | 498 const GURL& url, |
| 499 const base::Callback<void(scoped_ptr<net::KeygenHandler>)>& callback) | 499 const base::Callback<void(scoped_ptr<net::KeygenHandler>)>& callback) |
| 500 override; | 500 override; |
| 501 virtual SaltCallback GetMediaDeviceIDSalt() override; | 501 SaltCallback GetMediaDeviceIDSalt() override; |
| 502 | 502 |
| 503 private: | 503 private: |
| 504 friend class ProfileIOData; | 504 friend class ProfileIOData; |
| 505 | 505 |
| 506 ProfileIOData* const io_data_; | 506 ProfileIOData* const io_data_; |
| 507 | 507 |
| 508 net::HostResolver* host_resolver_; | 508 net::HostResolver* host_resolver_; |
| 509 net::URLRequestContext* request_context_; | 509 net::URLRequestContext* request_context_; |
| 510 }; | 510 }; |
| 511 | 511 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 | 702 |
| 703 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 703 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
| 704 bool initialized_on_UI_thread_; | 704 bool initialized_on_UI_thread_; |
| 705 | 705 |
| 706 const Profile::ProfileType profile_type_; | 706 const Profile::ProfileType profile_type_; |
| 707 | 707 |
| 708 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 708 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
| 709 }; | 709 }; |
| 710 | 710 |
| 711 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 711 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| OLD | NEW |