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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 resource_prefetch_predictor_observer() const { | 185 resource_prefetch_predictor_observer() const { |
186 return resource_prefetch_predictor_observer_.get(); | 186 return resource_prefetch_predictor_observer_.get(); |
187 } | 187 } |
188 | 188 |
189 #if defined(ENABLE_MANAGED_USERS) | 189 #if defined(ENABLE_MANAGED_USERS) |
190 const ManagedModeURLFilter* managed_mode_url_filter() const { | 190 const ManagedModeURLFilter* managed_mode_url_filter() const { |
191 return managed_mode_url_filter_.get(); | 191 return managed_mode_url_filter_.get(); |
192 } | 192 } |
193 #endif | 193 #endif |
194 | 194 |
| 195 #if defined(OS_CHROMEOS) |
| 196 std::string user_name() const { |
| 197 return user_name_; |
| 198 } |
| 199 base::FilePath profile_path() const { |
| 200 return profile_path_; |
| 201 } |
| 202 #endif |
| 203 |
195 // Initialize the member needed to track the metrics enabled state. This is | 204 // Initialize the member needed to track the metrics enabled state. This is |
196 // only to be called on the UI thread. | 205 // only to be called on the UI thread. |
197 void InitializeMetricsEnabledStateOnUIThread(); | 206 void InitializeMetricsEnabledStateOnUIThread(); |
198 | 207 |
199 // Returns whether or not metrics reporting is enabled in the browser instance | 208 // Returns whether or not metrics reporting is enabled in the browser instance |
200 // on which this profile resides. This is safe for use from the IO thread, and | 209 // on which this profile resides. This is safe for use from the IO thread, and |
201 // should only be called from there. | 210 // should only be called from there. |
202 bool GetMetricsEnabledStateOnIOThread() const; | 211 bool GetMetricsEnabledStateOnIOThread() const; |
203 | 212 |
204 protected: | 213 protected: |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 // because on linux it relies on initializing things through gconf, | 278 // because on linux it relies on initializing things through gconf, |
270 // and needs to be on the main thread. | 279 // and needs to be on the main thread. |
271 scoped_ptr<net::ProxyConfigService> proxy_config_service; | 280 scoped_ptr<net::ProxyConfigService> proxy_config_service; |
272 | 281 |
273 #if defined(ENABLE_MANAGED_USERS) | 282 #if defined(ENABLE_MANAGED_USERS) |
274 scoped_refptr<const ManagedModeURLFilter> managed_mode_url_filter; | 283 scoped_refptr<const ManagedModeURLFilter> managed_mode_url_filter; |
275 #endif | 284 #endif |
276 | 285 |
277 #if defined(OS_CHROMEOS) | 286 #if defined(OS_CHROMEOS) |
278 scoped_ptr<policy::PolicyCertVerifier> cert_verifier; | 287 scoped_ptr<policy::PolicyCertVerifier> cert_verifier; |
| 288 std::string user_name; |
279 #endif | 289 #endif |
280 | 290 |
281 // The profile this struct was populated from. It's passed as a void* to | 291 // The profile this struct was populated from. It's passed as a void* to |
282 // ensure it's not accidently used on the IO thread. Before using it on the | 292 // ensure it's not accidently used on the IO thread. Before using it on the |
283 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive. | 293 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive. |
284 void* profile; | 294 void* profile; |
285 }; | 295 }; |
286 | 296 |
287 explicit ProfileIOData(bool is_incognito); | 297 explicit ProfileIOData(bool is_incognito); |
288 | 298 |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 mutable scoped_ptr<net::ServerBoundCertService> server_bound_cert_service_; | 501 mutable scoped_ptr<net::ServerBoundCertService> server_bound_cert_service_; |
492 mutable scoped_ptr<ChromeNetworkDelegate> network_delegate_; | 502 mutable scoped_ptr<ChromeNetworkDelegate> network_delegate_; |
493 mutable scoped_ptr<net::FraudulentCertificateReporter> | 503 mutable scoped_ptr<net::FraudulentCertificateReporter> |
494 fraudulent_certificate_reporter_; | 504 fraudulent_certificate_reporter_; |
495 mutable scoped_ptr<net::ProxyService> proxy_service_; | 505 mutable scoped_ptr<net::ProxyService> proxy_service_; |
496 mutable scoped_ptr<net::TransportSecurityState> transport_security_state_; | 506 mutable scoped_ptr<net::TransportSecurityState> transport_security_state_; |
497 mutable scoped_ptr<net::HttpServerProperties> | 507 mutable scoped_ptr<net::HttpServerProperties> |
498 http_server_properties_; | 508 http_server_properties_; |
499 #if defined(OS_CHROMEOS) | 509 #if defined(OS_CHROMEOS) |
500 mutable scoped_ptr<net::CertVerifier> cert_verifier_; | 510 mutable scoped_ptr<net::CertVerifier> cert_verifier_; |
| 511 mutable std::string user_name_; |
| 512 mutable base::FilePath profile_path_; |
501 #endif | 513 #endif |
502 | 514 |
503 #if defined(ENABLE_NOTIFICATIONS) | 515 #if defined(ENABLE_NOTIFICATIONS) |
504 mutable DesktopNotificationService* notification_service_; | 516 mutable DesktopNotificationService* notification_service_; |
505 #endif | 517 #endif |
506 | 518 |
507 mutable scoped_ptr<TransportSecurityPersister> | 519 mutable scoped_ptr<TransportSecurityPersister> |
508 transport_security_persister_; | 520 transport_security_persister_; |
509 | 521 |
510 // These are only valid in between LazyInitialize() and their accessor being | 522 // These are only valid in between LazyInitialize() and their accessor being |
(...skipping 24 matching lines...) Expand all Loading... |
535 | 547 |
536 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 548 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
537 bool initialized_on_UI_thread_; | 549 bool initialized_on_UI_thread_; |
538 | 550 |
539 bool is_incognito_; | 551 bool is_incognito_; |
540 | 552 |
541 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 553 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
542 }; | 554 }; |
543 | 555 |
544 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 556 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
OLD | NEW |