| 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 virtual chrome_browser_net::Predictor* GetPredictor(); | 264 virtual chrome_browser_net::Predictor* GetPredictor(); |
| 265 | 265 |
| 266 // Get platform ClientCertStore. May return nullptr. | 266 // Get platform ClientCertStore. May return nullptr. |
| 267 std::unique_ptr<net::ClientCertStore> CreateClientCertStore(); | 267 std::unique_ptr<net::ClientCertStore> CreateClientCertStore(); |
| 268 | 268 |
| 269 protected: | 269 protected: |
| 270 // A URLRequestContext for media that owns its HTTP factory, to ensure | 270 // A URLRequestContext for media that owns its HTTP factory, to ensure |
| 271 // it is deleted. | 271 // it is deleted. |
| 272 class MediaRequestContext : public net::URLRequestContext { | 272 class MediaRequestContext : public net::URLRequestContext { |
| 273 public: | 273 public: |
| 274 MediaRequestContext(); | 274 // |name| is used to describe this context. Currently there are two kinds of |
| 275 // media request context -- main media request context ("main_meda") and |
| 276 // isolated app media request context ("isolated_media"). |
| 277 explicit MediaRequestContext(const std::string& name); |
| 275 | 278 |
| 276 void SetHttpTransactionFactory( | 279 void SetHttpTransactionFactory( |
| 277 std::unique_ptr<net::HttpTransactionFactory> http_factory); | 280 std::unique_ptr<net::HttpTransactionFactory> http_factory); |
| 278 | 281 |
| 279 private: | 282 private: |
| 280 ~MediaRequestContext() override; | 283 ~MediaRequestContext() override; |
| 281 | 284 |
| 282 std::unique_ptr<net::HttpTransactionFactory> http_factory_; | 285 std::unique_ptr<net::HttpTransactionFactory> http_factory_; |
| 283 }; | 286 }; |
| 284 | 287 |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 std::unique_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 488 std::unique_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
| 486 protocol_handler_interceptor, | 489 protocol_handler_interceptor, |
| 487 content::ProtocolHandlerMap* protocol_handlers, | 490 content::ProtocolHandlerMap* protocol_handlers, |
| 488 content::URLRequestInterceptorScopedVector request_interceptors) | 491 content::URLRequestInterceptorScopedVector request_interceptors) |
| 489 const = 0; | 492 const = 0; |
| 490 | 493 |
| 491 // Does an on-demand initialization of a media RequestContext for the given | 494 // Does an on-demand initialization of a media RequestContext for the given |
| 492 // isolated app. | 495 // isolated app. |
| 493 virtual net::URLRequestContext* InitializeMediaRequestContext( | 496 virtual net::URLRequestContext* InitializeMediaRequestContext( |
| 494 net::URLRequestContext* original_context, | 497 net::URLRequestContext* original_context, |
| 495 const StoragePartitionDescriptor& details) const = 0; | 498 const StoragePartitionDescriptor& details, |
| 499 const std::string& name) const = 0; |
| 496 | 500 |
| 497 // These functions are used to transfer ownership of the lazily initialized | 501 // These functions are used to transfer ownership of the lazily initialized |
| 498 // context from ProfileIOData to the URLRequestContextGetter. | 502 // context from ProfileIOData to the URLRequestContextGetter. |
| 499 virtual net::URLRequestContext* | 503 virtual net::URLRequestContext* |
| 500 AcquireMediaRequestContext() const = 0; | 504 AcquireMediaRequestContext() const = 0; |
| 501 virtual net::URLRequestContext* AcquireIsolatedAppRequestContext( | 505 virtual net::URLRequestContext* AcquireIsolatedAppRequestContext( |
| 502 net::URLRequestContext* main_context, | 506 net::URLRequestContext* main_context, |
| 503 const StoragePartitionDescriptor& partition_descriptor, | 507 const StoragePartitionDescriptor& partition_descriptor, |
| 504 std::unique_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 508 std::unique_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
| 505 protocol_handler_interceptor, | 509 protocol_handler_interceptor, |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 mutable std::unique_ptr<certificate_transparency::TreeStateTracker> | 635 mutable std::unique_ptr<certificate_transparency::TreeStateTracker> |
| 632 ct_tree_tracker_; | 636 ct_tree_tracker_; |
| 633 mutable base::Closure ct_tree_tracker_unregistration_; | 637 mutable base::Closure ct_tree_tracker_unregistration_; |
| 634 | 638 |
| 635 const Profile::ProfileType profile_type_; | 639 const Profile::ProfileType profile_type_; |
| 636 | 640 |
| 637 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 641 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
| 638 }; | 642 }; |
| 639 | 643 |
| 640 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 644 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| OLD | NEW |