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

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: Merged SetExtraInitParams. Created 6 years, 8 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 01e8e3784fd0ea90c963719bbd22c737f6b289d6..0f839053c70c6876297b4a740c1bea33194aaf52 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"
@@ -911,18 +911,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);
}

Powered by Google App Engine
This is Rietveld 408576698