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

Unified Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc

Issue 256623002: Implemented inline login dialog for Chrome OS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge conflicts resolved. Created 6 years, 7 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/ui/ash/system_tray_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
index adcad4c369dc22933d4a99265addaf6bf676b3f7..36316124ac23e90c49cb0c83e333ffc52ccd6f2b 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -76,7 +76,7 @@
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
-#include "chrome/browser/ui/ash/stub_user_accounts_delegate.h"
+#include "chrome/browser/ui/ash/user_accounts_delegate_chromeos.h"
#include "chrome/browser/ui/ash/volume_controller_chromeos.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
@@ -915,18 +915,13 @@ ash::tray::UserAccountsDelegate*
SystemTrayDelegateChromeOS::GetUserAccountsDelegate(
const std::string& user_id) {
if (!accounts_delegates_.contains(user_id)) {
- // TODO(dzhioev): replace stub with real implementation.
- accounts_delegates_.set(user_id,
- scoped_ptr<ash::tray::UserAccountsDelegate>(
- new StubUserAccountsDelegate(user_id)));
- static_cast<StubUserAccountsDelegate*>(accounts_delegates_.get(user_id))
- ->AddAccount("secondary_account1@gmail.com");
- static_cast<StubUserAccountsDelegate*>(accounts_delegates_.get(user_id))
- ->AddAccount("very_long_account_name_for_user@gmail.com");
- static_cast<StubUserAccountsDelegate*>(accounts_delegates_.get(user_id))
- ->AddAccount("secondary_account2@gmail.com");
- static_cast<StubUserAccountsDelegate*>(accounts_delegates_.get(user_id))
- ->AddAccount("very_very_very_long_account_name_for_user@gmail.com");
+ const User* user = UserManager::Get()->FindUser(user_id);
+ Profile* user_profile = UserManager::Get()->GetProfileByUser(user);
+ CHECK(user_profile);
+ accounts_delegates_.set(
+ user_id,
+ scoped_ptr<ash::tray::UserAccountsDelegate>(
+ new UserAccountsDelegateChromeOS(user_profile)));
}
return accounts_delegates_.get(user_id);
}
« no previous file with comments | « chrome/browser/ui/ash/stub_user_accounts_delegate.cc ('k') | chrome/browser/ui/ash/user_accounts_delegate_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698