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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 2630443003: Add thread checks to NaClBrowser, and make it leaky (Closed)
Patch Set: Move SetDelegate(nullptr) to ClearAndDeleteDelegateForTest() Created 3 years, 11 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/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 1342b24558753d619d082adc8db8e31481de630c..5e20594b58e24192ea90cd61217ae559d5147e7e 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1648,12 +1648,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
content::WebUIControllerFactory::RegisterFactory(
ChromeWebUIControllerFactory::GetInstance());
+#if !defined(DISABLE_NACL)
// NaClBrowserDelegateImpl is accessed inside PostProfileInit().
// So make sure to create it before that.
-#if !defined(DISABLE_NACL)
- NaClBrowserDelegateImpl* delegate =
- new NaClBrowserDelegateImpl(browser_process_->profile_manager());
- nacl::NaClBrowser::SetDelegate(delegate);
+ nacl::NaClBrowser::SetDelegate(base::MakeUnique<NaClBrowserDelegateImpl>(
+ browser_process_->profile_manager()));
Wez 2017/01/14 01:53:11 bradnelson: Is it possible to move this to be pre-
#endif // !defined(DISABLE_NACL)
// TODO(stevenjb): Move WIN and MACOSX specific code to appropriate Parts.

Powered by Google App Engine
This is Rietveld 408576698