summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_process_impl.cc
diff options
context:
space:
mode:
authorbauerb <bauerb@chromium.org>2015-02-04 17:09:10 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-05 01:09:55 +0000
commit810e60f487982e8edc208b78b0b4b2b2a12a77a0 (patch)
treef76a8cb2498a8e32804fd0a9eb04703ed7a84127 /chrome/browser/browser_process_impl.cc
parentabfbde8049ea4726e3c750a15aad66c5ab9f5093 (diff)
downloadchromium_src-810e60f487982e8edc208b78b0b4b2b2a12a77a0.zip
chromium_src-810e60f487982e8edc208b78b0b4b2b2a12a77a0.tar.gz
chromium_src-810e60f487982e8edc208b78b0b4b2b2a12a77a0.tar.bz2
Make ComponentInstaller refcounted.
Before this CL, component installers were leaked in almost all cases. If we allow uninstalling components (see https://codereview.chromium.org/879993005/), we need to fix those leaks. BUG=436459 Review URL: https://codereview.chromium.org/897873002 Cr-Commit-Position: refs/heads/master@{#314701}
Diffstat (limited to 'chrome/browser/browser_process_impl.cc')
-rw-r--r--chrome/browser/browser_process_impl.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index c64b40e..6a719e8 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -878,7 +878,7 @@ BrowserProcessImpl::component_updater() {
}
CRLSetFetcher* BrowserProcessImpl::crl_set_fetcher() {
- if (!crl_set_fetcher_.get())
+ if (!crl_set_fetcher_)
crl_set_fetcher_ = new CRLSetFetcher();
return crl_set_fetcher_.get();
}
@@ -886,13 +886,13 @@ CRLSetFetcher* BrowserProcessImpl::crl_set_fetcher() {
component_updater::PnaclComponentInstaller*
BrowserProcessImpl::pnacl_component_installer() {
#if !defined(DISABLE_NACL)
- if (!pnacl_component_installer_.get()) {
- pnacl_component_installer_.reset(
- new component_updater::PnaclComponentInstaller());
+ if (!pnacl_component_installer_) {
+ pnacl_component_installer_ =
+ new component_updater::PnaclComponentInstaller();
}
return pnacl_component_installer_.get();
#else
- return NULL;
+ return nullptr;
#endif
}