| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // Returns true if |scheme| is handled in Chrome, or by default handlers in | 72 // Returns true if |scheme| is handled in Chrome, or by default handlers in |
| 73 // net::URLRequest. | 73 // net::URLRequest. |
| 74 static bool IsHandledProtocol(const std::string& scheme); | 74 static bool IsHandledProtocol(const std::string& scheme); |
| 75 | 75 |
| 76 // Returns true if |url| is handled in Chrome, or by default handlers in | 76 // Returns true if |url| is handled in Chrome, or by default handlers in |
| 77 // net::URLRequest. | 77 // net::URLRequest. |
| 78 static bool IsHandledURL(const GURL& url); | 78 static bool IsHandledURL(const GURL& url); |
| 79 | 79 |
| 80 // Called by Profile. | 80 // Called by Profile. |
| 81 content::ResourceContext* GetResourceContext() const; | 81 content::ResourceContext* GetResourceContext() const; |
| 82 ChromeURLDataManagerBackend* GetChromeURLDataManagerBackend() const; | |
| 83 | 82 |
| 84 // These should only be called at most once each. Ownership is reversed when | 83 // These should only be called at most once each. Ownership is reversed when |
| 85 // they get called, from ProfileIOData owning ChromeURLRequestContext to vice | 84 // they get called, from ProfileIOData owning ChromeURLRequestContext to vice |
| 86 // versa. | 85 // versa. |
| 87 ChromeURLRequestContext* GetMainRequestContext() const; | 86 ChromeURLRequestContext* GetMainRequestContext() const; |
| 88 ChromeURLRequestContext* GetMediaRequestContext() const; | 87 ChromeURLRequestContext* GetMediaRequestContext() const; |
| 89 ChromeURLRequestContext* GetExtensionsRequestContext() const; | 88 ChromeURLRequestContext* GetExtensionsRequestContext() const; |
| 90 ChromeURLRequestContext* GetIsolatedAppRequestContext( | 89 ChromeURLRequestContext* GetIsolatedAppRequestContext( |
| 91 ChromeURLRequestContext* main_context, | 90 ChromeURLRequestContext* main_context, |
| 92 const StoragePartitionDescriptor& partition_descriptor, | 91 const StoragePartitionDescriptor& partition_descriptor, |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 | 268 |
| 270 // Lazy initializes the ProfileIOData object the first time a request context | 269 // Lazy initializes the ProfileIOData object the first time a request context |
| 271 // is requested. The lazy logic is implemented here. The actual initialization | 270 // is requested. The lazy logic is implemented here. The actual initialization |
| 272 // is done in LazyInitializeInternal(), implemented by subtypes. Static helper | 271 // is done in LazyInitializeInternal(), implemented by subtypes. Static helper |
| 273 // functions have been provided to assist in common operations. | 272 // functions have been provided to assist in common operations. |
| 274 void LazyInitialize() const; | 273 void LazyInitialize() const; |
| 275 | 274 |
| 276 // Called when the profile is destroyed. | 275 // Called when the profile is destroyed. |
| 277 void ShutdownOnUIThread(); | 276 void ShutdownOnUIThread(); |
| 278 | 277 |
| 279 ChromeURLDataManagerBackend* chrome_url_data_manager_backend() const { | |
| 280 return chrome_url_data_manager_backend_.get(); | |
| 281 } | |
| 282 | |
| 283 // A ServerBoundCertService object is created by a derived class of | 278 // A ServerBoundCertService object is created by a derived class of |
| 284 // ProfileIOData, and the derived class calls this method to set the | 279 // ProfileIOData, and the derived class calls this method to set the |
| 285 // server_bound_cert_service_ member and transfers ownership to the base | 280 // server_bound_cert_service_ member and transfers ownership to the base |
| 286 // class. | 281 // class. |
| 287 void set_server_bound_cert_service( | 282 void set_server_bound_cert_service( |
| 288 net::ServerBoundCertService* server_bound_cert_service) const; | 283 net::ServerBoundCertService* server_bound_cert_service) const; |
| 289 | 284 |
| 290 ChromeNetworkDelegate* network_delegate() const { | 285 ChromeNetworkDelegate* network_delegate() const { |
| 291 return network_delegate_.get(); | 286 return network_delegate_.get(); |
| 292 } | 287 } |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 bool enable_metrics_; | 437 bool enable_metrics_; |
| 443 #else | 438 #else |
| 444 BooleanPrefMember enable_metrics_; | 439 BooleanPrefMember enable_metrics_; |
| 445 #endif | 440 #endif |
| 446 | 441 |
| 447 // Pointed to by NetworkDelegate. | 442 // Pointed to by NetworkDelegate. |
| 448 mutable scoped_ptr<policy::URLBlacklistManager> url_blacklist_manager_; | 443 mutable scoped_ptr<policy::URLBlacklistManager> url_blacklist_manager_; |
| 449 | 444 |
| 450 // Pointed to by URLRequestContext. | 445 // Pointed to by URLRequestContext. |
| 451 mutable scoped_refptr<ExtensionInfoMap> extension_info_map_; | 446 mutable scoped_refptr<ExtensionInfoMap> extension_info_map_; |
| 452 mutable scoped_ptr<ChromeURLDataManagerBackend> | |
| 453 chrome_url_data_manager_backend_; | |
| 454 mutable scoped_ptr<net::ServerBoundCertService> server_bound_cert_service_; | 447 mutable scoped_ptr<net::ServerBoundCertService> server_bound_cert_service_; |
| 455 mutable scoped_ptr<ChromeNetworkDelegate> network_delegate_; | 448 mutable scoped_ptr<ChromeNetworkDelegate> network_delegate_; |
| 456 mutable scoped_ptr<net::FraudulentCertificateReporter> | 449 mutable scoped_ptr<net::FraudulentCertificateReporter> |
| 457 fraudulent_certificate_reporter_; | 450 fraudulent_certificate_reporter_; |
| 458 mutable scoped_ptr<net::ProxyService> proxy_service_; | 451 mutable scoped_ptr<net::ProxyService> proxy_service_; |
| 459 mutable scoped_ptr<net::TransportSecurityState> transport_security_state_; | 452 mutable scoped_ptr<net::TransportSecurityState> transport_security_state_; |
| 460 mutable scoped_ptr<net::HttpServerProperties> | 453 mutable scoped_ptr<net::HttpServerProperties> |
| 461 http_server_properties_; | 454 http_server_properties_; |
| 462 | 455 |
| 463 #if defined(ENABLE_NOTIFICATIONS) | 456 #if defined(ENABLE_NOTIFICATIONS) |
| (...skipping 29 matching lines...) Expand all Loading... |
| 493 | 486 |
| 494 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 487 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
| 495 bool initialized_on_UI_thread_; | 488 bool initialized_on_UI_thread_; |
| 496 | 489 |
| 497 bool is_incognito_; | 490 bool is_incognito_; |
| 498 | 491 |
| 499 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 492 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
| 500 }; | 493 }; |
| 501 | 494 |
| 502 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 495 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| OLD | NEW |