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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 #endif // BUILDFLAG(ENABLE_BACKGROUND) 1641 #endif // BUILDFLAG(ENABLE_BACKGROUND)
1642 // Post-profile init --------------------------------------------------------- 1642 // Post-profile init ---------------------------------------------------------
1643 1643
1644 TranslateService::Initialize(); 1644 TranslateService::Initialize();
1645 1645
1646 // Needs to be done before PostProfileInit, since login manager on CrOS is 1646 // Needs to be done before PostProfileInit, since login manager on CrOS is
1647 // called inside PostProfileInit. 1647 // called inside PostProfileInit.
1648 content::WebUIControllerFactory::RegisterFactory( 1648 content::WebUIControllerFactory::RegisterFactory(
1649 ChromeWebUIControllerFactory::GetInstance()); 1649 ChromeWebUIControllerFactory::GetInstance());
1650 1650
1651 #if !defined(DISABLE_NACL)
1651 // NaClBrowserDelegateImpl is accessed inside PostProfileInit(). 1652 // NaClBrowserDelegateImpl is accessed inside PostProfileInit().
1652 // So make sure to create it before that. 1653 // So make sure to create it before that.
1653 #if !defined(DISABLE_NACL) 1654 nacl::NaClBrowser::SetDelegate(base::MakeUnique<NaClBrowserDelegateImpl>(
1654 NaClBrowserDelegateImpl* delegate = 1655 browser_process_->profile_manager()));
Wez 2017/01/14 01:53:11 bradnelson: Is it possible to move this to be pre-
1655 new NaClBrowserDelegateImpl(browser_process_->profile_manager());
1656 nacl::NaClBrowser::SetDelegate(delegate);
1657 #endif // !defined(DISABLE_NACL) 1656 #endif // !defined(DISABLE_NACL)
1658 1657
1659 // TODO(stevenjb): Move WIN and MACOSX specific code to appropriate Parts. 1658 // TODO(stevenjb): Move WIN and MACOSX specific code to appropriate Parts.
1660 // (requires supporting early exit). 1659 // (requires supporting early exit).
1661 PostProfileInit(); 1660 PostProfileInit();
1662 1661
1663 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) 1662 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
1664 // Show the First Run UI if this is the first time Chrome has been run on 1663 // Show the First Run UI if this is the first time Chrome has been run on
1665 // this computer, or we're being compelled to do so by a command line flag. 1664 // this computer, or we're being compelled to do so by a command line flag.
1666 // Note that this be done _after_ the PrefService is initialized and all 1665 // Note that this be done _after_ the PrefService is initialized and all
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
2094 chromeos::CrosSettings::Shutdown(); 2093 chromeos::CrosSettings::Shutdown();
2095 #endif // defined(OS_CHROMEOS) 2094 #endif // defined(OS_CHROMEOS)
2096 #endif // defined(OS_ANDROID) 2095 #endif // defined(OS_ANDROID)
2097 } 2096 }
2098 2097
2099 // Public members: 2098 // Public members:
2100 2099
2101 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 2100 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
2102 chrome_extra_parts_.push_back(parts); 2101 chrome_extra_parts_.push_back(parts);
2103 } 2102 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698