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

Unified Diff: chrome/browser/profiles/profile_manager.h

Issue 7138002: Add profiles to wrench menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments Created 9 years, 6 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/profiles/profile_manager.h
diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles/profile_manager.h
index d06f700cdd8d1a09658ada2c1643f98a4a2ee655..4a2d16a0452f4e69de61313cd7ad4b9f9453cb17 100644
--- a/chrome/browser/profiles/profile_manager.h
+++ b/chrome/browser/profiles/profile_manager.h
@@ -62,6 +62,12 @@ class ProfileManager : public base::NonThreadSafe,
// otherwise it will create and manage it.
Profile* GetProfile(const FilePath& profile_dir);
+ // Multi-profile support.
+ size_t GetNumberOfProfiles();
+ string16 GetNameOfProfileAtIndex(size_t index);
+ FilePath GetFilePathOfProfileAtIndex(size_t index,
+ const FilePath& user_data_dir);
+
// Explicit asynchronous creation of the profile. |observer| is called
// when profile is created. If profile has already been created, observer
// is called immediately. Should be called on the UI thread.
@@ -173,6 +179,14 @@ class ProfileManager : public base::NonThreadSafe,
// entry.
ProfileInfo* RegisterProfile(Profile* profile, bool created);
+ typedef std::pair<FilePath, string16> ProfilePathAndName;
+ typedef std::vector<ProfilePathAndName> ProfilePathAndNames;
+ ProfilePathAndNames GetSortedProfilesFromDirectoryMap();
+
+ static bool CompareProfilePathAndName(
+ const ProfileManager::ProfilePathAndName& pair1,
+ const ProfileManager::ProfilePathAndName& pair2);
+
NotificationRegistrar registrar_;
// Indicates that a user has logged in and that the profile specified

Powered by Google App Engine
This is Rietveld 408576698