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

Unified Diff: chrome/browser/chromeos/login/login_performer.cc

Issue 8840003: Replace ProfileManagerObserver with callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 9 years 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
« no previous file with comments | « chrome/browser/chromeos/login/login_performer.h ('k') | chrome/browser/chromeos/login/login_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/login_performer.cc
diff --git a/chrome/browser/chromeos/login/login_performer.cc b/chrome/browser/chromeos/login/login_performer.cc
index a736a38240e802502feee695994907e1776bb9e4..9da3498abae1664e0b4057d9a2903072af78229e 100644
--- a/chrome/browser/chromeos/login/login_performer.cc
+++ b/chrome/browser/chromeos/login/login_performer.cc
@@ -157,18 +157,22 @@ void LoginPerformer::OnLoginSuccess(
// It is not guaranted, that profile creation has been finished yet. So use
// async version here.
credentials_ = credentials;
- ProfileManager::CreateDefaultProfileAsync(this);
+ ProfileManager::CreateDefaultProfileAsync(
+ base::Bind(&LoginPerformer::OnProfileCreated,
+ weak_factory_.GetWeakPtr()));
}
}
-void LoginPerformer::OnProfileCreated(Profile* profile, Status status) {
+void LoginPerformer::OnProfileCreated(
+ Profile* profile,
+ Profile::CreateStatus status) {
CHECK(profile);
switch (status) {
- case STATUS_INITIALIZED:
+ case Profile::CREATE_STATUS_INITIALIZED:
break;
- case STATUS_CREATED:
+ case Profile::CREATE_STATUS_CREATED:
return;
- case STATUS_FAIL:
+ case Profile::CREATE_STATUS_FAIL:
default:
NOTREACHED();
return;
« no previous file with comments | « chrome/browser/chromeos/login/login_performer.h ('k') | chrome/browser/chromeos/login/login_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698