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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 #if !defined(OS_WIN) | 639 #if !defined(OS_WIN) |
639 void BrowserProcessImpl::PlatformSpecificCommandLineProcessing( | 640 void BrowserProcessImpl::PlatformSpecificCommandLineProcessing( |
640 const CommandLine& command_line) { | 641 const CommandLine& command_line) { |
641 } | 642 } |
642 #endif | 643 #endif |
643 | 644 |
644 bool BrowserProcessImpl::created_local_state() const { | 645 bool BrowserProcessImpl::created_local_state() const { |
645 return created_local_state_; | 646 return created_local_state_; |
646 } | 647 } |
647 | 648 |
| 649 components::WebRtcLogUploader* BrowserProcessImpl::webrtc_log_uploader() { |
| 650 #if defined(ENABLE_WEBRTC) |
| 651 return webrtc_log_uploader_.get(); |
| 652 #else |
| 653 return NULL; |
| 654 #endif |
| 655 } |
| 656 |
648 // static | 657 // static |
649 void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { | 658 void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { |
650 registry->RegisterBooleanPref(prefs::kDefaultBrowserSettingEnabled, | 659 registry->RegisterBooleanPref(prefs::kDefaultBrowserSettingEnabled, |
651 false); | 660 false); |
652 // This policy needs to be defined before the net subsystem is initialized, | 661 // This policy needs to be defined before the net subsystem is initialized, |
653 // so we do it here. | 662 // so we do it here. |
654 registry->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy, | 663 registry->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy, |
655 net::kDefaultMaxSocketsPerProxyServer); | 664 net::kDefaultMaxSocketsPerProxyServer); |
656 | 665 |
657 // This is observed by ChildProcessSecurityPolicy, which lives in content/ | 666 // This is observed by ChildProcessSecurityPolicy, which lives in content/ |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 #if !defined(OS_ANDROID) | 920 #if !defined(OS_ANDROID) |
912 if (browser_defaults::bookmarks_enabled && | 921 if (browser_defaults::bookmarks_enabled && |
913 BookmarkPromptController::IsEnabled()) { | 922 BookmarkPromptController::IsEnabled()) { |
914 bookmark_prompt_controller_.reset(new BookmarkPromptController()); | 923 bookmark_prompt_controller_.reset(new BookmarkPromptController()); |
915 } | 924 } |
916 #endif | 925 #endif |
917 | 926 |
918 #if defined(OS_MACOSX) | 927 #if defined(OS_MACOSX) |
919 app_shim_host_manager_.reset(new AppShimHostManager); | 928 app_shim_host_manager_.reset(new AppShimHostManager); |
920 #endif | 929 #endif |
| 930 |
| 931 #if defined(ENABLE_WEBRTC) |
| 932 webrtc_log_uploader_.reset(new components::WebRtcLogUploader()); |
| 933 #endif |
921 } | 934 } |
922 | 935 |
923 void BrowserProcessImpl::CreateIconManager() { | 936 void BrowserProcessImpl::CreateIconManager() { |
924 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); | 937 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); |
925 created_icon_manager_ = true; | 938 created_icon_manager_ = true; |
926 icon_manager_.reset(new IconManager); | 939 icon_manager_.reset(new IconManager); |
927 } | 940 } |
928 | 941 |
929 void BrowserProcessImpl::CreateIntranetRedirectDetector() { | 942 void BrowserProcessImpl::CreateIntranetRedirectDetector() { |
930 DCHECK(intranet_redirect_detector_.get() == NULL); | 943 DCHECK(intranet_redirect_detector_.get() == NULL); |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1059 } | 1072 } |
1060 | 1073 |
1061 void BrowserProcessImpl::OnAutoupdateTimer() { | 1074 void BrowserProcessImpl::OnAutoupdateTimer() { |
1062 if (CanAutorestartForUpdate()) { | 1075 if (CanAutorestartForUpdate()) { |
1063 DLOG(WARNING) << "Detected update. Restarting browser."; | 1076 DLOG(WARNING) << "Detected update. Restarting browser."; |
1064 RestartBackgroundInstance(); | 1077 RestartBackgroundInstance(); |
1065 } | 1078 } |
1066 } | 1079 } |
1067 | 1080 |
1068 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1081 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |