| 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 <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 #if defined(ENABLE_PLUGIN_INSTALLATION) | 114 #if defined(ENABLE_PLUGIN_INSTALLATION) |
| 115 #include "chrome/browser/plugins/plugins_resource_service.h" | 115 #include "chrome/browser/plugins/plugins_resource_service.h" |
| 116 #endif | 116 #endif |
| 117 | 117 |
| 118 #if defined(OS_MACOSX) | 118 #if defined(OS_MACOSX) |
| 119 #include "apps/app_shim/app_shim_host_manager_mac.h" | 119 #include "apps/app_shim/app_shim_host_manager_mac.h" |
| 120 #include "chrome/browser/ui/app_list/app_list_service.h" | 120 #include "chrome/browser/ui/app_list/app_list_service.h" |
| 121 #endif | 121 #endif |
| 122 | 122 |
| 123 #if defined(ENABLE_WEBRTC) |
| 124 #include "chrome/browser/media/webrtc_log_uploader.h" |
| 125 #endif |
| 126 |
| 123 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 127 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| 124 // How often to check if the persistent instance of Chrome needs to restart | 128 // How often to check if the persistent instance of Chrome needs to restart |
| 125 // to install an update. | 129 // to install an update. |
| 126 static const int kUpdateCheckIntervalHours = 6; | 130 static const int kUpdateCheckIntervalHours = 6; |
| 127 #endif | 131 #endif |
| 128 | 132 |
| 129 #if defined(OS_WIN) | 133 #if defined(OS_WIN) |
| 130 // Attest to the fact that the call to the file thread to save preferences has | 134 // Attest to the fact that the call to the file thread to save preferences has |
| 131 // run, and it is safe to terminate. This avoids the potential of some other | 135 // run, and it is safe to terminate. This avoids the potential of some other |
| 132 // task prematurely terminating our waiting message loop by posting a | 136 // task prematurely terminating our waiting message loop by posting a |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 if (!media_file_system_registry_) | 628 if (!media_file_system_registry_) |
| 625 media_file_system_registry_.reset(new chrome::MediaFileSystemRegistry()); | 629 media_file_system_registry_.reset(new chrome::MediaFileSystemRegistry()); |
| 626 return media_file_system_registry_.get(); | 630 return media_file_system_registry_.get(); |
| 627 #endif | 631 #endif |
| 628 } | 632 } |
| 629 | 633 |
| 630 bool BrowserProcessImpl::created_local_state() const { | 634 bool BrowserProcessImpl::created_local_state() const { |
| 631 return created_local_state_; | 635 return created_local_state_; |
| 632 } | 636 } |
| 633 | 637 |
| 638 #if defined(ENABLE_WEBRTC) |
| 639 WebRtcLogUploader* BrowserProcessImpl::webrtc_log_uploader() { |
| 640 if (!webrtc_log_uploader_.get()) |
| 641 webrtc_log_uploader_.reset(new WebRtcLogUploader()); |
| 642 return webrtc_log_uploader_.get(); |
| 643 } |
| 644 #endif |
| 645 |
| 634 // static | 646 // static |
| 635 void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { | 647 void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { |
| 636 registry->RegisterBooleanPref(prefs::kDefaultBrowserSettingEnabled, | 648 registry->RegisterBooleanPref(prefs::kDefaultBrowserSettingEnabled, |
| 637 false); | 649 false); |
| 638 // This policy needs to be defined before the net subsystem is initialized, | 650 // This policy needs to be defined before the net subsystem is initialized, |
| 639 // so we do it here. | 651 // so we do it here. |
| 640 registry->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy, | 652 registry->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy, |
| 641 net::kDefaultMaxSocketsPerProxyServer); | 653 net::kDefaultMaxSocketsPerProxyServer); |
| 642 | 654 |
| 643 // This is observed by ChildProcessSecurityPolicy, which lives in content/ | 655 // This is observed by ChildProcessSecurityPolicy, which lives in content/ |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1046 } | 1058 } |
| 1047 | 1059 |
| 1048 void BrowserProcessImpl::OnAutoupdateTimer() { | 1060 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1049 if (CanAutorestartForUpdate()) { | 1061 if (CanAutorestartForUpdate()) { |
| 1050 DLOG(WARNING) << "Detected update. Restarting browser."; | 1062 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1051 RestartBackgroundInstance(); | 1063 RestartBackgroundInstance(); |
| 1052 } | 1064 } |
| 1053 } | 1065 } |
| 1054 | 1066 |
| 1055 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1067 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |