| 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" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/file_path.h" | 12 #include "base/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/synchronization/lock.h" | 16 #include "base/synchronization/lock.h" |
| 17 #include "chrome/browser/net/chrome_url_request_context.h" | 17 #include "chrome/browser/net/chrome_url_request_context.h" |
| 18 #include "chrome/browser/prefs/pref_member.h" | 18 #include "chrome/browser/prefs/pref_member.h" |
| 19 #include "content/browser/resource_context.h" | 19 #include "content/browser/resource_context.h" |
| 20 #include "net/base/cookie_monster.h" | 20 #include "net/base/cookie_monster.h" |
| 21 | 21 |
| 22 class CommandLine; | 22 class CommandLine; |
| 23 class ChromeAppCacheService; | 23 class ChromeAppCacheService; |
| 24 class ChromeBlobStorageContext; | 24 class ChromeBlobStorageContext; |
| 25 class CookieContentSettings; |
| 25 class DesktopNotificationService; | 26 class DesktopNotificationService; |
| 26 class ExtensionInfoMap; | 27 class ExtensionInfoMap; |
| 27 class HostContentSettingsMap; | 28 class HostContentSettingsMap; |
| 28 class HostZoomMap; | 29 class HostZoomMap; |
| 29 class IOThread; | 30 class IOThread; |
| 30 class Profile; | 31 class Profile; |
| 31 class ProtocolHandlerRegistry; | 32 class ProtocolHandlerRegistry; |
| 32 | 33 |
| 33 namespace fileapi { | 34 namespace fileapi { |
| 34 class FileSystemContext; | 35 class FileSystemContext; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 scoped_refptr<ChromeURLRequestContext> GetExtensionsRequestContext() const; | 88 scoped_refptr<ChromeURLRequestContext> GetExtensionsRequestContext() const; |
| 88 scoped_refptr<ChromeURLRequestContext> GetIsolatedAppRequestContext( | 89 scoped_refptr<ChromeURLRequestContext> GetIsolatedAppRequestContext( |
| 89 scoped_refptr<ChromeURLRequestContext> main_context, | 90 scoped_refptr<ChromeURLRequestContext> main_context, |
| 90 const std::string& app_id) const; | 91 const std::string& app_id) const; |
| 91 | 92 |
| 92 // These are useful when the Chrome layer is called from the content layer | 93 // These are useful when the Chrome layer is called from the content layer |
| 93 // with a content::ResourceContext, and they want access to Chrome data for | 94 // with a content::ResourceContext, and they want access to Chrome data for |
| 94 // that profile. | 95 // that profile. |
| 95 ExtensionInfoMap* GetExtensionInfoMap() const; | 96 ExtensionInfoMap* GetExtensionInfoMap() const; |
| 96 HostContentSettingsMap* GetHostContentSettingsMap() const; | 97 HostContentSettingsMap* GetHostContentSettingsMap() const; |
| 98 CookieContentSettings* GetCookieContentSettings() const; |
| 97 DesktopNotificationService* GetNotificationService() const; | 99 DesktopNotificationService* GetNotificationService() const; |
| 98 | 100 |
| 99 BooleanPrefMember* clear_local_state_on_exit() const { | 101 BooleanPrefMember* clear_local_state_on_exit() const { |
| 100 return &clear_local_state_on_exit_; | 102 return &clear_local_state_on_exit_; |
| 101 } | 103 } |
| 102 | 104 |
| 103 ChromeURLRequestContext* extensions_request_context() const { | 105 ChromeURLRequestContext* extensions_request_context() const { |
| 104 return extensions_request_context_.get(); | 106 return extensions_request_context_.get(); |
| 105 } | 107 } |
| 106 | 108 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 128 ProfileParams(); | 130 ProfileParams(); |
| 129 ~ProfileParams(); | 131 ~ProfileParams(); |
| 130 | 132 |
| 131 bool is_incognito; | 133 bool is_incognito; |
| 132 bool clear_local_state_on_exit; | 134 bool clear_local_state_on_exit; |
| 133 std::string accept_language; | 135 std::string accept_language; |
| 134 std::string accept_charset; | 136 std::string accept_charset; |
| 135 std::string referrer_charset; | 137 std::string referrer_charset; |
| 136 IOThread* io_thread; | 138 IOThread* io_thread; |
| 137 scoped_refptr<HostContentSettingsMap> host_content_settings_map; | 139 scoped_refptr<HostContentSettingsMap> host_content_settings_map; |
| 140 scoped_refptr<CookieContentSettings> cookie_content_settings; |
| 138 scoped_refptr<HostZoomMap> host_zoom_map; | 141 scoped_refptr<HostZoomMap> host_zoom_map; |
| 139 scoped_refptr<net::TransportSecurityState> transport_security_state; | 142 scoped_refptr<net::TransportSecurityState> transport_security_state; |
| 140 scoped_refptr<net::SSLConfigService> ssl_config_service; | 143 scoped_refptr<net::SSLConfigService> ssl_config_service; |
| 141 scoped_refptr<net::CookieMonster::Delegate> cookie_monster_delegate; | 144 scoped_refptr<net::CookieMonster::Delegate> cookie_monster_delegate; |
| 142 scoped_refptr<webkit_database::DatabaseTracker> database_tracker; | 145 scoped_refptr<webkit_database::DatabaseTracker> database_tracker; |
| 143 scoped_refptr<ChromeAppCacheService> appcache_service; | 146 scoped_refptr<ChromeAppCacheService> appcache_service; |
| 144 scoped_refptr<ChromeBlobStorageContext> blob_storage_context; | 147 scoped_refptr<ChromeBlobStorageContext> blob_storage_context; |
| 145 scoped_refptr<fileapi::FileSystemContext> file_system_context; | 148 scoped_refptr<fileapi::FileSystemContext> file_system_context; |
| 146 scoped_refptr<quota::QuotaManager> quota_manager; | 149 scoped_refptr<quota::QuotaManager> quota_manager; |
| 147 scoped_refptr<ExtensionInfoMap> extension_info_map; | 150 scoped_refptr<ExtensionInfoMap> extension_info_map; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 mutable scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; | 274 mutable scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; |
| 272 mutable scoped_refptr<ChromeAppCacheService> appcache_service_; | 275 mutable scoped_refptr<ChromeAppCacheService> appcache_service_; |
| 273 mutable scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; | 276 mutable scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; |
| 274 mutable scoped_refptr<fileapi::FileSystemContext> file_system_context_; | 277 mutable scoped_refptr<fileapi::FileSystemContext> file_system_context_; |
| 275 mutable scoped_refptr<quota::QuotaManager> quota_manager_; | 278 mutable scoped_refptr<quota::QuotaManager> quota_manager_; |
| 276 mutable scoped_refptr<HostZoomMap> host_zoom_map_; | 279 mutable scoped_refptr<HostZoomMap> host_zoom_map_; |
| 277 | 280 |
| 278 // TODO(willchan): Remove from ResourceContext. | 281 // TODO(willchan): Remove from ResourceContext. |
| 279 mutable scoped_refptr<ExtensionInfoMap> extension_info_map_; | 282 mutable scoped_refptr<ExtensionInfoMap> extension_info_map_; |
| 280 mutable scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 283 mutable scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
| 284 mutable scoped_refptr<CookieContentSettings> cookie_content_settings_; |
| 281 mutable DesktopNotificationService* notification_service_; | 285 mutable DesktopNotificationService* notification_service_; |
| 282 mutable base::Callback<prerender::PrerenderManager*(void)> | 286 mutable base::Callback<prerender::PrerenderManager*(void)> |
| 283 prerender_manager_getter_; | 287 prerender_manager_getter_; |
| 284 | 288 |
| 285 mutable ResourceContext resource_context_; | 289 mutable ResourceContext resource_context_; |
| 286 | 290 |
| 287 // These are only valid in between LazyInitialize() and their accessor being | 291 // These are only valid in between LazyInitialize() and their accessor being |
| 288 // called. | 292 // called. |
| 289 mutable scoped_refptr<ChromeURLRequestContext> main_request_context_; | 293 mutable scoped_refptr<ChromeURLRequestContext> main_request_context_; |
| 290 mutable scoped_refptr<ChromeURLRequestContext> extensions_request_context_; | 294 mutable scoped_refptr<ChromeURLRequestContext> extensions_request_context_; |
| 291 // One AppRequestContext per isolated app. | 295 // One AppRequestContext per isolated app. |
| 292 mutable AppRequestContextMap app_request_context_map_; | 296 mutable AppRequestContextMap app_request_context_map_; |
| 293 | 297 |
| 294 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 298 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
| 295 }; | 299 }; |
| 296 | 300 |
| 297 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 301 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| OLD | NEW |