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

Side by Side Diff: chrome/browser/ui/app_list/app_list_view_delegate.cc

Issue 24360013: Remove supervised users from the app list profile selector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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 unified diff | Download patch
OLDNEW
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/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 base::Bind(web_app::CreateShortcutInWebAppDir, app_data_dir, info), 53 base::Bind(web_app::CreateShortcutInWebAppDir, app_data_dir, info),
54 callback); 54 callback);
55 } 55 }
56 #endif 56 #endif
57 57
58 void PopulateUsers(const ProfileInfoCache& profile_info, 58 void PopulateUsers(const ProfileInfoCache& profile_info,
59 const base::FilePath& active_profile_path, 59 const base::FilePath& active_profile_path,
60 app_list::AppListModel::Users* users) { 60 app_list::AppListModel::Users* users) {
61 const size_t count = profile_info.GetNumberOfProfiles(); 61 const size_t count = profile_info.GetNumberOfProfiles();
62 for (size_t i = 0; i < count; ++i) { 62 for (size_t i = 0; i < count; ++i) {
63 // Don't display managed users.
64 if (profile_info.ProfileIsManagedAtIndex(i))
65 continue;
66
63 app_list::AppListModel::User user; 67 app_list::AppListModel::User user;
64 user.name = profile_info.GetNameOfProfileAtIndex(i); 68 user.name = profile_info.GetNameOfProfileAtIndex(i);
65 user.email = profile_info.GetUserNameOfProfileAtIndex(i); 69 user.email = profile_info.GetUserNameOfProfileAtIndex(i);
66 user.profile_path = profile_info.GetPathOfProfileAtIndex(i); 70 user.profile_path = profile_info.GetPathOfProfileAtIndex(i);
67 user.active = active_profile_path == user.profile_path; 71 user.active = active_profile_path == user.profile_path;
68 users->push_back(user); 72 users->push_back(user);
69 } 73 }
70 } 74 }
71 75
72 } // namespace 76 } // namespace
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 276
273 void AppListViewDelegate::OnProfileAdded(const base::FilePath& profile_path) { 277 void AppListViewDelegate::OnProfileAdded(const base::FilePath& profile_path) {
274 OnProfileChanged(); 278 OnProfileChanged();
275 } 279 }
276 280
277 void AppListViewDelegate::OnProfileNameChanged( 281 void AppListViewDelegate::OnProfileNameChanged(
278 const base::FilePath& profile_path, 282 const base::FilePath& profile_path,
279 const base::string16& old_profile_name) { 283 const base::string16& old_profile_name) {
280 OnProfileChanged(); 284 OnProfileChanged();
281 } 285 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698