| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 void DisableQuicOnIOThread(); | 257 void DisableQuicOnIOThread(); |
| 258 | 258 |
| 259 protected: | 259 protected: |
| 260 // A URLRequestContext for media that owns its HTTP factory, to ensure | 260 // A URLRequestContext for media that owns its HTTP factory, to ensure |
| 261 // it is deleted. | 261 // it is deleted. |
| 262 class MediaRequestContext : public net::URLRequestContext { | 262 class MediaRequestContext : public net::URLRequestContext { |
| 263 public: | 263 public: |
| 264 // |name| is used to describe this context. Currently there are two kinds of | 264 // |name| is used to describe this context. Currently there are two kinds of |
| 265 // media request context -- main media request context ("main_meda") and | 265 // media request context -- main media request context ("main_meda") and |
| 266 // isolated app media request context ("isolated_media"). | 266 // isolated app media request context ("isolated_media"). |
| 267 explicit MediaRequestContext(const std::string& name); | 267 explicit MediaRequestContext(const char* name); |
| 268 | 268 |
| 269 void SetHttpTransactionFactory( | 269 void SetHttpTransactionFactory( |
| 270 std::unique_ptr<net::HttpTransactionFactory> http_factory); | 270 std::unique_ptr<net::HttpTransactionFactory> http_factory); |
| 271 | 271 |
| 272 private: | 272 private: |
| 273 ~MediaRequestContext() override; | 273 ~MediaRequestContext() override; |
| 274 | 274 |
| 275 std::unique_ptr<net::HttpTransactionFactory> http_factory_; | 275 std::unique_ptr<net::HttpTransactionFactory> http_factory_; |
| 276 }; | 276 }; |
| 277 | 277 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 protocol_handler_interceptor, | 474 protocol_handler_interceptor, |
| 475 content::ProtocolHandlerMap* protocol_handlers, | 475 content::ProtocolHandlerMap* protocol_handlers, |
| 476 content::URLRequestInterceptorScopedVector request_interceptors) | 476 content::URLRequestInterceptorScopedVector request_interceptors) |
| 477 const = 0; | 477 const = 0; |
| 478 | 478 |
| 479 // Does an on-demand initialization of a media RequestContext for the given | 479 // Does an on-demand initialization of a media RequestContext for the given |
| 480 // isolated app. | 480 // isolated app. |
| 481 virtual net::URLRequestContext* InitializeMediaRequestContext( | 481 virtual net::URLRequestContext* InitializeMediaRequestContext( |
| 482 net::URLRequestContext* original_context, | 482 net::URLRequestContext* original_context, |
| 483 const StoragePartitionDescriptor& details, | 483 const StoragePartitionDescriptor& details, |
| 484 const std::string& name) const = 0; | 484 const char* name) const = 0; |
| 485 | 485 |
| 486 // These functions are used to transfer ownership of the lazily initialized | 486 // These functions are used to transfer ownership of the lazily initialized |
| 487 // context from ProfileIOData to the URLRequestContextGetter. | 487 // context from ProfileIOData to the URLRequestContextGetter. |
| 488 virtual net::URLRequestContext* | 488 virtual net::URLRequestContext* |
| 489 AcquireMediaRequestContext() const = 0; | 489 AcquireMediaRequestContext() const = 0; |
| 490 virtual net::URLRequestContext* AcquireIsolatedAppRequestContext( | 490 virtual net::URLRequestContext* AcquireIsolatedAppRequestContext( |
| 491 net::URLRequestContext* main_context, | 491 net::URLRequestContext* main_context, |
| 492 const StoragePartitionDescriptor& partition_descriptor, | 492 const StoragePartitionDescriptor& partition_descriptor, |
| 493 std::unique_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 493 std::unique_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
| 494 protocol_handler_interceptor, | 494 protocol_handler_interceptor, |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 mutable std::unique_ptr<certificate_transparency::TreeStateTracker> | 620 mutable std::unique_ptr<certificate_transparency::TreeStateTracker> |
| 621 ct_tree_tracker_; | 621 ct_tree_tracker_; |
| 622 mutable base::Closure ct_tree_tracker_unregistration_; | 622 mutable base::Closure ct_tree_tracker_unregistration_; |
| 623 | 623 |
| 624 const Profile::ProfileType profile_type_; | 624 const Profile::ProfileType profile_type_; |
| 625 | 625 |
| 626 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 626 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
| 627 }; | 627 }; |
| 628 | 628 |
| 629 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 629 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| OLD | NEW |