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

Unified Diff: chrome/browser/ui/app_list/app_list_view_delegate.cc

Issue 63283003: Move AppListModel::Users to AppListViewDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mac fixes Created 7 years, 1 month 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/app_list/app_list_view_delegate.cc
diff --git a/chrome/browser/ui/app_list/app_list_view_delegate.cc b/chrome/browser/ui/app_list/app_list_view_delegate.cc
index 6995f58468643b0bed4e5c3b74be6c3e24b52d3e..83046a59b92c0833e3bc56d09be374361adf70a6 100644
--- a/chrome/browser/ui/app_list/app_list_view_delegate.cc
+++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc
@@ -59,14 +59,14 @@ void CreateShortcutInWebAppDir(
void PopulateUsers(const ProfileInfoCache& profile_info,
const base::FilePath& active_profile_path,
- app_list::AppListModel::Users* users) {
+ app_list::AppListViewDelegate::Users* users) {
const size_t count = profile_info.GetNumberOfProfiles();
for (size_t i = 0; i < count; ++i) {
// Don't display managed users.
if (profile_info.ProfileIsManagedAtIndex(i))
continue;
- app_list::AppListModel::User user;
+ app_list::AppListViewDelegate::User user;
user.name = profile_info.GetNameOfProfileAtIndex(i);
user.email = profile_info.GetUserNameOfProfileAtIndex(i);
user.profile_path = profile_info.GetPathOfProfileAtIndex(i);
@@ -125,10 +125,8 @@ void AppListViewDelegate::OnProfileChanged() {
return;
// Populate the app list users.
- app_list::AppListModel::Users users;
PopulateUsers(g_browser_process->profile_manager()->GetProfileInfoCache(),
- profile_->GetPath(), &users);
- model_->SetUsers(users);
+ profile_->GetPath(), &users_);
}
void AppListViewDelegate::SetProfileByPath(const base::FilePath& profile_path) {
@@ -296,3 +294,8 @@ content::WebContents* AppListViewDelegate::GetStartPageContents() {
return service->contents();
}
+
+const app_list::AppListViewDelegate::Users&
+AppListViewDelegate::GetUsers() const {
+ return users_;
+}

Powered by Google App Engine
This is Rietveld 408576698