| Index: chrome/browser/ui/webui/options/browser_options_handler.cc
|
| diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
|
| index 68c75870c2c0ca005a756ec3969a37775e537350..165f46e9ea225e114c93b1e48e9c5cbd4ab3ae60 100644
|
| --- a/chrome/browser/ui/webui/options/browser_options_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
|
| @@ -138,6 +138,10 @@
|
| #include "chrome/browser/local_discovery/privet_notifications.h"
|
| #endif
|
|
|
| +#if defined(USE_ASH)
|
| +#include "ash/shell.h"
|
| +#endif
|
| +
|
| using base::UserMetricsAction;
|
| using content::BrowserContext;
|
| using content::BrowserThread;
|
| @@ -608,6 +612,14 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
|
| if (ShouldShowMultiProfilesUserList())
|
| values->Set("profilesInfo", GetProfilesInfoList().release());
|
|
|
| + // Profile deletion is not allowed for supervised users, or any users
|
| + // using Metro mode.
|
| + bool allow_deletion = !Profile::FromWebUI(web_ui())->IsSupervised();
|
| +#if defined(USE_ASH)
|
| + allow_deletion = allow_deletion && !ash::Shell::HasInstance();
|
| +#endif
|
| + values->SetBoolean("allowProfileDeletion", allow_deletion);
|
| +
|
| values->SetBoolean("profileIsGuest",
|
| Profile::FromWebUI(web_ui())->IsOffTheRecord());
|
|
|
|
|