Chromium Code Reviews| Index: chrome/browser/chromeos/profiles/profile_helper.h |
| diff --git a/chrome/browser/chromeos/profiles/profile_helper.h b/chrome/browser/chromeos/profiles/profile_helper.h |
| index 2ae30784db896c2fac3c22662031d186d5b6201a..c6d776f324771db9ecc4cab0283770e0b987323a 100644 |
| --- a/chrome/browser/chromeos/profiles/profile_helper.h |
| +++ b/chrome/browser/chromeos/profiles/profile_helper.h |
| @@ -8,6 +8,7 @@ |
| #include <string> |
| #include "base/basictypes.h" |
| +#include "base/files/file_path.h" |
| #include "chrome/browser/chromeos/login/user_manager.h" |
| class Profile; |
| @@ -16,6 +17,9 @@ namespace chromeos { |
| class ProfileHelper : public UserManager::UserSessionStateObserver { |
| public: |
| + // Chrome OS profile directories have custom prefix. |
|
Dmitry Polukhin
2013/05/08 09:51:39
Please expand this comment.
Nikita (slow)
2013/05/08 11:10:01
Done.
|
| + static const char kProfileDirPrefix[]; |
| + |
| ProfileHelper(); |
| virtual ~ProfileHelper(); |
| @@ -25,6 +29,10 @@ class ProfileHelper : public UserManager::UserSessionStateObserver { |
| // Returns OffTheRecord profile for use during signing phase. |
| static Profile* GetSigninProfile(); |
| + // Returns user_id hash for |profile| instance or empty string if hash |
| + // could not be extracted from |profile|. |
| + static std::string GetUserIdHashFromProfile(Profile* profile); |
| + |
| // Returns true if |profile| is the signin Profile. This can be used during |
| // construction of the signin Profile to determine if that Profile is the |
| // signin Profile. |
| @@ -34,6 +42,9 @@ class ProfileHelper : public UserManager::UserSessionStateObserver { |
| // TODO(dzhioev): Investigate whether or not this method is needed. |
| static void ProfileStartup(Profile* profile, bool process_startup); |
| + // Returns active user profile dir in a format [u-$hash]. |
| + base::FilePath GetActiveUserProfileDir(); |
| + |
| // Should called once after UserManager instance has been created. |
| void Initialize(); |
| @@ -42,6 +53,8 @@ class ProfileHelper : public UserManager::UserSessionStateObserver { |
| std::string active_user_id_hash() { return active_user_id_hash_; } |
| private: |
| + friend class ProfileHelperTest; |
| + |
| // UserManager::UserSessionStateObserver implementation: |
| virtual void ActiveUserHashChanged(const std::string& hash) OVERRIDE; |