Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: chrome/browser/chromeos/profiles/profile_helper.h

Issue 14581006: [cros mp] Load profiles from /home/chronos/u-[$hash], add GetUserIdHashFromProfile() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ProfileHelper - check for non-empty user_id_hash only with --multi-profiles switch Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
« no previous file with comments | « chrome/browser/chromeos/extensions/networking_private_apitest.cc ('k') | chrome/browser/chromeos/profiles/profile_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698