Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 22 class CommandLine; | 22 class CommandLine; |
| 23 class ChromeAppCacheService; | 23 class ChromeAppCacheService; |
| 24 class ChromeBlobStorageContext; | 24 class ChromeBlobStorageContext; |
| 25 class DesktopNotificationService; | 25 class DesktopNotificationService; |
| 26 class ExtensionInfoMap; | 26 class ExtensionInfoMap; |
| 27 class HostContentSettingsMap; | 27 class HostContentSettingsMap; |
| 28 class HostZoomMap; | 28 class HostZoomMap; |
| 29 class IOThread; | 29 class IOThread; |
| 30 class Profile; | 30 class Profile; |
| 31 class ProtocolHandlerRegistry; | 31 class ProtocolHandlerRegistry; |
| 32 class TransportSecurityPersister; | |
| 32 | 33 |
| 33 namespace fileapi { | 34 namespace fileapi { |
| 34 class FileSystemContext; | 35 class FileSystemContext; |
| 35 } // namespace fileapi | 36 } // namespace fileapi |
| 36 | 37 |
| 37 namespace net { | 38 namespace net { |
| 38 class CookieStore; | 39 class CookieStore; |
| 39 class DnsCertProvenanceChecker; | 40 class DnsCertProvenanceChecker; |
| 40 class HttpTransactionFactory; | 41 class HttpTransactionFactory; |
| 41 class NetLog; | 42 class NetLog; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 } | 106 } |
| 106 | 107 |
| 107 ChromeURLRequestContext* extensions_request_context() const { | 108 ChromeURLRequestContext* extensions_request_context() const { |
| 108 return extensions_request_context_.get(); | 109 return extensions_request_context_.get(); |
| 109 } | 110 } |
| 110 | 111 |
| 111 BooleanPrefMember* safe_browsing_enabled() const { | 112 BooleanPrefMember* safe_browsing_enabled() const { |
| 112 return &safe_browsing_enabled_; | 113 return &safe_browsing_enabled_; |
| 113 } | 114 } |
| 114 | 115 |
| 116 net::TransportSecurityState* transport_security_state() const { | |
| 117 return transport_security_state_.get(); | |
| 118 } | |
| 119 | |
| 115 protected: | 120 protected: |
| 116 class AppRequestContext : public ChromeURLRequestContext { | 121 class AppRequestContext : public ChromeURLRequestContext { |
| 117 public: | 122 public: |
| 118 AppRequestContext(); | 123 AppRequestContext(); |
| 119 virtual ~AppRequestContext(); | 124 virtual ~AppRequestContext(); |
| 120 | 125 |
| 121 void SetCookieStore(net::CookieStore* cookie_store); | 126 void SetCookieStore(net::CookieStore* cookie_store); |
| 122 void SetHttpTransactionFactory(net::HttpTransactionFactory* http_factory); | 127 void SetHttpTransactionFactory(net::HttpTransactionFactory* http_factory); |
| 123 | 128 |
| 124 private: | 129 private: |
| 125 scoped_refptr<net::CookieStore> cookie_store_; | 130 scoped_refptr<net::CookieStore> cookie_store_; |
| 126 scoped_ptr<net::HttpTransactionFactory> http_factory_; | 131 scoped_ptr<net::HttpTransactionFactory> http_factory_; |
| 127 }; | 132 }; |
| 128 | 133 |
| 129 // Created on the UI thread, read on the IO thread during ProfileIOData lazy | 134 // Created on the UI thread, read on the IO thread during ProfileIOData lazy |
| 130 // initialization. | 135 // initialization. |
| 131 struct ProfileParams { | 136 struct ProfileParams { |
| 132 ProfileParams(); | 137 ProfileParams(); |
| 133 ~ProfileParams(); | 138 ~ProfileParams(); |
| 134 | 139 |
| 140 FilePath path; | |
| 135 bool is_incognito; | 141 bool is_incognito; |
| 136 bool clear_local_state_on_exit; | 142 bool clear_local_state_on_exit; |
| 137 std::string accept_language; | 143 std::string accept_language; |
| 138 std::string accept_charset; | 144 std::string accept_charset; |
| 139 std::string referrer_charset; | 145 std::string referrer_charset; |
| 140 IOThread* io_thread; | 146 IOThread* io_thread; |
| 141 scoped_refptr<HostContentSettingsMap> host_content_settings_map; | 147 scoped_refptr<HostContentSettingsMap> host_content_settings_map; |
| 142 scoped_refptr<HostZoomMap> host_zoom_map; | 148 scoped_refptr<HostZoomMap> host_zoom_map; |
| 143 scoped_refptr<net::TransportSecurityState> transport_security_state; | |
| 144 scoped_refptr<net::SSLConfigService> ssl_config_service; | 149 scoped_refptr<net::SSLConfigService> ssl_config_service; |
| 145 scoped_refptr<net::CookieMonster::Delegate> cookie_monster_delegate; | 150 scoped_refptr<net::CookieMonster::Delegate> cookie_monster_delegate; |
| 146 scoped_refptr<webkit_database::DatabaseTracker> database_tracker; | 151 scoped_refptr<webkit_database::DatabaseTracker> database_tracker; |
| 147 scoped_refptr<ChromeAppCacheService> appcache_service; | 152 scoped_refptr<ChromeAppCacheService> appcache_service; |
| 148 scoped_refptr<ChromeBlobStorageContext> blob_storage_context; | 153 scoped_refptr<ChromeBlobStorageContext> blob_storage_context; |
| 149 scoped_refptr<fileapi::FileSystemContext> file_system_context; | 154 scoped_refptr<fileapi::FileSystemContext> file_system_context; |
| 150 scoped_refptr<quota::QuotaManager> quota_manager; | 155 scoped_refptr<quota::QuotaManager> quota_manager; |
| 151 scoped_refptr<ExtensionInfoMap> extension_info_map; | 156 scoped_refptr<ExtensionInfoMap> extension_info_map; |
| 152 DesktopNotificationService* notification_service; | 157 DesktopNotificationService* notification_service; |
| 153 base::Callback<prerender::PrerenderManager*(void)> prerender_manager_getter; | 158 base::Callback<prerender::PrerenderManager*(void)> prerender_manager_getter; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 265 // Pointed to by NetworkDelegate. | 270 // Pointed to by NetworkDelegate. |
| 266 mutable scoped_ptr<policy::URLBlacklistManager> url_blacklist_manager_; | 271 mutable scoped_ptr<policy::URLBlacklistManager> url_blacklist_manager_; |
| 267 | 272 |
| 268 // Pointed to by URLRequestContext. | 273 // Pointed to by URLRequestContext. |
| 269 mutable scoped_ptr<ChromeURLDataManagerBackend> | 274 mutable scoped_ptr<ChromeURLDataManagerBackend> |
| 270 chrome_url_data_manager_backend_; | 275 chrome_url_data_manager_backend_; |
| 271 mutable scoped_ptr<net::OriginBoundCertService> origin_bound_cert_service_; | 276 mutable scoped_ptr<net::OriginBoundCertService> origin_bound_cert_service_; |
| 272 mutable scoped_ptr<net::NetworkDelegate> network_delegate_; | 277 mutable scoped_ptr<net::NetworkDelegate> network_delegate_; |
| 273 mutable scoped_ptr<net::DnsCertProvenanceChecker> dns_cert_checker_; | 278 mutable scoped_ptr<net::DnsCertProvenanceChecker> dns_cert_checker_; |
| 274 mutable scoped_ptr<net::ProxyService> proxy_service_; | 279 mutable scoped_ptr<net::ProxyService> proxy_service_; |
| 280 mutable scoped_refptr<net::TransportSecurityState> transport_security_state_; | |
|
willchan no longer on Chromium
2011/09/20 01:29:51
I think it doesn't have to be refcounted anymore,
| |
| 275 mutable scoped_ptr<net::URLRequestJobFactory> job_factory_; | 281 mutable scoped_ptr<net::URLRequestJobFactory> job_factory_; |
| 276 | 282 |
| 277 // Pointed to by ResourceContext. | 283 // Pointed to by ResourceContext. |
| 278 mutable scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; | 284 mutable scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; |
| 279 mutable scoped_refptr<ChromeAppCacheService> appcache_service_; | 285 mutable scoped_refptr<ChromeAppCacheService> appcache_service_; |
| 280 mutable scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; | 286 mutable scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; |
| 281 mutable scoped_refptr<fileapi::FileSystemContext> file_system_context_; | 287 mutable scoped_refptr<fileapi::FileSystemContext> file_system_context_; |
| 282 mutable scoped_refptr<quota::QuotaManager> quota_manager_; | 288 mutable scoped_refptr<quota::QuotaManager> quota_manager_; |
| 283 mutable scoped_refptr<HostZoomMap> host_zoom_map_; | 289 mutable scoped_refptr<HostZoomMap> host_zoom_map_; |
| 284 | 290 |
| 285 // TODO(willchan): Remove from ResourceContext. | 291 // TODO(willchan): Remove from ResourceContext. |
| 286 mutable scoped_refptr<ExtensionInfoMap> extension_info_map_; | 292 mutable scoped_refptr<ExtensionInfoMap> extension_info_map_; |
| 287 mutable scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 293 mutable scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
| 288 mutable DesktopNotificationService* notification_service_; | 294 mutable DesktopNotificationService* notification_service_; |
| 289 mutable base::Callback<prerender::PrerenderManager*(void)> | 295 mutable base::Callback<prerender::PrerenderManager*(void)> |
| 290 prerender_manager_getter_; | 296 prerender_manager_getter_; |
| 291 | 297 |
| 292 mutable ResourceContext resource_context_; | 298 mutable ResourceContext resource_context_; |
| 293 | 299 |
| 300 mutable scoped_refptr<TransportSecurityPersister> | |
| 301 transport_security_persister_; | |
| 302 | |
| 294 // These are only valid in between LazyInitialize() and their accessor being | 303 // These are only valid in between LazyInitialize() and their accessor being |
| 295 // called. | 304 // called. |
| 296 mutable scoped_refptr<ChromeURLRequestContext> main_request_context_; | 305 mutable scoped_refptr<ChromeURLRequestContext> main_request_context_; |
| 297 mutable scoped_refptr<ChromeURLRequestContext> extensions_request_context_; | 306 mutable scoped_refptr<ChromeURLRequestContext> extensions_request_context_; |
| 298 // One AppRequestContext per isolated app. | 307 // One AppRequestContext per isolated app. |
| 299 mutable AppRequestContextMap app_request_context_map_; | 308 mutable AppRequestContextMap app_request_context_map_; |
| 300 | 309 |
| 301 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 310 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
| 302 }; | 311 }; |
| 303 | 312 |
| 304 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 313 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| OLD | NEW |