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

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: remove spurious new lines 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..b7e1fcb09cccff6d5f813cfbd259ee65a8ff150d 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -22,6 +22,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/value_conversions.h"
#include "base/values.h"
+#include "base/win/metro.h"
#include "chrome/browser/auto_launch_trial.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
@@ -608,6 +609,9 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
if (ShouldShowMultiProfilesUserList())
values->Set("profilesInfo", GetProfilesInfoList().release());
+ // Profile deletion is not allowed in Metro mode.
+ values->SetBoolean("allowProfileDeletion", !base::win::IsMetroProcess());
Evan Stade 2015/01/26 17:55:26 don't you need some ifdefs
noms (inactive) 2015/01/26 23:08:14 Gah, sorry about that. Dropped that ball. Done.
tapted 2015/01/26 23:36:07 I'm pretty sure base::win::IsMetroProcess() only r
noms (inactive) 2015/01/28 02:20:13 Sigh. It had such a promising name. I changed it t
+
values->SetBoolean("profileIsGuest",
Profile::FromWebUI(web_ui())->IsOffTheRecord());

Powered by Google App Engine
This is Rietveld 408576698