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