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

Side by Side Diff: chrome/browser/ui/webui/profile_helper.h

Issue 2516613002: Profile deletion: prevent profile creation race in dying browser. (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
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 #ifndef CHROME_BROWSER_UI_WEBUI_PROFILE_HELPER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_PROFILE_HELPER_H_
6 #define CHROME_BROWSER_UI_WEBUI_PROFILE_HELPER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_PROFILE_HELPER_H_
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "chrome/browser/lifetime/scoped_keep_alive.h"
9 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_metrics.h" 11 #include "chrome/browser/profiles/profile_metrics.h"
11 12
12 namespace content { 13 namespace content {
13 class WebUI; 14 class WebUI;
14 } 15 }
15 16
16 namespace webui { 17 namespace webui {
17 18
18 void OpenNewWindowForProfile(Profile* profile, Profile::CreateStatus status); 19 void OpenNewWindowForProfile(const std::unique_ptr<ScopedKeepAlive>& keep_alive,
Bernhard Bauer 2016/11/18 13:31:31 Pass the unique_ptr without the const reference.
20 Profile* profile,
21 Profile::CreateStatus status);
19 22
20 // Deletes the profile at the given |file_path|. 23 // Deletes the profile at the given |file_path|.
21 void DeleteProfileAtPath(base::FilePath file_path, 24 void DeleteProfileAtPath(base::FilePath file_path,
22 content::WebUI* web_ui, 25 content::WebUI* web_ui,
23 ProfileMetrics::ProfileDelete deletion_source); 26 ProfileMetrics::ProfileDelete deletion_source);
24 27
25 } // namespace webui 28 } // namespace webui
26 29
27 30
28 31
29 #endif // CHROME_BROWSER_UI_WEBUI_PROFILE_HELPER_H_ 32 #endif // CHROME_BROWSER_UI_WEBUI_PROFILE_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698