Chromium Code Reviews| Index: chrome/browser/ui/webui/options/manage_profile_handler.cc |
| diff --git a/chrome/browser/ui/webui/options/manage_profile_handler.cc b/chrome/browser/ui/webui/options/manage_profile_handler.cc |
| index 98f4e7ccb4f43a9abcd8a3c92767411231fcd079..8b216ccf2b83759f2c2ff887c26b9b24c45503a7 100644 |
| --- a/chrome/browser/ui/webui/options/manage_profile_handler.cc |
| +++ b/chrome/browser/ui/webui/options/manage_profile_handler.cc |
| @@ -19,6 +19,7 @@ |
| #include "chrome/browser/profiles/profile_manager.h" |
| #include "chrome/browser/profiles/profile_metrics.h" |
| #include "chrome/browser/profiles/profile_shortcut_manager.h" |
| +#include "chrome/browser/ui/browser_finder.h" |
| #include "chrome/browser/ui/webui/web_ui_util.h" |
| #include "chrome/common/chrome_notification_types.h" |
| #include "chrome/common/pref_names.h" |
| @@ -256,8 +257,15 @@ void ManageProfileHandler::DeleteProfile(const ListValue* args) { |
| !base::GetValueAsFilePath(*file_path_value, &profile_file_path)) |
| return; |
| + Browser* browser = |
| + browser::FindBrowserWithWebContents(web_ui()->GetWebContents()); |
| + chrome::HostDesktopType desktop_type = chrome::HOST_DESKTOP_TYPE_NATIVE; |
| + if (browser) { |
|
Ben Goodger (Google)
2012/10/03 19:16:56
nit: no braces
robertshield
2012/10/03 19:58:17
Done.
|
| + desktop_type = browser->host_desktop_type(); |
| + } |
| + |
| g_browser_process->profile_manager()->ScheduleProfileForDeletion( |
| - profile_file_path); |
| + profile_file_path, desktop_type); |
| } |
| void ManageProfileHandler::ProfileIconSelectionChanged( |