Chromium Code Reviews| Index: chrome/browser/profiles/profile_manager.h |
| diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles/profile_manager.h |
| index b4db4fbcb0e3b288c9597ed570d2f79cdad1bcbe..183ace186fe6389b75288b366f583ba9379e6dea 100644 |
| --- a/chrome/browser/profiles/profile_manager.h |
| +++ b/chrome/browser/profiles/profile_manager.h |
| @@ -35,6 +35,7 @@ class ProfileManager : public base::NonThreadSafe, |
| public Profile::Delegate { |
| public: |
| typedef base::Callback<void(Profile*, Profile::CreateStatus)> CreateCallback; |
| + typedef base::Callback<void(Profile*)> ProfileLoadedCallback; |
| explicit ProfileManager(const base::FilePath& user_data_dir); |
| ~ProfileManager() override; |
| @@ -87,6 +88,14 @@ class ProfileManager : public base::NonThreadSafe, |
| // Returns total number of profiles available on this machine. |
| size_t GetNumberOfProfiles(); |
| + // Asynchronously loads an existing profile given its |profile_name| within |
| + // the user data directory, optionally in |incognito| mode. The |callback| |
| + // will be called with the Profile when it has been loaded, or with a nullptr |
| + // otherwise. Should be called on the UI thread. |
|
Bernhard Bauer
2016/03/14 19:05:34
Can you point out what the difference to CreatePro
Miguel Garcia
2016/03/17 20:04:07
Done.
|
| + void LoadProfile(const std::string& profile_name, |
| + bool incognito, |
| + const ProfileLoadedCallback& callback); |
| + |
| // Explicit asynchronous creation of a profile located at |profile_path|. |
| // If the profile has already been created then callback is called |
| // immediately. Should be called on the UI thread. |