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

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: Moving check_deps exception to specific_include_rules after chat with Kai. 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..3eec24bd8a25840d4d911eac20a8713d55c9c6a9 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,14 @@ 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)
+ desktop_type = browser->host_desktop_type();
+
g_browser_process->profile_manager()->ScheduleProfileForDeletion(
- profile_file_path);
+ profile_file_path, desktop_type);
}
void ManageProfileHandler::ProfileIconSelectionChanged(
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc ('k') | chrome/test/base/ui_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698