| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 #include "chrome/common/chrome_paths.h" | 72 #include "chrome/common/chrome_paths.h" |
| 73 #include "chrome/common/chrome_switches.h" | 73 #include "chrome/common/chrome_switches.h" |
| 74 #include "chrome/common/extensions/chrome_manifest_handlers.h" | 74 #include "chrome/common/extensions/chrome_manifest_handlers.h" |
| 75 #include "chrome/common/extensions/extension_l10n_util.h" | 75 #include "chrome/common/extensions/extension_l10n_util.h" |
| 76 #include "chrome/common/extensions/permissions/chrome_api_permissions.h" | 76 #include "chrome/common/extensions/permissions/chrome_api_permissions.h" |
| 77 #include "chrome/common/extensions/permissions/permissions_info.h" | 77 #include "chrome/common/extensions/permissions/permissions_info.h" |
| 78 #include "chrome/common/pref_names.h" | 78 #include "chrome/common/pref_names.h" |
| 79 #include "chrome/common/switch_utils.h" | 79 #include "chrome/common/switch_utils.h" |
| 80 #include "chrome/common/url_constants.h" | 80 #include "chrome/common/url_constants.h" |
| 81 #include "chrome/installer/util/google_update_constants.h" | 81 #include "chrome/installer/util/google_update_constants.h" |
| 82 #include "components/webrtc_log_uploader/webrtc_log_uploader.h" |
| 82 #include "content/public/browser/browser_thread.h" | 83 #include "content/public/browser/browser_thread.h" |
| 83 #include "content/public/browser/child_process_security_policy.h" | 84 #include "content/public/browser/child_process_security_policy.h" |
| 84 #include "content/public/browser/notification_details.h" | 85 #include "content/public/browser/notification_details.h" |
| 85 #include "content/public/browser/plugin_service.h" | 86 #include "content/public/browser/plugin_service.h" |
| 86 #include "content/public/browser/render_process_host.h" | 87 #include "content/public/browser/render_process_host.h" |
| 87 #include "content/public/browser/resource_dispatcher_host.h" | 88 #include "content/public/browser/resource_dispatcher_host.h" |
| 88 #include "extensions/common/constants.h" | 89 #include "extensions/common/constants.h" |
| 89 #include "net/socket/client_socket_pool_manager.h" | 90 #include "net/socket/client_socket_pool_manager.h" |
| 90 #include "net/url_request/url_request_context_getter.h" | 91 #include "net/url_request/url_request_context_getter.h" |
| 91 #include "ui/base/l10n/l10n_util.h" | 92 #include "ui/base/l10n/l10n_util.h" |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 #if !defined(OS_WIN) | 648 #if !defined(OS_WIN) |
| 648 void BrowserProcessImpl::PlatformSpecificCommandLineProcessing( | 649 void BrowserProcessImpl::PlatformSpecificCommandLineProcessing( |
| 649 const CommandLine& command_line) { | 650 const CommandLine& command_line) { |
| 650 } | 651 } |
| 651 #endif | 652 #endif |
| 652 | 653 |
| 653 bool BrowserProcessImpl::created_local_state() const { | 654 bool BrowserProcessImpl::created_local_state() const { |
| 654 return created_local_state_; | 655 return created_local_state_; |
| 655 } | 656 } |
| 656 | 657 |
| 658 components::WebRtcLogUploader* BrowserProcessImpl::webrtc_log_uploader() { |
| 659 #if defined(ENABLE_WEBRTC) |
| 660 return webrtc_log_uploader_.get(); |
| 661 #else |
| 662 return NULL; |
| 663 #endif |
| 664 } |
| 665 |
| 657 // static | 666 // static |
| 658 void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { | 667 void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { |
| 659 registry->RegisterBooleanPref(prefs::kDefaultBrowserSettingEnabled, | 668 registry->RegisterBooleanPref(prefs::kDefaultBrowserSettingEnabled, |
| 660 false); | 669 false); |
| 661 // This policy needs to be defined before the net subsystem is initialized, | 670 // This policy needs to be defined before the net subsystem is initialized, |
| 662 // so we do it here. | 671 // so we do it here. |
| 663 registry->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy, | 672 registry->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy, |
| 664 net::kDefaultMaxSocketsPerProxyServer); | 673 net::kDefaultMaxSocketsPerProxyServer); |
| 665 | 674 |
| 666 // This is observed by ChildProcessSecurityPolicy, which lives in content/ | 675 // This is observed by ChildProcessSecurityPolicy, which lives in content/ |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 915 #if !defined(OS_ANDROID) | 924 #if !defined(OS_ANDROID) |
| 916 if (browser_defaults::bookmarks_enabled && | 925 if (browser_defaults::bookmarks_enabled && |
| 917 BookmarkPromptController::IsEnabled()) { | 926 BookmarkPromptController::IsEnabled()) { |
| 918 bookmark_prompt_controller_.reset(new BookmarkPromptController()); | 927 bookmark_prompt_controller_.reset(new BookmarkPromptController()); |
| 919 } | 928 } |
| 920 #endif | 929 #endif |
| 921 | 930 |
| 922 #if defined(OS_MACOSX) | 931 #if defined(OS_MACOSX) |
| 923 app_shim_host_manager_.reset(new AppShimHostManager); | 932 app_shim_host_manager_.reset(new AppShimHostManager); |
| 924 #endif | 933 #endif |
| 934 |
| 935 #if defined(ENABLE_WEBRTC) |
| 936 webrtc_log_uploader_.reset(new components::WebRtcLogUploader()); |
| 937 #endif |
| 925 } | 938 } |
| 926 | 939 |
| 927 void BrowserProcessImpl::CreateIconManager() { | 940 void BrowserProcessImpl::CreateIconManager() { |
| 928 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); | 941 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); |
| 929 created_icon_manager_ = true; | 942 created_icon_manager_ = true; |
| 930 icon_manager_.reset(new IconManager); | 943 icon_manager_.reset(new IconManager); |
| 931 } | 944 } |
| 932 | 945 |
| 933 void BrowserProcessImpl::CreateIntranetRedirectDetector() { | 946 void BrowserProcessImpl::CreateIntranetRedirectDetector() { |
| 934 DCHECK(intranet_redirect_detector_.get() == NULL); | 947 DCHECK(intranet_redirect_detector_.get() == NULL); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1063 } | 1076 } |
| 1064 | 1077 |
| 1065 void BrowserProcessImpl::OnAutoupdateTimer() { | 1078 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1066 if (CanAutorestartForUpdate()) { | 1079 if (CanAutorestartForUpdate()) { |
| 1067 DLOG(WARNING) << "Detected update. Restarting browser."; | 1080 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1068 RestartBackgroundInstance(); | 1081 RestartBackgroundInstance(); |
| 1069 } | 1082 } |
| 1070 } | 1083 } |
| 1071 | 1084 |
| 1072 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1085 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |