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

Unified Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 863063002: Don't allow profile deletion in Metro mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ifdefs Created 5 years, 11 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
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..b6adcdbabec684c6c48929da804187ea0907aa5c 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -129,6 +129,7 @@
#endif // defined(OS_CHROMEOS)
#if defined(OS_WIN)
+#include "base/win/metro.h"
#include "chrome/browser/extensions/settings_api_helpers.h"
#include "chrome/installer/util/auto_launch_util.h"
#include "content/public/browser/browser_url_handler.h"
@@ -608,6 +609,13 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
if (ShouldShowMultiProfilesUserList())
values->Set("profilesInfo", GetProfilesInfoList().release());
+ // Profile deletion is not allowed in Metro mode.
+ bool allow_deletion = true;
+#if defined(OS_WIN)
+ allow_deletion = !base::win::IsMetroProcess();
Evan Stade 2015/01/27 00:06:58 you don't care about isSupervised any more?
noms (inactive) 2015/01/27 00:36:10 This is more like an extra check on top of isSuper
Evan Stade 2015/01/27 01:59:36 I would rather the logic all be in one place. b
noms (inactive) 2015/01/28 02:20:13 Done.
+#endif
+ values->SetBoolean("allowProfileDeletion", allow_deletion);
+
values->SetBoolean("profileIsGuest",
Profile::FromWebUI(web_ui())->IsOffTheRecord());
« no previous file with comments | « chrome/browser/resources/options/browser_options.js ('k') | chrome/browser/ui/webui/signin/user_manager_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698