| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 scoped_refptr<fileapi::FileSystemContext> file_system_context; | 149 scoped_refptr<fileapi::FileSystemContext> file_system_context; |
| 150 scoped_refptr<quota::QuotaManager> quota_manager; | 150 scoped_refptr<quota::QuotaManager> quota_manager; |
| 151 scoped_refptr<ExtensionInfoMap> extension_info_map; | 151 scoped_refptr<ExtensionInfoMap> extension_info_map; |
| 152 DesktopNotificationService* notification_service; | 152 DesktopNotificationService* notification_service; |
| 153 base::Callback<prerender::PrerenderManager*(void)> prerender_manager_getter; | 153 base::Callback<prerender::PrerenderManager*(void)> prerender_manager_getter; |
| 154 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry; | 154 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry; |
| 155 // We need to initialize the ProxyConfigService from the UI thread | 155 // We need to initialize the ProxyConfigService from the UI thread |
| 156 // because on linux it relies on initializing things through gconf, | 156 // because on linux it relies on initializing things through gconf, |
| 157 // and needs to be on the main thread. | 157 // and needs to be on the main thread. |
| 158 scoped_ptr<net::ProxyConfigService> proxy_config_service; | 158 scoped_ptr<net::ProxyConfigService> proxy_config_service; |
| 159 // Initialized on the UI thread because it needs to reference the | |
| 160 // Profile's PrefService. | |
| 161 scoped_ptr<policy::URLBlacklistManager> url_blacklist_manager; | |
| 162 // The profile this struct was populated from. It's passed as a void* to | 159 // The profile this struct was populated from. It's passed as a void* to |
| 163 // ensure it's not accidently used on the IO thread. Before using it on the | 160 // ensure it's not accidently used on the IO thread. Before using it on the |
| 164 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive. | 161 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive. |
| 165 void* profile; | 162 void* profile; |
| 166 | 163 |
| 167 }; | 164 }; |
| 168 | 165 |
| 169 explicit ProfileIOData(bool is_incognito); | 166 explicit ProfileIOData(bool is_incognito); |
| 170 | 167 |
| 171 void InitializeProfileParams(Profile* profile); | 168 void InitializeOnUIThread(Profile* profile); |
| 172 void ApplyProfileParamsToContext(ChromeURLRequestContext* context) const; | 169 void ApplyProfileParamsToContext(ChromeURLRequestContext* context) const; |
| 173 | 170 |
| 174 // Lazy initializes the ProfileIOData object the first time a request context | 171 // Lazy initializes the ProfileIOData object the first time a request context |
| 175 // is requested. The lazy logic is implemented here. The actual initialization | 172 // is requested. The lazy logic is implemented here. The actual initialization |
| 176 // is done in LazyInitializeInternal(), implemented by subtypes. Static helper | 173 // is done in LazyInitializeInternal(), implemented by subtypes. Static helper |
| 177 // functions have been provided to assist in common operations. | 174 // functions have been provided to assist in common operations. |
| 178 void LazyInitialize() const; | 175 void LazyInitialize() const; |
| 179 | 176 |
| 180 // Called when the profile is destroyed. | 177 // Called when the profile is destroyed. |
| 181 void ShutdownOnUIThread(); | 178 void ShutdownOnUIThread(); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 // called. | 295 // called. |
| 299 mutable scoped_refptr<ChromeURLRequestContext> main_request_context_; | 296 mutable scoped_refptr<ChromeURLRequestContext> main_request_context_; |
| 300 mutable scoped_refptr<ChromeURLRequestContext> extensions_request_context_; | 297 mutable scoped_refptr<ChromeURLRequestContext> extensions_request_context_; |
| 301 // One AppRequestContext per isolated app. | 298 // One AppRequestContext per isolated app. |
| 302 mutable AppRequestContextMap app_request_context_map_; | 299 mutable AppRequestContextMap app_request_context_map_; |
| 303 | 300 |
| 304 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 301 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
| 305 }; | 302 }; |
| 306 | 303 |
| 307 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 304 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| OLD | NEW |