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

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

Issue 445353004: GetProfileByUser deprecated and renamed to GetProfileByUserUnsafe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 4 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 f3afc62d6d0f6e1e965410a7f2d571b9df4c96ea..3048f178e3aed1ed5be2279e41f394e8da358c8f 100644
--- a/chrome/browser/chromeos/profiles/profile_helper.h
+++ b/chrome/browser/chromeos/profiles/profile_helper.h
@@ -107,9 +107,20 @@ class ProfileHelper : public BrowsingDataRemover::Observer,
// Callback can be empty. Not thread-safe.
void ClearSigninProfile(const base::Closure& on_clear_callback);
- // Returns NULL if profile for user is not found or is not fully loaded.
+ // Returns profile of the |user| if it is created and fully initialized.
+ // Otherwise, returns NULL.
Profile* GetProfileByUser(const user_manager::User* user);
+ // DEPRECATED
+ // Returns profile of the |user| if user's profile is created and fully
+ // initialized. Otherwise, if some user is active, returns his profile.
+ // Otherwise, returns signin profile.
+ // Behaviour of this function does not correspond to its name and can be
+ // very surprising, that's why it should not be used anymore.
+ // Use |GetProfileByUser| instead.
+ // TODO(dzhioev): remove this method. http://crbug.com/361528
+ Profile* GetProfileByUserUnsafe(const user_manager::User* user);
+
// Returns NULL if User is not created.
user_manager::User* GetUserByProfile(Profile* profile);

Powered by Google App Engine
This is Rietveld 408576698