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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 scoped_refptr<ChromeURLRequestContext> GetIsolatedAppRequestContext( | 76 scoped_refptr<ChromeURLRequestContext> GetIsolatedAppRequestContext( |
77 scoped_refptr<ChromeURLRequestContext> main_context, | 77 scoped_refptr<ChromeURLRequestContext> main_context, |
78 const std::string& app_id) const; | 78 const std::string& app_id) const; |
79 | 79 |
80 // These are useful when the Chrome layer is called from the content layer | 80 // These are useful when the Chrome layer is called from the content layer |
81 // with a content::ResourceContext, and they want access to Chrome data for | 81 // with a content::ResourceContext, and they want access to Chrome data for |
82 // that profile. | 82 // that profile. |
83 ExtensionInfoMap* GetExtensionInfoMap() const; | 83 ExtensionInfoMap* GetExtensionInfoMap() const; |
84 HostContentSettingsMap* GetHostContentSettingsMap() const; | 84 HostContentSettingsMap* GetHostContentSettingsMap() const; |
85 CookieSettings* GetCookieSettings() const; | 85 CookieSettings* GetCookieSettings() const; |
| 86 |
| 87 #if defined(ENABLE_NOTIFICATIONS) |
86 DesktopNotificationService* GetNotificationService() const; | 88 DesktopNotificationService* GetNotificationService() const; |
| 89 #endif |
87 | 90 |
88 BooleanPrefMember* clear_local_state_on_exit() const { | 91 BooleanPrefMember* clear_local_state_on_exit() const { |
89 return &clear_local_state_on_exit_; | 92 return &clear_local_state_on_exit_; |
90 } | 93 } |
91 | 94 |
92 IntegerPrefMember* session_startup_pref() const { | 95 IntegerPrefMember* session_startup_pref() const { |
93 return &session_startup_pref_; | 96 return &session_startup_pref_; |
94 } | 97 } |
95 | 98 |
96 ChromeURLRequestContext* extensions_request_context() const { | 99 ChromeURLRequestContext* extensions_request_context() const { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 bool clear_local_state_on_exit; | 133 bool clear_local_state_on_exit; |
131 std::string accept_language; | 134 std::string accept_language; |
132 std::string accept_charset; | 135 std::string accept_charset; |
133 std::string referrer_charset; | 136 std::string referrer_charset; |
134 IOThread* io_thread; | 137 IOThread* io_thread; |
135 scoped_refptr<HostContentSettingsMap> host_content_settings_map; | 138 scoped_refptr<HostContentSettingsMap> host_content_settings_map; |
136 scoped_refptr<CookieSettings> cookie_settings; | 139 scoped_refptr<CookieSettings> cookie_settings; |
137 scoped_refptr<net::SSLConfigService> ssl_config_service; | 140 scoped_refptr<net::SSLConfigService> ssl_config_service; |
138 scoped_refptr<net::CookieMonster::Delegate> cookie_monster_delegate; | 141 scoped_refptr<net::CookieMonster::Delegate> cookie_monster_delegate; |
139 scoped_refptr<ExtensionInfoMap> extension_info_map; | 142 scoped_refptr<ExtensionInfoMap> extension_info_map; |
| 143 |
| 144 #if defined(ENABLE_NOTIFICATIONS) |
140 DesktopNotificationService* notification_service; | 145 DesktopNotificationService* notification_service; |
| 146 #endif |
| 147 |
141 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry; | 148 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry; |
142 // We need to initialize the ProxyConfigService from the UI thread | 149 // We need to initialize the ProxyConfigService from the UI thread |
143 // because on linux it relies on initializing things through gconf, | 150 // because on linux it relies on initializing things through gconf, |
144 // and needs to be on the main thread. | 151 // and needs to be on the main thread. |
145 scoped_ptr<net::ProxyConfigService> proxy_config_service; | 152 scoped_ptr<net::ProxyConfigService> proxy_config_service; |
146 // The profile this struct was populated from. It's passed as a void* to | 153 // The profile this struct was populated from. It's passed as a void* to |
147 // ensure it's not accidently used on the IO thread. Before using it on the | 154 // ensure it's not accidently used on the IO thread. Before using it on the |
148 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive. | 155 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive. |
149 void* profile; | 156 void* profile; |
150 }; | 157 }; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 mutable scoped_ptr<net::ProxyService> proxy_service_; | 280 mutable scoped_ptr<net::ProxyService> proxy_service_; |
274 mutable scoped_ptr<net::TransportSecurityState> transport_security_state_; | 281 mutable scoped_ptr<net::TransportSecurityState> transport_security_state_; |
275 mutable scoped_ptr<net::URLRequestJobFactory> job_factory_; | 282 mutable scoped_ptr<net::URLRequestJobFactory> job_factory_; |
276 | 283 |
277 // Pointed to by ResourceContext. | 284 // Pointed to by ResourceContext. |
278 | 285 |
279 // TODO(willchan): Remove from ResourceContext. | 286 // TODO(willchan): Remove from ResourceContext. |
280 mutable scoped_refptr<ExtensionInfoMap> extension_info_map_; | 287 mutable scoped_refptr<ExtensionInfoMap> extension_info_map_; |
281 mutable scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 288 mutable scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
282 mutable scoped_refptr<CookieSettings> cookie_settings_; | 289 mutable scoped_refptr<CookieSettings> cookie_settings_; |
| 290 |
| 291 #if defined(ENABLE_NOTIFICATIONS) |
283 mutable DesktopNotificationService* notification_service_; | 292 mutable DesktopNotificationService* notification_service_; |
| 293 #endif |
284 | 294 |
285 mutable ResourceContext resource_context_; | 295 mutable ResourceContext resource_context_; |
286 | 296 |
287 mutable scoped_ptr<TransportSecurityPersister> | 297 mutable scoped_ptr<TransportSecurityPersister> |
288 transport_security_persister_; | 298 transport_security_persister_; |
289 | 299 |
290 // These are only valid in between LazyInitialize() and their accessor being | 300 // These are only valid in between LazyInitialize() and their accessor being |
291 // called. | 301 // called. |
292 mutable scoped_refptr<ChromeURLRequestContext> main_request_context_; | 302 mutable scoped_refptr<ChromeURLRequestContext> main_request_context_; |
293 mutable scoped_refptr<ChromeURLRequestContext> extensions_request_context_; | 303 mutable scoped_refptr<ChromeURLRequestContext> extensions_request_context_; |
294 // One AppRequestContext per isolated app. | 304 // One AppRequestContext per isolated app. |
295 mutable AppRequestContextMap app_request_context_map_; | 305 mutable AppRequestContextMap app_request_context_map_; |
296 | 306 |
297 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 307 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
298 bool initialized_on_UI_thread_; | 308 bool initialized_on_UI_thread_; |
299 | 309 |
300 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 310 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
301 }; | 311 }; |
302 | 312 |
303 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 313 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
OLD | NEW |