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

Unified Diff: chrome/browser/ui/webui/options2/manage_profile_handler2.cc

Issue 9432003: Disable multi-profile UI in managed mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add notreached() Created 8 years, 10 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/options2/manage_profile_handler2.cc
diff --git a/chrome/browser/ui/webui/options2/manage_profile_handler2.cc b/chrome/browser/ui/webui/options2/manage_profile_handler2.cc
index d371915cb7a775c05ec05ea24976c9e2b89b486c..cff8a3662861c338a1d9a62e186eee4881534eac 100644
--- a/chrome/browser/ui/webui/options2/manage_profile_handler2.cc
+++ b/chrome/browser/ui/webui/options2/manage_profile_handler2.cc
@@ -11,6 +11,7 @@
#include "base/value_conversions.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/gaia_info_update_service.h"
#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_info_util.h"
@@ -18,6 +19,7 @@
#include "chrome/browser/profiles/profile_metrics.h"
#include "chrome/browser/ui/webui/web_ui_util.h"
#include "chrome/common/chrome_notification_types.h"
+#include "chrome/common/pref_names.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/web_ui.h"
#include "grit/generated_resources.h"
@@ -201,6 +203,10 @@ void ManageProfileHandler::SetProfileNameAndIcon(const ListValue* args) {
void ManageProfileHandler::DeleteProfile(const ListValue* args) {
DCHECK(args);
+ if (!g_browser_process->local_state()->GetBoolean(prefs::kInManagedMode)) {
Joao da Silva 2012/02/23 12:05:14 Same?
Bernhard Bauer 2012/02/23 12:14:36 Yeah (you can tell I didn't test this patch set ye
+ NOTREACHED();
+ return;
+ }
ProfileMetrics::LogProfileDeleteUser(ProfileMetrics::PROFILE_DELETED);

Powered by Google App Engine
This is Rietveld 408576698