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

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

Issue 1686833003: Remove HostDesktopType from profiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-16
Patch Set: desktop linux and mac Created 4 years, 10 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/options_handlers_helper.cc
diff --git a/chrome/browser/ui/webui/options/options_handlers_helper.cc b/chrome/browser/ui/webui/options/options_handlers_helper.cc
index 3f06176a77e2bc58530485abaa218fc6023ea057..ac7993b243cd9673979d2581906ee0e2a7217208 100644
--- a/chrome/browser/ui/webui/options/options_handlers_helper.cc
+++ b/chrome/browser/ui/webui/options/options_handlers_helper.cc
@@ -17,36 +17,13 @@
namespace options {
namespace helper {
-chrome::HostDesktopType GetDesktopType(content::WebUI* web_ui) {
- DCHECK(web_ui);
- content::WebContents* web_contents = web_ui->GetWebContents();
- Browser* browser = chrome::FindBrowserWithWebContents(web_contents);
- if (browser)
- return browser->host_desktop_type();
-
- extensions::AppWindow* app_window =
- extensions::AppWindowRegistry::Get(Profile::FromWebUI(web_ui))
- ->GetAppWindowForWebContents(web_contents);
- if (app_window) {
- return chrome::GetHostDesktopTypeForNativeWindow(
- app_window->GetNativeWindow());
- }
-
- return chrome::GetActiveDesktop();
-}
-
-void OpenNewWindowForProfile(chrome::HostDesktopType desktop_type,
- Profile* profile,
- Profile::CreateStatus status) {
+void OpenNewWindowForProfile(Profile* profile, Profile::CreateStatus status) {
if (status != Profile::CREATE_STATUS_INITIALIZED)
return;
profiles::FindOrCreateNewWindowForProfile(
- profile,
- chrome::startup::IS_PROCESS_STARTUP,
- chrome::startup::IS_FIRST_RUN,
- desktop_type,
- false);
+ profile, chrome::startup::IS_PROCESS_STARTUP,
+ chrome::startup::IS_FIRST_RUN, false);
}
void DeleteProfileAtPath(base::FilePath file_path, content::WebUI* web_ui) {
@@ -58,8 +35,7 @@ void DeleteProfileAtPath(base::FilePath file_path, content::WebUI* web_ui) {
ProfileMetrics::LogProfileDeleteUser(ProfileMetrics::DELETE_PROFILE_SETTINGS);
g_browser_process->profile_manager()->ScheduleProfileForDeletion(
- file_path,
- base::Bind(&OpenNewWindowForProfile, GetDesktopType(web_ui)));
+ file_path, base::Bind(&OpenNewWindowForProfile));
}
} // namespace helper

Powered by Google App Engine
This is Rietveld 408576698