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

Unified Diff: chrome/browser/ui/app_list/app_list_service_impl.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_view_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/app_list_service_impl.cc
diff --git a/chrome/browser/ui/app_list/app_list_service_impl.cc b/chrome/browser/ui/app_list/app_list_service_impl.cc
index 8fcd39861bae6bda488de568acb097862e658bfb..3090c6b9474a0205d8addec03555a8096546724e 100644
--- a/chrome/browser/ui/app_list/app_list_service_impl.cc
+++ b/chrome/browser/ui/app_list/app_list_service_impl.cc
@@ -148,6 +148,13 @@ base::FilePath AppListServiceImpl::GetProfilePath(
}
void AppListServiceImpl::SetProfilePath(const base::FilePath& profile_path) {
+ // Ensure we don't set the pref to a managed user's profile path.
koz (OOO until 15th September) 2013/09/25 23:35:58 Is this ever expected to be hit? If not it should
tapted 2013/09/26 03:52:50 Calamity can confirm, but I'm pretty sure this is
+ ProfileInfoCache& profile_info =
+ g_browser_process->profile_manager()->GetProfileInfoCache();
+ size_t profile_index = profile_info.GetIndexOfProfileWithPath(profile_path);
+ if (profile_info.ProfileIsManagedAtIndex(profile_index))
+ return;
+
g_browser_process->local_state()->SetString(
prefs::kAppListProfile,
profile_path.BaseName().MaybeAsASCII());
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_view_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698