Chromium Code Reviews| 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 // This class gathers state related to a single user profile. | 5 // This class gathers state related to a single user profile. | 
| 6 | 6 | 
| 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_ | 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_ | 
| 8 #define CHROME_BROWSER_PROFILES_PROFILE_H_ | 8 #define CHROME_BROWSER_PROFILES_PROFILE_H_ | 
| 9 #pragma once | 9 #pragma once | 
| 10 | 10 | 
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 289 // Returns the SSLConfigService for this profile. | 289 // Returns the SSLConfigService for this profile. | 
| 290 virtual net::SSLConfigService* GetSSLConfigService() = 0; | 290 virtual net::SSLConfigService* GetSSLConfigService() = 0; | 
| 291 | 291 | 
| 292 // Returns the Hostname <-> Content settings map for this profile. | 292 // Returns the Hostname <-> Content settings map for this profile. | 
| 293 virtual HostContentSettingsMap* GetHostContentSettingsMap() = 0; | 293 virtual HostContentSettingsMap* GetHostContentSettingsMap() = 0; | 
| 294 | 294 | 
| 295 // Returns the BookmarkModel, creating if not yet created. | 295 // Returns the BookmarkModel, creating if not yet created. | 
| 296 virtual BookmarkModel* GetBookmarkModel() = 0; | 296 virtual BookmarkModel* GetBookmarkModel() = 0; | 
| 297 | 297 | 
| 298 // Returns the ProtocolHandlerRegistry, creating if not yet created. | 298 // Returns the ProtocolHandlerRegistry, creating if not yet created. | 
| 299 // TODO(smckay): replace this with access via ProtocolHandlerRegistryFactory. | |
| 299 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() = 0; | 300 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() = 0; | 
| 300 | 301 | 
| 301 // Return whether 2 profiles are the same. 2 profiles are the same if they | 302 // Return whether 2 profiles are the same. 2 profiles are the same if they | 
| 302 // represent the same profile. This can happen if there is pointer equality | 303 // represent the same profile. This can happen if there is pointer equality | 
| 303 // or if one profile is the incognito version of another profile (or vice | 304 // or if one profile is the incognito version of another profile (or vice | 
| 304 // versa). | 305 // versa). | 
| 305 virtual bool IsSameProfile(Profile* profile) = 0; | 306 virtual bool IsSameProfile(Profile* profile) = 0; | 
| 306 | 307 | 
| 307 // Returns the time the profile was started. This is not the time the profile | 308 // Returns the time the profile was started. This is not the time the profile | 
| 308 // was created, rather it is the time the user started chrome and logged into | 309 // was created, rather it is the time the user started chrome and logged into | 
| 309 // this profile. For the single profile case, this corresponds to the time | 310 // this profile. For the single profile case, this corresponds to the time | 
| 310 // the user started chrome. | 311 // the user started chrome. | 
| 311 virtual base::Time GetStartTime() const = 0; | 312 virtual base::Time GetStartTime() const = 0; | 
| 312 | 313 | 
| 313 // Marks the profile as cleanly shutdown. | 314 // Marks the profile as cleanly shutdown. | 
| 314 // | 315 // | 
| 315 // NOTE: this is invoked internally on a normal shutdown, but is public so | 316 // NOTE: this is invoked internally on a normal shutdown, but is public so | 
| 316 // that it can be invoked when the user logs out/powers down (WM_ENDSESSION). | 317 // that it can be invoked when the user logs out/powers down (WM_ENDSESSION). | 
| 317 virtual void MarkAsCleanShutdown() = 0; | 318 virtual void MarkAsCleanShutdown() = 0; | 
| 318 | 319 | 
| 319 // Start up service that gathers data from a promo resource feed. | 320 // Start up service that gathers data from a promo resource feed. | 
| 320 virtual void InitPromoResources() = 0; | 321 virtual void InitPromoResources() = 0; | 
| 321 | 322 | 
| 322 // Register URLRequestFactories for protocols registered with | |
| 323 // registerProtocolHandler. | |
| 324 virtual void InitRegisteredProtocolHandlers() = 0; | |
| 
 
Steve McKay
2012/06/14 04:05:04
FYI, this is now handled by the factory which is c
 
 | |
| 325 | |
| 326 // Returns the last directory that was chosen for uploading or opening a file. | 323 // Returns the last directory that was chosen for uploading or opening a file. | 
| 327 virtual FilePath last_selected_directory() = 0; | 324 virtual FilePath last_selected_directory() = 0; | 
| 328 virtual void set_last_selected_directory(const FilePath& path) = 0; | 325 virtual void set_last_selected_directory(const FilePath& path) = 0; | 
| 329 | 326 | 
| 330 #if defined(OS_CHROMEOS) | 327 #if defined(OS_CHROMEOS) | 
| 331 enum AppLocaleChangedVia { | 328 enum AppLocaleChangedVia { | 
| 332 // Caused by chrome://settings change. | 329 // Caused by chrome://settings change. | 
| 333 APP_LOCALE_CHANGED_VIA_SETTINGS, | 330 APP_LOCALE_CHANGED_VIA_SETTINGS, | 
| 334 // Locale has been reverted via LocaleChangeGuard. | 331 // Locale has been reverted via LocaleChangeGuard. | 
| 335 APP_LOCALE_CHANGED_VIA_REVERT, | 332 APP_LOCALE_CHANGED_VIA_REVERT, | 
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 450 struct hash<Profile*> { | 447 struct hash<Profile*> { | 
| 451 std::size_t operator()(Profile* const& p) const { | 448 std::size_t operator()(Profile* const& p) const { | 
| 452 return reinterpret_cast<std::size_t>(p); | 449 return reinterpret_cast<std::size_t>(p); | 
| 453 } | 450 } | 
| 454 }; | 451 }; | 
| 455 | 452 | 
| 456 } // namespace BASE_HASH_NAMESPACE | 453 } // namespace BASE_HASH_NAMESPACE | 
| 457 #endif | 454 #endif | 
| 458 | 455 | 
| 459 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 456 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 
| OLD | NEW |