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

Side by Side Diff: chrome/browser/browser_process_impl.cc

Issue 897873002: Make ComponentInstaller refcounted. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@2015_01_19_component_installer
Patch Set: Created 5 years, 10 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/browser_process_impl.h" 5 #include "chrome/browser/browser_process_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 io_thread()->system_url_request_context_getter()); 871 io_thread()->system_url_request_context_getter());
872 // Creating the component updater does not do anything, components 872 // Creating the component updater does not do anything, components
873 // need to be registered and Start() needs to be called. 873 // need to be registered and Start() needs to be called.
874 component_updater_.reset( 874 component_updater_.reset(
875 component_updater::ComponentUpdateServiceFactory(configurator)); 875 component_updater::ComponentUpdateServiceFactory(configurator));
876 } 876 }
877 return component_updater_.get(); 877 return component_updater_.get();
878 } 878 }
879 879
880 CRLSetFetcher* BrowserProcessImpl::crl_set_fetcher() { 880 CRLSetFetcher* BrowserProcessImpl::crl_set_fetcher() {
881 if (!crl_set_fetcher_.get()) 881 if (!crl_set_fetcher_)
Lei Zhang 2015/02/04 22:21:52 Can we keep the .get() for https://code.google.com
Bernhard Bauer 2015/02/04 22:50:55 I thought this is already fixed (see https://coder
Lei Zhang 2015/02/04 23:39:57 Err, yes. n/m.
882 crl_set_fetcher_ = new CRLSetFetcher(); 882 crl_set_fetcher_ = new CRLSetFetcher();
883 return crl_set_fetcher_.get(); 883 return crl_set_fetcher_.get();
884 } 884 }
885 885
886 component_updater::PnaclComponentInstaller* 886 component_updater::PnaclComponentInstaller*
887 BrowserProcessImpl::pnacl_component_installer() { 887 BrowserProcessImpl::pnacl_component_installer() {
888 #if !defined(DISABLE_NACL) 888 #if !defined(DISABLE_NACL)
889 if (!pnacl_component_installer_.get()) { 889 if (!pnacl_component_installer_) {
890 pnacl_component_installer_.reset( 890 pnacl_component_installer_ =
891 new component_updater::PnaclComponentInstaller()); 891 new component_updater::PnaclComponentInstaller();
892 } 892 }
893 return pnacl_component_installer_.get(); 893 return pnacl_component_installer_.get();
894 #else 894 #else
895 return NULL; 895 return nullptr;
896 #endif 896 #endif
897 } 897 }
898 898
899 void BrowserProcessImpl::ResourceDispatcherHostCreated() { 899 void BrowserProcessImpl::ResourceDispatcherHostCreated() {
900 resource_dispatcher_host_delegate_.reset( 900 resource_dispatcher_host_delegate_.reset(
901 new ChromeResourceDispatcherHostDelegate(prerender_tracker())); 901 new ChromeResourceDispatcherHostDelegate(prerender_tracker()));
902 ResourceDispatcherHost::Get()->SetDelegate( 902 ResourceDispatcherHost::Get()->SetDelegate(
903 resource_dispatcher_host_delegate_.get()); 903 resource_dispatcher_host_delegate_.get());
904 904
905 pref_change_registrar_.Add( 905 pref_change_registrar_.Add(
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 } 1198 }
1199 1199
1200 void BrowserProcessImpl::OnAutoupdateTimer() { 1200 void BrowserProcessImpl::OnAutoupdateTimer() {
1201 if (CanAutorestartForUpdate()) { 1201 if (CanAutorestartForUpdate()) {
1202 DLOG(WARNING) << "Detected update. Restarting browser."; 1202 DLOG(WARNING) << "Detected update. Restarting browser.";
1203 RestartBackgroundInstance(); 1203 RestartBackgroundInstance();
1204 } 1204 }
1205 } 1205 }
1206 1206
1207 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1207 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.h ('k') | chrome/browser/component_updater/pepper_flash_component_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698