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

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..d4aba11966fc94e0fe4f171b05915b7dec30adbc 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,15 @@ class ProfileManager : public base::NonThreadSafe,
// Returns total number of profiles available on this machine.
size_t GetNumberOfProfiles();
+ // Loads an existing profile given it's |profile_name|
+ // The profile is loaded asynchronously and |callback| is executed once it's
+ // loaded
+ // The callback will be executed with a NULL profile if there is an error.
+ // Should be called on the UI thread.
Peter Beverloo 2016/03/11 17:45:15 This should document |incognito| as well, have pro
Peter Beverloo 2016/03/11 17:45:15 Should we match GetProfile() above and swap out th
Miguel Garcia 2016/03/14 18:29:00 Done.
Miguel Garcia 2016/03/14 18:29:00 Let's let the owners decide. I am fine swapping it
+ 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