Chromium Code Reviews| Index: chrome/browser/ui/profile_menu_model.cc |
| diff --git a/chrome/browser/ui/profile_menu_model.cc b/chrome/browser/ui/profile_menu_model.cc |
| index bce0946fceb98b4e7da976c62e6338c3209177b8..302e9a1b7507188a5f8fbf9f50f60e7dbb4e03e1 100644 |
| --- a/chrome/browser/ui/profile_menu_model.cc |
| +++ b/chrome/browser/ui/profile_menu_model.cc |
| @@ -4,17 +4,21 @@ |
| #include "chrome/browser/ui/profile_menu_model.h" |
| +#include "chrome/browser/browser_process.h" |
| #include "chrome/browser/profiles/profile_manager.h" |
| #include "grit/chromium_strings.h" |
| #include "grit/generated_resources.h" |
| #include "ui/base/l10n/l10n_util.h" |
| -ProfileMenuModel::ProfileMenuModel() |
| - : ALLOW_THIS_IN_INITIALIZER_LIST(ui::SimpleMenuModel(this)) { |
| +ProfileMenuModel::ProfileMenuModel(Profile* profile) |
| + : ALLOW_THIS_IN_INITIALIZER_LIST(ui::SimpleMenuModel(this)), |
| + profile_(profile) { |
| const string16 short_product_name = |
| l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME); |
| AddItem(COMMAND_CREATE_NEW_PROFILE, l10n_util::GetStringFUTF16( |
| IDS_PROFILES_CREATE_NEW_PROFILE_OPTION, short_product_name)); |
| + AddItemWithStringId(COMMAND_DELETE_PROFILE, |
| + IDS_PROFILES_DELETE_PROFILE); |
| } |
| ProfileMenuModel::~ProfileMenuModel() { |
| @@ -39,9 +43,12 @@ void ProfileMenuModel::ExecuteCommand(int command_id) { |
| case COMMAND_CREATE_NEW_PROFILE: |
| ProfileManager::CreateMultiProfileAsync(); |
| break; |
| + case IDS_PROFILES_DELETE_PROFILE: |
| + g_browser_process->profile_manager()->ScheduleProfileForDeletion( |
|
Miranda Callahan
2011/07/07 17:43:02
We probably need to stop background apps for this
sail
2011/07/07 18:00:19
Sounds good. Mind if I do this as a separate chang
Miranda Callahan
2011/07/07 18:24:16
Sure, no problem -- then we can get Rachel in that
|
| + profile_->GetPath()); |
| + break; |
| default: |
| NOTREACHED(); |
| break; |
| } |
| } |
| - |