Chromium Code Reviews| 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); |