Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate. h" | 63 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate. h" |
| 64 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 64 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 65 #include "chrome/browser/shell_integration.h" | 65 #include "chrome/browser/shell_integration.h" |
| 66 #include "chrome/browser/status_icons/status_tray.h" | 66 #include "chrome/browser/status_icons/status_tray.h" |
| 67 #include "chrome/browser/ui/browser_dialogs.h" | 67 #include "chrome/browser/ui/browser_dialogs.h" |
| 68 #include "chrome/browser/ui/browser_finder.h" | 68 #include "chrome/browser/ui/browser_finder.h" |
| 69 #include "chrome/browser/web_resource/promo_resource_service.h" | 69 #include "chrome/browser/web_resource/promo_resource_service.h" |
| 70 #include "chrome/common/chrome_constants.h" | 70 #include "chrome/common/chrome_constants.h" |
| 71 #include "chrome/common/chrome_paths.h" | 71 #include "chrome/common/chrome_paths.h" |
| 72 #include "chrome/common/chrome_switches.h" | 72 #include "chrome/common/chrome_switches.h" |
| 73 #include "chrome/common/chrome_version_info.h" | |
| 73 #include "chrome/common/extensions/chrome_extensions_client.h" | 74 #include "chrome/common/extensions/chrome_extensions_client.h" |
| 74 #include "chrome/common/pref_names.h" | 75 #include "chrome/common/pref_names.h" |
| 75 #include "chrome/common/switch_utils.h" | 76 #include "chrome/common/switch_utils.h" |
| 76 #include "chrome/common/url_constants.h" | 77 #include "chrome/common/url_constants.h" |
| 77 #include "chrome/installer/util/google_update_constants.h" | 78 #include "chrome/installer/util/google_update_constants.h" |
| 78 #include "chrome/installer/util/google_update_settings.h" | 79 #include "chrome/installer/util/google_update_settings.h" |
| 79 #include "components/gcm_driver/gcm_driver.h" | 80 #include "components/gcm_driver/gcm_driver.h" |
| 80 #include "components/metrics/metrics_service.h" | 81 #include "components/metrics/metrics_service.h" |
| 81 #include "components/network_time/network_time_tracker.h" | 82 #include "components/network_time/network_time_tracker.h" |
| 82 #include "components/policy/core/common/policy_service.h" | 83 #include "components/policy/core/common/policy_service.h" |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 793 BrowserProcessImpl::component_updater() { | 794 BrowserProcessImpl::component_updater() { |
| 794 if (!component_updater_.get()) { | 795 if (!component_updater_.get()) { |
| 795 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) | 796 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) |
| 796 return NULL; | 797 return NULL; |
| 797 component_updater::ComponentUpdateService::Configurator* configurator = | 798 component_updater::ComponentUpdateService::Configurator* configurator = |
| 798 component_updater::MakeChromeComponentUpdaterConfigurator( | 799 component_updater::MakeChromeComponentUpdaterConfigurator( |
| 799 CommandLine::ForCurrentProcess(), | 800 CommandLine::ForCurrentProcess(), |
| 800 io_thread()->system_url_request_context_getter()); | 801 io_thread()->system_url_request_context_getter()); |
| 801 // Creating the component updater does not do anything, components | 802 // Creating the component updater does not do anything, components |
| 802 // need to be registered and Start() needs to be called. | 803 // need to be registered and Start() needs to be called. |
| 803 component_updater_.reset(ComponentUpdateServiceFactory(configurator)); | 804 component_updater_.reset(ComponentUpdateServiceFactory( |
| 805 configurator, chrome::VersionInfo().Version(), | |
|
blundell
2014/06/17 19:16:24
nit: I think these should all be on separate lines
tommycli
2014/06/17 19:31:07
Done.
| |
| 806 chrome::VersionInfo().OSType())); | |
| 804 } | 807 } |
| 805 return component_updater_.get(); | 808 return component_updater_.get(); |
| 806 } | 809 } |
| 807 | 810 |
| 808 CRLSetFetcher* BrowserProcessImpl::crl_set_fetcher() { | 811 CRLSetFetcher* BrowserProcessImpl::crl_set_fetcher() { |
| 809 if (!crl_set_fetcher_.get()) | 812 if (!crl_set_fetcher_.get()) |
| 810 crl_set_fetcher_ = new CRLSetFetcher(); | 813 crl_set_fetcher_ = new CRLSetFetcher(); |
| 811 return crl_set_fetcher_.get(); | 814 return crl_set_fetcher_.get(); |
| 812 } | 815 } |
| 813 | 816 |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1115 } | 1118 } |
| 1116 | 1119 |
| 1117 void BrowserProcessImpl::OnAutoupdateTimer() { | 1120 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1118 if (CanAutorestartForUpdate()) { | 1121 if (CanAutorestartForUpdate()) { |
| 1119 DLOG(WARNING) << "Detected update. Restarting browser."; | 1122 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1120 RestartBackgroundInstance(); | 1123 RestartBackgroundInstance(); |
| 1121 } | 1124 } |
| 1122 } | 1125 } |
| 1123 | 1126 |
| 1124 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1127 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |