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

Unified Diff: chrome/browser/ui/webui/options/manage_profile_handler.cc

Issue 10967003: Add desktop type context to most existing instances of FindTabbedBrowser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pre-review pass. Created 8 years, 2 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/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(

Powered by Google App Engine
This is Rietveld 408576698