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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "net/cookies/cookie_monster.h" | 23 #include "net/cookies/cookie_monster.h" |
24 #include "net/http/http_network_session.h" | 24 #include "net/http/http_network_session.h" |
25 #include "net/url_request/url_request_job_factory.h" | 25 #include "net/url_request/url_request_job_factory.h" |
26 | 26 |
27 class ChromeHttpUserAgentSettings; | 27 class ChromeHttpUserAgentSettings; |
28 class ChromeNetworkDelegate; | 28 class ChromeNetworkDelegate; |
29 class CookieSettings; | 29 class CookieSettings; |
30 class DesktopNotificationService; | 30 class DesktopNotificationService; |
31 class ExtensionInfoMap; | 31 class ExtensionInfoMap; |
32 class HostContentSettingsMap; | 32 class HostContentSettingsMap; |
| 33 class ManagedModeURLFilter; |
33 class Profile; | 34 class Profile; |
34 class ProtocolHandlerRegistry; | 35 class ProtocolHandlerRegistry; |
35 class SigninNamesOnIOThread; | 36 class SigninNamesOnIOThread; |
36 class TransportSecurityPersister; | 37 class TransportSecurityPersister; |
37 | 38 |
38 namespace chrome_browser_net { | 39 namespace chrome_browser_net { |
39 class LoadTimeStats; | 40 class LoadTimeStats; |
40 class ResourcePrefetchPredictorObserver; | 41 class ResourcePrefetchPredictorObserver; |
41 } | 42 } |
42 | 43 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 152 |
152 bool is_incognito() const { | 153 bool is_incognito() const { |
153 return is_incognito_; | 154 return is_incognito_; |
154 } | 155 } |
155 | 156 |
156 chrome_browser_net::ResourcePrefetchPredictorObserver* | 157 chrome_browser_net::ResourcePrefetchPredictorObserver* |
157 resource_prefetch_predictor_observer() const { | 158 resource_prefetch_predictor_observer() const { |
158 return resource_prefetch_predictor_observer_.get(); | 159 return resource_prefetch_predictor_observer_.get(); |
159 } | 160 } |
160 | 161 |
| 162 #if defined(ENABLE_MANAGED_USERS) |
| 163 const ManagedModeURLFilter* managed_mode_url_filter() const { |
| 164 return managed_mode_url_filter_.get(); |
| 165 } |
| 166 #endif |
| 167 |
161 // Initialize the member needed to track the metrics enabled state. This is | 168 // Initialize the member needed to track the metrics enabled state. This is |
162 // only to be called on the UI thread. | 169 // only to be called on the UI thread. |
163 void InitializeMetricsEnabledStateOnUIThread(); | 170 void InitializeMetricsEnabledStateOnUIThread(); |
164 | 171 |
165 // Returns whether or not metrics reporting is enabled in the browser instance | 172 // Returns whether or not metrics reporting is enabled in the browser instance |
166 // on which this profile resides. This is safe for use from the IO thread, and | 173 // on which this profile resides. This is safe for use from the IO thread, and |
167 // should only be called from there. | 174 // should only be called from there. |
168 bool GetMetricsEnabledStateOnIOThread() const; | 175 bool GetMetricsEnabledStateOnIOThread() const; |
169 | 176 |
170 protected: | 177 protected: |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 // pointer from the protocol handler registry on the UI thread to the | 234 // pointer from the protocol handler registry on the UI thread to the |
228 // the URLRequestContext on the IO thread. The consumer MUST take | 235 // the URLRequestContext on the IO thread. The consumer MUST take |
229 // ownership of the object by calling release() on this pointer. | 236 // ownership of the object by calling release() on this pointer. |
230 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 237 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
231 protocol_handler_interceptor; | 238 protocol_handler_interceptor; |
232 | 239 |
233 // We need to initialize the ProxyConfigService from the UI thread | 240 // We need to initialize the ProxyConfigService from the UI thread |
234 // because on linux it relies on initializing things through gconf, | 241 // because on linux it relies on initializing things through gconf, |
235 // and needs to be on the main thread. | 242 // and needs to be on the main thread. |
236 scoped_ptr<net::ProxyConfigService> proxy_config_service; | 243 scoped_ptr<net::ProxyConfigService> proxy_config_service; |
| 244 |
| 245 #if defined(ENABLE_MANAGED_USERS) |
| 246 scoped_refptr<const ManagedModeURLFilter> managed_mode_url_filter; |
| 247 #endif |
| 248 |
237 // The profile this struct was populated from. It's passed as a void* to | 249 // The profile this struct was populated from. It's passed as a void* to |
238 // ensure it's not accidently used on the IO thread. Before using it on the | 250 // ensure it's not accidently used on the IO thread. Before using it on the |
239 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive. | 251 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive. |
240 void* profile; | 252 void* profile; |
241 }; | 253 }; |
242 | 254 |
243 explicit ProfileIOData(bool is_incognito); | 255 explicit ProfileIOData(bool is_incognito); |
244 | 256 |
245 static std::string GetSSLSessionCacheShard(); | 257 static std::string GetSSLSessionCacheShard(); |
246 | 258 |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 mutable scoped_refptr<CookieSettings> cookie_settings_; | 480 mutable scoped_refptr<CookieSettings> cookie_settings_; |
469 | 481 |
470 mutable scoped_ptr<chrome_browser_net::ResourcePrefetchPredictorObserver> | 482 mutable scoped_ptr<chrome_browser_net::ResourcePrefetchPredictorObserver> |
471 resource_prefetch_predictor_observer_; | 483 resource_prefetch_predictor_observer_; |
472 | 484 |
473 mutable scoped_ptr<ChromeHttpUserAgentSettings> | 485 mutable scoped_ptr<ChromeHttpUserAgentSettings> |
474 chrome_http_user_agent_settings_; | 486 chrome_http_user_agent_settings_; |
475 | 487 |
476 mutable chrome_browser_net::LoadTimeStats* load_time_stats_; | 488 mutable chrome_browser_net::LoadTimeStats* load_time_stats_; |
477 | 489 |
| 490 #if defined(ENABLE_MANAGED_USERS) |
| 491 mutable scoped_refptr<const ManagedModeURLFilter> managed_mode_url_filter_; |
| 492 #endif |
| 493 |
478 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 494 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
479 bool initialized_on_UI_thread_; | 495 bool initialized_on_UI_thread_; |
480 | 496 |
481 bool is_incognito_; | 497 bool is_incognito_; |
482 | 498 |
483 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 499 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
484 }; | 500 }; |
485 | 501 |
486 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 502 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
OLD | NEW |