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

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

Issue 898003002: [Cleanup] Const-correct the profile() method for the EasyUnlockService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 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 e15475fc37a01b205f306788927e9dfba7806851..a7a078c1c1924d2ccd07a2572211595e2e0f187c 100644
--- a/chrome/browser/chromeos/profiles/profile_helper.h
+++ b/chrome/browser/chromeos/profiles/profile_helper.h
@@ -67,7 +67,7 @@ class ProfileHelper
// Returns user_id hash for |profile| instance or empty string if hash
// could not be extracted from |profile|.
- static std::string GetUserIdHashFromProfile(Profile* profile);
+ static std::string GetUserIdHashFromProfile(const Profile* profile);
// Returns user profile dir in a format [u-user_id_hash].
static base::FilePath GetUserProfileDir(const std::string& user_id_hash);
@@ -75,14 +75,14 @@ class ProfileHelper
// 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.
- static bool IsSigninProfile(Profile* profile);
+ static bool IsSigninProfile(const Profile* profile);
// Returns true when |profile| corresponds to owner's profile.
static bool IsOwnerProfile(Profile* profile);
// Returns true when |profile| corresponds to the primary user profile
// of the current session.
- static bool IsPrimaryProfile(Profile* profile);
+ static bool IsPrimaryProfile(const Profile* profile);
// Initialize a bunch of services that are tied to a browser profile.
// TODO(dzhioev): Investigate whether or not this method is needed.
@@ -117,7 +117,8 @@ class ProfileHelper
Profile* GetProfileByUserUnsafe(const user_manager::User* user);
// Returns NULL if User is not created.
- user_manager::User* GetUserByProfile(Profile* profile);
+ const user_manager::User* GetUserByProfile(const Profile* profile) const;
+ user_manager::User* GetUserByProfile(Profile* profile) const;
static std::string GetUserIdHashByUserIdForTesting(
const std::string& user_id);

Powered by Google App Engine
This is Rietveld 408576698