| 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..014229e527047d30cb8683ac1a63406b8f2d9108 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,11 @@ namespace chromeos {
|
|
|
| class ProfileHelper : public UserManager::UserSessionStateObserver {
|
| public:
|
| + // Chrome OS profile directories have custom prefix.
|
| + // Profile path format: [user_data_dir]/u-[$hash]
|
| + // Ex.: /home/chronos/u-0123456789
|
| + static const char kProfileDirPrefix[];
|
| +
|
| ProfileHelper();
|
| virtual ~ProfileHelper();
|
|
|
| @@ -25,6 +31,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 +44,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 +55,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;
|
|
|
|
|