OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/app_list/app_list_view_delegate.h" | 5 #include "chrome/browser/ui/app_list/app_list_view_delegate.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 callback); | 85 callback); |
86 } | 86 } |
87 #endif | 87 #endif |
88 | 88 |
89 void PopulateUsers(const ProfileInfoCache& profile_info, | 89 void PopulateUsers(const ProfileInfoCache& profile_info, |
90 const base::FilePath& active_profile_path, | 90 const base::FilePath& active_profile_path, |
91 app_list::AppListViewDelegate::Users* users) { | 91 app_list::AppListViewDelegate::Users* users) { |
92 users->clear(); | 92 users->clear(); |
93 const size_t count = profile_info.GetNumberOfProfiles(); | 93 const size_t count = profile_info.GetNumberOfProfiles(); |
94 for (size_t i = 0; i < count; ++i) { | 94 for (size_t i = 0; i < count; ++i) { |
95 // Don't display managed users. | 95 // Don't display supervised users. |
96 if (profile_info.ProfileIsSupervisedAtIndex(i)) | 96 if (profile_info.ProfileIsSupervisedAtIndex(i)) |
97 continue; | 97 continue; |
98 | 98 |
99 app_list::AppListViewDelegate::User user; | 99 app_list::AppListViewDelegate::User user; |
100 user.name = profile_info.GetNameOfProfileAtIndex(i); | 100 user.name = profile_info.GetNameOfProfileAtIndex(i); |
101 user.email = profile_info.GetUserNameOfProfileAtIndex(i); | 101 user.email = profile_info.GetUserNameOfProfileAtIndex(i); |
102 user.profile_path = profile_info.GetPathOfProfileAtIndex(i); | 102 user.profile_path = profile_info.GetPathOfProfileAtIndex(i); |
103 user.active = active_profile_path == user.profile_path; | 103 user.active = active_profile_path == user.profile_path; |
104 users->push_back(user); | 104 users->push_back(user); |
105 } | 105 } |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 | 533 |
534 void AppListViewDelegate::AddObserver( | 534 void AppListViewDelegate::AddObserver( |
535 app_list::AppListViewDelegateObserver* observer) { | 535 app_list::AppListViewDelegateObserver* observer) { |
536 observers_.AddObserver(observer); | 536 observers_.AddObserver(observer); |
537 } | 537 } |
538 | 538 |
539 void AppListViewDelegate::RemoveObserver( | 539 void AppListViewDelegate::RemoveObserver( |
540 app_list::AppListViewDelegateObserver* observer) { | 540 app_list::AppListViewDelegateObserver* observer) { |
541 observers_.RemoveObserver(observer); | 541 observers_.RemoveObserver(observer); |
542 } | 542 } |
OLD | NEW |