| 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 "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| 11 #include "base/ref_counted.h" | 11 #include "base/ref_counted.h" |
| 12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
| 13 #include "chrome/browser/net/chrome_url_request_context.h" | 13 #include "chrome/browser/net/chrome_url_request_context.h" |
| 14 #include "chrome/browser/profiles/profile.h" |
| 14 #include "net/base/cookie_monster.h" | 15 #include "net/base/cookie_monster.h" |
| 15 | 16 |
| 16 class CommandLine; | 17 class CommandLine; |
| 17 class ChromeAppCacheService; | 18 class ChromeAppCacheService; |
| 18 class ChromeBlobStorageContext; | 19 class ChromeBlobStorageContext; |
| 19 class ChromeURLRequestContext; | 20 class ChromeURLRequestContext; |
| 20 class ChromeURLRequestContextGetter; | 21 class ChromeURLRequestContextGetter; |
| 21 class ExtensionInfoMap; | 22 class ExtensionInfoMap; |
| 22 class ExtensionIOEventRouter; | |
| 23 namespace fileapi { | 23 namespace fileapi { |
| 24 class FileSystemContext; | 24 class FileSystemContext; |
| 25 } | 25 } |
| 26 class HostContentSettingsMap; | 26 class HostContentSettingsMap; |
| 27 class HostZoomMap; | 27 class HostZoomMap; |
| 28 class IOThread; | 28 class IOThread; |
| 29 namespace net { | 29 namespace net { |
| 30 class DnsCertProvenanceChecker; | 30 class DnsCertProvenanceChecker; |
| 31 class NetLog; | 31 class NetLog; |
| 32 class ProxyConfigService; | 32 class ProxyConfigService; |
| 33 class ProxyService; | 33 class ProxyService; |
| 34 class SSLConfigService; | 34 class SSLConfigService; |
| 35 class TransportSecurityState; | 35 class TransportSecurityState; |
| 36 } // namespace net | 36 } // namespace net |
| 37 namespace prerender { | 37 namespace prerender { |
| 38 class PrerenderManager; | 38 class PrerenderManager; |
| 39 }; // namespace prerender | 39 }; // namespace prerender |
| 40 class Profile; | |
| 41 namespace webkit_database { | 40 namespace webkit_database { |
| 42 class DatabaseTracker; | 41 class DatabaseTracker; |
| 43 } // webkit_database | 42 } // webkit_database |
| 44 | 43 |
| 45 // Conceptually speaking, the ProfileIOData represents data that lives on the IO | 44 // Conceptually speaking, the ProfileIOData represents data that lives on the IO |
| 46 // thread that is owned by a Profile, such as, but not limited to, network | 45 // thread that is owned by a Profile, such as, but not limited to, network |
| 47 // objects like CookieMonster, HttpTransactionFactory, etc. The Profile | 46 // objects like CookieMonster, HttpTransactionFactory, etc. The Profile |
| 48 // implementation will maintain a reference to the ProfileIOData. The | 47 // implementation will maintain a reference to the ProfileIOData. The |
| 49 // ProfileIOData will originally own a reference to the ChromeURLRequestContexts | 48 // ProfileIOData will originally own a reference to the ChromeURLRequestContexts |
| 50 // that reference its members. When an accessor for a ChromeURLRequestContext is | 49 // that reference its members. When an accessor for a ChromeURLRequestContext is |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 scoped_refptr<HostContentSettingsMap> host_content_settings_map; | 95 scoped_refptr<HostContentSettingsMap> host_content_settings_map; |
| 97 scoped_refptr<HostZoomMap> host_zoom_map; | 96 scoped_refptr<HostZoomMap> host_zoom_map; |
| 98 scoped_refptr<net::TransportSecurityState> transport_security_state; | 97 scoped_refptr<net::TransportSecurityState> transport_security_state; |
| 99 scoped_refptr<net::SSLConfigService> ssl_config_service; | 98 scoped_refptr<net::SSLConfigService> ssl_config_service; |
| 100 scoped_refptr<net::CookieMonster::Delegate> cookie_monster_delegate; | 99 scoped_refptr<net::CookieMonster::Delegate> cookie_monster_delegate; |
| 101 scoped_refptr<webkit_database::DatabaseTracker> database_tracker; | 100 scoped_refptr<webkit_database::DatabaseTracker> database_tracker; |
| 102 scoped_refptr<ChromeAppCacheService> appcache_service; | 101 scoped_refptr<ChromeAppCacheService> appcache_service; |
| 103 scoped_refptr<ChromeBlobStorageContext> blob_storage_context; | 102 scoped_refptr<ChromeBlobStorageContext> blob_storage_context; |
| 104 scoped_refptr<fileapi::FileSystemContext> file_system_context; | 103 scoped_refptr<fileapi::FileSystemContext> file_system_context; |
| 105 scoped_refptr<ExtensionInfoMap> extension_info_map; | 104 scoped_refptr<ExtensionInfoMap> extension_info_map; |
| 106 scoped_refptr<ExtensionIOEventRouter> extension_io_event_router; | |
| 107 scoped_refptr<prerender::PrerenderManager> prerender_manager; | 105 scoped_refptr<prerender::PrerenderManager> prerender_manager; |
| 108 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry; | 106 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry; |
| 109 // We need to initialize the ProxyConfigService from the UI thread | 107 // We need to initialize the ProxyConfigService from the UI thread |
| 110 // because on linux it relies on initializing things through gconf, | 108 // because on linux it relies on initializing things through gconf, |
| 111 // and needs to be on the main thread. | 109 // and needs to be on the main thread. |
| 112 scoped_ptr<net::ProxyConfigService> proxy_config_service; | 110 scoped_ptr<net::ProxyConfigService> proxy_config_service; |
| 111 // The profile this struct was populated from. |
| 112 ProfileId profile_id; |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 explicit ProfileIOData(bool is_off_the_record); | 115 explicit ProfileIOData(bool is_off_the_record); |
| 116 virtual ~ProfileIOData(); | 116 virtual ~ProfileIOData(); |
| 117 | 117 |
| 118 // Static helper functions to assist in common operations executed by | 118 // Static helper functions to assist in common operations executed by |
| 119 // subtypes. | 119 // subtypes. |
| 120 | 120 |
| 121 static void InitializeProfileParams(Profile* profile, ProfileParams* params); | 121 static void InitializeProfileParams(Profile* profile, ProfileParams* params); |
| 122 static void ApplyProfileParamsToContext(const ProfileParams& profile_params, | 122 static void ApplyProfileParamsToContext(const ProfileParams& profile_params, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 150 AcquireMediaRequestContext() const = 0; | 150 AcquireMediaRequestContext() const = 0; |
| 151 virtual scoped_refptr<ChromeURLRequestContext> | 151 virtual scoped_refptr<ChromeURLRequestContext> |
| 152 AcquireExtensionsRequestContext() const = 0; | 152 AcquireExtensionsRequestContext() const = 0; |
| 153 | 153 |
| 154 mutable bool initialized_; | 154 mutable bool initialized_; |
| 155 | 155 |
| 156 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 156 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
| 157 }; | 157 }; |
| 158 | 158 |
| 159 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 159 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| OLD | NEW |