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

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: weakptr 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
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..6abc1db3d6bb9825f7d9cd7fec588b083a1e21c6 100644
--- a/chrome/browser/chromeos/login/login_performer.cc
+++ b/chrome/browser/chromeos/login/login_performer.cc
@@ -157,18 +157,21 @@ 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, AsWeakPtr()));
}
}
-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;

Powered by Google App Engine
This is Rietveld 408576698