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

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

Issue 1782443006: Create LoadProfile method in profile_manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 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.

Powered by Google App Engine
This is Rietveld 408576698