| 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" |
| 11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "base/prefs/pref_member.h" | 16 #include "base/prefs/pref_member.h" |
| 17 #include "base/synchronization/lock.h" | 17 #include "base/synchronization/lock.h" |
| 18 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 18 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| 19 #include "chrome/browser/io_thread.h" | 19 #include "chrome/browser/io_thread.h" |
| 20 #include "chrome/browser/net/chrome_url_request_context.h" | 20 #include "chrome/browser/net/chrome_url_request_context.h" |
| 21 #include "chrome/browser/profiles/storage_partition_descriptor.h" | 21 #include "chrome/browser/profiles/storage_partition_descriptor.h" |
| 22 #include "chrome/common/content_settings_types.h" | 22 #include "chrome/common/content_settings_types.h" |
| 23 #include "content/public/browser/content_browser_client.h" | 23 #include "content/public/browser/content_browser_client.h" |
| 24 #include "content/public/browser/resource_context.h" | 24 #include "content/public/browser/resource_context.h" |
| 25 #include "net/cookies/cookie_monster.h" | 25 #include "net/cookies/cookie_monster.h" |
| 26 #include "net/http/http_network_session.h" | 26 #include "net/http/http_network_session.h" |
| 27 #include "net/url_request/url_request_job_factory.h" | 27 #include "net/url_request/url_request_job_factory.h" |
| 28 | 28 |
| 29 #if defined(USE_NSS) |
| 30 #include "crypto/scoped_nss_types.h" |
| 31 #endif |
| 32 |
| 29 class ChromeHttpUserAgentSettings; | 33 class ChromeHttpUserAgentSettings; |
| 30 class ChromeNetworkDelegate; | 34 class ChromeNetworkDelegate; |
| 31 class CookieSettings; | 35 class CookieSettings; |
| 32 class DesktopNotificationService; | 36 class DesktopNotificationService; |
| 33 class ExtensionInfoMap; | 37 class ExtensionInfoMap; |
| 34 class HostContentSettingsMap; | 38 class HostContentSettingsMap; |
| 35 class ManagedModeURLFilter; | 39 class ManagedModeURLFilter; |
| 36 class Profile; | 40 class Profile; |
| 37 class ProtocolHandlerRegistry; | 41 class ProtocolHandlerRegistry; |
| 38 class SigninNamesOnIOThread; | 42 class SigninNamesOnIOThread; |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 resource_prefetch_predictor_observer() const { | 189 resource_prefetch_predictor_observer() const { |
| 186 return resource_prefetch_predictor_observer_.get(); | 190 return resource_prefetch_predictor_observer_.get(); |
| 187 } | 191 } |
| 188 | 192 |
| 189 #if defined(ENABLE_MANAGED_USERS) | 193 #if defined(ENABLE_MANAGED_USERS) |
| 190 const ManagedModeURLFilter* managed_mode_url_filter() const { | 194 const ManagedModeURLFilter* managed_mode_url_filter() const { |
| 191 return managed_mode_url_filter_.get(); | 195 return managed_mode_url_filter_.get(); |
| 192 } | 196 } |
| 193 #endif | 197 #endif |
| 194 | 198 |
| 199 #if defined(USE_NSS) |
| 200 crypto::ScopedPK11Slot GetPublicNSSKeySlot() const; |
| 201 crypto::ScopedPK11Slot GetPrivateNSSKeySlot() const; |
| 202 #endif |
| 203 |
| 195 // Initialize the member needed to track the metrics enabled state. This is | 204 // Initialize the member needed to track the metrics enabled state. This is |
| 196 // only to be called on the UI thread. | 205 // only to be called on the UI thread. |
| 197 void InitializeMetricsEnabledStateOnUIThread(); | 206 void InitializeMetricsEnabledStateOnUIThread(); |
| 198 | 207 |
| 199 // Returns whether or not metrics reporting is enabled in the browser instance | 208 // Returns whether or not metrics reporting is enabled in the browser instance |
| 200 // on which this profile resides. This is safe for use from the IO thread, and | 209 // on which this profile resides. This is safe for use from the IO thread, and |
| 201 // should only be called from there. | 210 // should only be called from there. |
| 202 bool GetMetricsEnabledStateOnIOThread() const; | 211 bool GetMetricsEnabledStateOnIOThread() const; |
| 203 | 212 |
| 204 protected: | 213 protected: |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 scoped_ptr<net::ProxyConfigService> proxy_config_service; | 280 scoped_ptr<net::ProxyConfigService> proxy_config_service; |
| 272 | 281 |
| 273 #if defined(ENABLE_MANAGED_USERS) | 282 #if defined(ENABLE_MANAGED_USERS) |
| 274 scoped_refptr<const ManagedModeURLFilter> managed_mode_url_filter; | 283 scoped_refptr<const ManagedModeURLFilter> managed_mode_url_filter; |
| 275 #endif | 284 #endif |
| 276 | 285 |
| 277 #if defined(OS_CHROMEOS) | 286 #if defined(OS_CHROMEOS) |
| 278 scoped_ptr<policy::PolicyCertVerifier> cert_verifier; | 287 scoped_ptr<policy::PolicyCertVerifier> cert_verifier; |
| 279 #endif | 288 #endif |
| 280 | 289 |
| 290 #if defined(USE_NSS) |
| 291 crypto::ScopedPK11Slot public_slot; |
| 292 crypto::ScopedPK11Slot private_slot; |
| 293 #endif |
| 294 |
| 281 // The profile this struct was populated from. It's passed as a void* to | 295 // The profile this struct was populated from. It's passed as a void* to |
| 282 // ensure it's not accidently used on the IO thread. Before using it on the | 296 // ensure it's not accidently used on the IO thread. Before using it on the |
| 283 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive. | 297 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive. |
| 284 void* profile; | 298 void* profile; |
| 285 }; | 299 }; |
| 286 | 300 |
| 287 explicit ProfileIOData(bool is_incognito); | 301 explicit ProfileIOData(bool is_incognito); |
| 288 | 302 |
| 289 static std::string GetSSLSessionCacheShard(); | 303 static std::string GetSSLSessionCacheShard(); |
| 290 | 304 |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 mutable scoped_ptr<ChromeNetworkDelegate> network_delegate_; | 506 mutable scoped_ptr<ChromeNetworkDelegate> network_delegate_; |
| 493 mutable scoped_ptr<net::FraudulentCertificateReporter> | 507 mutable scoped_ptr<net::FraudulentCertificateReporter> |
| 494 fraudulent_certificate_reporter_; | 508 fraudulent_certificate_reporter_; |
| 495 mutable scoped_ptr<net::ProxyService> proxy_service_; | 509 mutable scoped_ptr<net::ProxyService> proxy_service_; |
| 496 mutable scoped_ptr<net::TransportSecurityState> transport_security_state_; | 510 mutable scoped_ptr<net::TransportSecurityState> transport_security_state_; |
| 497 mutable scoped_ptr<net::HttpServerProperties> | 511 mutable scoped_ptr<net::HttpServerProperties> |
| 498 http_server_properties_; | 512 http_server_properties_; |
| 499 #if defined(OS_CHROMEOS) | 513 #if defined(OS_CHROMEOS) |
| 500 mutable scoped_ptr<net::CertVerifier> cert_verifier_; | 514 mutable scoped_ptr<net::CertVerifier> cert_verifier_; |
| 501 #endif | 515 #endif |
| 516 #if defined(USE_NSS) |
| 517 mutable crypto::ScopedPK11Slot public_slot_; |
| 518 mutable crypto::ScopedPK11Slot private_slot_; |
| 519 #endif |
| 502 | 520 |
| 503 #if defined(ENABLE_NOTIFICATIONS) | 521 #if defined(ENABLE_NOTIFICATIONS) |
| 504 mutable DesktopNotificationService* notification_service_; | 522 mutable DesktopNotificationService* notification_service_; |
| 505 #endif | 523 #endif |
| 506 | 524 |
| 507 mutable scoped_ptr<TransportSecurityPersister> | 525 mutable scoped_ptr<TransportSecurityPersister> |
| 508 transport_security_persister_; | 526 transport_security_persister_; |
| 509 | 527 |
| 510 // These are only valid in between LazyInitialize() and their accessor being | 528 // These are only valid in between LazyInitialize() and their accessor being |
| 511 // called. | 529 // called. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 535 | 553 |
| 536 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 554 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
| 537 bool initialized_on_UI_thread_; | 555 bool initialized_on_UI_thread_; |
| 538 | 556 |
| 539 bool is_incognito_; | 557 bool is_incognito_; |
| 540 | 558 |
| 541 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 559 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
| 542 }; | 560 }; |
| 543 | 561 |
| 544 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 562 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| OLD | NEW |