| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "chrome/browser/browser_process.h" | 6 #include "chrome/browser/browser_process.h" |
| 7 #include "chrome/browser/profiles/profile_manager.h" | 7 #include "chrome/browser/profiles/profile_manager.h" |
| 8 #include "chrome/browser/profiles/profile_metrics.h" | 8 #include "chrome/browser/profiles/profile_metrics.h" |
| 9 #include "chrome/browser/profiles/profile_window.h" | 9 #include "chrome/browser/profiles/profile_window.h" |
| 10 #include "chrome/browser/profiles/profiles_state.h" | 10 #include "chrome/browser/profiles/profiles_state.h" |
| 11 #include "chrome/browser/ui/browser_finder.h" | 11 #include "chrome/browser/ui/browser_finder.h" |
| 12 #include "chrome/browser/ui/host_desktop.h" |
| 12 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
| 13 #include "content/public/browser/web_ui.h" | 14 #include "content/public/browser/web_ui.h" |
| 14 #include "extensions/browser/app_window/app_window.h" | 15 #include "extensions/browser/app_window/app_window.h" |
| 15 #include "extensions/browser/app_window/app_window_registry.h" | 16 #include "extensions/browser/app_window/app_window_registry.h" |
| 16 | 17 |
| 17 namespace options { | 18 namespace options { |
| 18 namespace helper { | 19 namespace helper { |
| 19 | 20 |
| 20 ui::HostDesktopType GetDesktopType(content::WebUI* web_ui) { | 21 ui::HostDesktopType GetDesktopType(content::WebUI* web_ui) { |
| 21 DCHECK(web_ui); | 22 DCHECK(web_ui); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 58 |
| 58 ProfileMetrics::LogProfileDeleteUser(ProfileMetrics::DELETE_PROFILE_SETTINGS); | 59 ProfileMetrics::LogProfileDeleteUser(ProfileMetrics::DELETE_PROFILE_SETTINGS); |
| 59 | 60 |
| 60 g_browser_process->profile_manager()->ScheduleProfileForDeletion( | 61 g_browser_process->profile_manager()->ScheduleProfileForDeletion( |
| 61 file_path, | 62 file_path, |
| 62 base::Bind(&OpenNewWindowForProfile, GetDesktopType(web_ui))); | 63 base::Bind(&OpenNewWindowForProfile, GetDesktopType(web_ui))); |
| 63 } | 64 } |
| 64 | 65 |
| 65 } // namespace helper | 66 } // namespace helper |
| 66 } // namespace options | 67 } // namespace options |
| OLD | NEW |