summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profiles/profile.h
diff options
context:
space:
mode:
authoraltimofeev@chromium.org <altimofeev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-19 11:37:21 +0000
committeraltimofeev@chromium.org <altimofeev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-19 11:37:21 +0000
commit844a10004ee756dd8c4fa9c0c5e6ccadabd83b74 (patch)
treec25f0168789bca79d68982a3a0b9cd0d39286c81 /chrome/browser/profiles/profile.h
parent9b464b9ca9cebbad516d537a742c2ea9c351a860 (diff)
downloadchromium_src-844a10004ee756dd8c4fa9c0c5e6ccadabd83b74.zip
chromium_src-844a10004ee756dd8c4fa9c0c5e6ccadabd83b74.tar.gz
chromium_src-844a10004ee756dd8c4fa9c0c5e6ccadabd83b74.tar.bz2
This CL implements alternative asynchronous methods for profile and preferences loading.
BUG=chromium-os:11104 TEST=UserProfileGotten (see "/tmp/login-times-sent") time doesn't increase, while UI jankness decreases. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=81394 (patch set <= 25), but reverted. Review URL: http://codereview.chromium.org/6716025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82096 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profiles/profile.h')
-rw-r--r--chrome/browser/profiles/profile.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/profiles/profile.h b/chrome/browser/profiles/profile.h
index 8d23838..ad93c6c 100644
--- a/chrome/browser/profiles/profile.h
+++ b/chrome/browser/profiles/profile.h
@@ -132,6 +132,12 @@ class Profile {
IMPLICIT_ACCESS
};
+ class Delegate {
+ public:
+ // Called when creation of the profile is finished.
+ virtual void OnProfileCreated(Profile* profile, bool success) = 0;
+ };
+
// Key used to bind profile to the widget with which it is associated.
static const char* kProfileKey;
@@ -148,6 +154,10 @@ class Profile {
// Create a new profile given a path.
static Profile* CreateProfile(const FilePath& path);
+ // Same as above, but uses async initialization.
+ static Profile* CreateProfileAsync(const FilePath& path,
+ Delegate* delegate);
+
// Returns the request context for the "default" profile. This may be called
// from any thread. This CAN return NULL if a first request context has not
// yet been created. If necessary, listen on the UI thread for