Chromium Code Reviews| Index: chrome/browser/ui/webui/profile_helper.cc |
| diff --git a/chrome/browser/ui/webui/profile_helper.cc b/chrome/browser/ui/webui/profile_helper.cc |
| index 04bf70c1d48674c254e061abfb8d005d096f9794..77483260bd74a70bb45873c285276e0791cc51cb 100644 |
| --- a/chrome/browser/ui/webui/profile_helper.cc |
| +++ b/chrome/browser/ui/webui/profile_helper.cc |
| @@ -6,6 +6,7 @@ |
| #include "base/bind.h" |
| #include "chrome/browser/browser_process.h" |
| +#include "chrome/browser/lifetime/keep_alive_types.h" |
| #include "chrome/browser/profiles/profile_manager.h" |
| #include "chrome/browser/profiles/profile_metrics.h" |
| #include "chrome/browser/profiles/profile_window.h" |
| @@ -27,7 +28,9 @@ void ShowSigninDialog(base::FilePath signin_profile_path, |
| } |
| } // namespace |
|
Bernhard Bauer
2016/11/18 13:31:31
And after this one?
|
| -void OpenNewWindowForProfile(Profile* profile, Profile::CreateStatus status) { |
| +void OpenNewWindowForProfile(const std::unique_ptr<ScopedKeepAlive>& keep_alive, |
|
Bernhard Bauer
2016/11/18 13:31:31
Both the ScopedKeepAlive and the CreateStatus are
|
| + Profile* profile, |
| + Profile::CreateStatus status) { |
| if (status != Profile::CREATE_STATUS_INITIALIZED) |
| return; |
| @@ -57,7 +60,11 @@ void DeleteProfileAtPath(base::FilePath file_path, |
| if (!profiles::IsMultipleProfilesEnabled()) |
| return; |
| g_browser_process->profile_manager()->MaybeScheduleProfileForDeletion( |
| - file_path, base::Bind(&OpenNewWindowForProfile), deletion_source); |
| + file_path, base::Bind(&OpenNewWindowForProfile, |
| + base::Passed(base::MakeUnique<ScopedKeepAlive>( |
| + KeepAliveOrigin::PROFILE_HELPER, |
| + KeepAliveRestartOption::DISABLED))), |
| + deletion_source); |
| } |
| } // namespace webui |