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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 148 |
148 bool is_incognito() const { | 149 bool is_incognito() const { |
149 return is_incognito_; | 150 return is_incognito_; |
150 } | 151 } |
151 | 152 |
152 chrome_browser_net::ResourcePrefetchPredictorObserver* | 153 chrome_browser_net::ResourcePrefetchPredictorObserver* |
153 resource_prefetch_predictor_observer() const { | 154 resource_prefetch_predictor_observer() const { |
154 return resource_prefetch_predictor_observer_.get(); | 155 return resource_prefetch_predictor_observer_.get(); |
155 } | 156 } |
156 | 157 |
| 158 #if !defined(OS_ANDROID) |
| 159 const ManagedModeURLFilter* managed_mode_url_filter() const { |
| 160 return managed_mode_url_filter_.get(); |
| 161 } |
| 162 #endif |
| 163 |
157 // Initialize the member needed to track the metrics enabled state. This is | 164 // Initialize the member needed to track the metrics enabled state. This is |
158 // only to be called on the UI thread. | 165 // only to be called on the UI thread. |
159 void InitializeMetricsEnabledStateOnUIThread(); | 166 void InitializeMetricsEnabledStateOnUIThread(); |
160 | 167 |
161 // Returns whether or not metrics reporting is enabled in the browser instance | 168 // Returns whether or not metrics reporting is enabled in the browser instance |
162 // on which this profile resides. This is safe for use from the IO thread, and | 169 // on which this profile resides. This is safe for use from the IO thread, and |
163 // should only be called from there. | 170 // should only be called from there. |
164 bool GetMetricsEnabledStateOnIOThread() const; | 171 bool GetMetricsEnabledStateOnIOThread() const; |
165 | 172 |
166 protected: | 173 protected: |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 // pointer from the protocol handler registry on the UI thread to the | 230 // pointer from the protocol handler registry on the UI thread to the |
224 // the URLRequestContext on the IO thread. The consumer MUST take | 231 // the URLRequestContext on the IO thread. The consumer MUST take |
225 // ownership of the object by calling release() on this pointer. | 232 // ownership of the object by calling release() on this pointer. |
226 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 233 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
227 protocol_handler_interceptor; | 234 protocol_handler_interceptor; |
228 | 235 |
229 // We need to initialize the ProxyConfigService from the UI thread | 236 // We need to initialize the ProxyConfigService from the UI thread |
230 // because on linux it relies on initializing things through gconf, | 237 // because on linux it relies on initializing things through gconf, |
231 // and needs to be on the main thread. | 238 // and needs to be on the main thread. |
232 scoped_ptr<net::ProxyConfigService> proxy_config_service; | 239 scoped_ptr<net::ProxyConfigService> proxy_config_service; |
| 240 |
| 241 #if !defined(OS_ANDROID) |
| 242 scoped_refptr<const ManagedModeURLFilter> managed_mode_url_filter; |
| 243 #endif |
| 244 |
233 // The profile this struct was populated from. It's passed as a void* to | 245 // The profile this struct was populated from. It's passed as a void* to |
234 // ensure it's not accidently used on the IO thread. Before using it on the | 246 // ensure it's not accidently used on the IO thread. Before using it on the |
235 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive. | 247 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive. |
236 void* profile; | 248 void* profile; |
237 }; | 249 }; |
238 | 250 |
239 explicit ProfileIOData(bool is_incognito); | 251 explicit ProfileIOData(bool is_incognito); |
240 | 252 |
241 static std::string GetSSLSessionCacheShard(); | 253 static std::string GetSSLSessionCacheShard(); |
242 | 254 |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 mutable scoped_refptr<CookieSettings> cookie_settings_; | 475 mutable scoped_refptr<CookieSettings> cookie_settings_; |
464 | 476 |
465 mutable scoped_ptr<chrome_browser_net::ResourcePrefetchPredictorObserver> | 477 mutable scoped_ptr<chrome_browser_net::ResourcePrefetchPredictorObserver> |
466 resource_prefetch_predictor_observer_; | 478 resource_prefetch_predictor_observer_; |
467 | 479 |
468 mutable scoped_ptr<ChromeHttpUserAgentSettings> | 480 mutable scoped_ptr<ChromeHttpUserAgentSettings> |
469 chrome_http_user_agent_settings_; | 481 chrome_http_user_agent_settings_; |
470 | 482 |
471 mutable chrome_browser_net::LoadTimeStats* load_time_stats_; | 483 mutable chrome_browser_net::LoadTimeStats* load_time_stats_; |
472 | 484 |
| 485 #if !defined(OS_ANDROID) |
| 486 mutable scoped_refptr<const ManagedModeURLFilter> managed_mode_url_filter_; |
| 487 #endif |
| 488 |
473 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 489 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
474 bool initialized_on_UI_thread_; | 490 bool initialized_on_UI_thread_; |
475 | 491 |
476 bool is_incognito_; | 492 bool is_incognito_; |
477 | 493 |
478 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 494 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
479 }; | 495 }; |
480 | 496 |
481 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 497 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
OLD | NEW |