| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 #include "chrome/browser/printing/print_preview_dialog_controller.h" | 60 #include "chrome/browser/printing/print_preview_dialog_controller.h" |
| 61 #include "chrome/browser/profiles/profile_manager.h" | 61 #include "chrome/browser/profiles/profile_manager.h" |
| 62 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.
h" | 62 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.
h" |
| 63 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 63 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 64 #include "chrome/browser/shell_integration.h" | 64 #include "chrome/browser/shell_integration.h" |
| 65 #include "chrome/browser/status_icons/status_tray.h" | 65 #include "chrome/browser/status_icons/status_tray.h" |
| 66 #include "chrome/browser/thumbnails/render_widget_snapshot_taker.h" | 66 #include "chrome/browser/thumbnails/render_widget_snapshot_taker.h" |
| 67 #include "chrome/browser/ui/bookmarks/bookmark_prompt_controller.h" | 67 #include "chrome/browser/ui/bookmarks/bookmark_prompt_controller.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/browser/webrtc_log_upload_manager.h" |
| 70 #include "chrome/common/chrome_constants.h" | 71 #include "chrome/common/chrome_constants.h" |
| 71 #include "chrome/common/chrome_notification_types.h" | 72 #include "chrome/common/chrome_notification_types.h" |
| 72 #include "chrome/common/chrome_paths.h" | 73 #include "chrome/common/chrome_paths.h" |
| 73 #include "chrome/common/chrome_switches.h" | 74 #include "chrome/common/chrome_switches.h" |
| 74 #include "chrome/common/extensions/extension_l10n_util.h" | 75 #include "chrome/common/extensions/extension_l10n_util.h" |
| 75 #include "chrome/common/extensions/permissions/chrome_api_permissions.h" | 76 #include "chrome/common/extensions/permissions/chrome_api_permissions.h" |
| 76 #include "chrome/common/extensions/permissions/permissions_info.h" | 77 #include "chrome/common/extensions/permissions/permissions_info.h" |
| 77 #include "chrome/common/pref_names.h" | 78 #include "chrome/common/pref_names.h" |
| 78 #include "chrome/common/switch_utils.h" | 79 #include "chrome/common/switch_utils.h" |
| 79 #include "chrome/common/url_constants.h" | 80 #include "chrome/common/url_constants.h" |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 #if !defined(OS_WIN) | 646 #if !defined(OS_WIN) |
| 646 void BrowserProcessImpl::PlatformSpecificCommandLineProcessing( | 647 void BrowserProcessImpl::PlatformSpecificCommandLineProcessing( |
| 647 const CommandLine& command_line) { | 648 const CommandLine& command_line) { |
| 648 } | 649 } |
| 649 #endif | 650 #endif |
| 650 | 651 |
| 651 bool BrowserProcessImpl::created_local_state() const { | 652 bool BrowserProcessImpl::created_local_state() const { |
| 652 return created_local_state_; | 653 return created_local_state_; |
| 653 } | 654 } |
| 654 | 655 |
| 656 WebRtcLogUploadManager* BrowserProcessImpl::webrtc_log_upload_manager() { |
| 657 #if defined(ENABLE_WEBRTC) |
| 658 return webrtc_log_upload_manager_.get(); |
| 659 #else |
| 660 return NULL; |
| 661 #endif |
| 662 } |
| 663 |
| 655 // static | 664 // static |
| 656 void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { | 665 void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { |
| 657 registry->RegisterBooleanPref(prefs::kDefaultBrowserSettingEnabled, | 666 registry->RegisterBooleanPref(prefs::kDefaultBrowserSettingEnabled, |
| 658 false); | 667 false); |
| 659 // This policy needs to be defined before the net subsystem is initialized, | 668 // This policy needs to be defined before the net subsystem is initialized, |
| 660 // so we do it here. | 669 // so we do it here. |
| 661 registry->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy, | 670 registry->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy, |
| 662 net::kDefaultMaxSocketsPerProxyServer); | 671 net::kDefaultMaxSocketsPerProxyServer); |
| 663 | 672 |
| 664 // This is observed by ChildProcessSecurityPolicy, which lives in content/ | 673 // This is observed by ChildProcessSecurityPolicy, which lives in content/ |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 #if !defined(OS_ANDROID) | 922 #if !defined(OS_ANDROID) |
| 914 if (browser_defaults::bookmarks_enabled && | 923 if (browser_defaults::bookmarks_enabled && |
| 915 BookmarkPromptController::IsEnabled()) { | 924 BookmarkPromptController::IsEnabled()) { |
| 916 bookmark_prompt_controller_.reset(new BookmarkPromptController()); | 925 bookmark_prompt_controller_.reset(new BookmarkPromptController()); |
| 917 } | 926 } |
| 918 #endif | 927 #endif |
| 919 | 928 |
| 920 #if defined(OS_MACOSX) | 929 #if defined(OS_MACOSX) |
| 921 app_shim_host_manager_.reset(new AppShimHostManager); | 930 app_shim_host_manager_.reset(new AppShimHostManager); |
| 922 #endif | 931 #endif |
| 932 |
| 933 #if defined(ENABLE_WEBRTC) |
| 934 webrtc_log_upload_manager_.reset(new WebRtcLogUploadManager()); |
| 935 #endif |
| 923 } | 936 } |
| 924 | 937 |
| 925 void BrowserProcessImpl::CreateIconManager() { | 938 void BrowserProcessImpl::CreateIconManager() { |
| 926 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); | 939 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); |
| 927 created_icon_manager_ = true; | 940 created_icon_manager_ = true; |
| 928 icon_manager_.reset(new IconManager); | 941 icon_manager_.reset(new IconManager); |
| 929 } | 942 } |
| 930 | 943 |
| 931 void BrowserProcessImpl::CreateIntranetRedirectDetector() { | 944 void BrowserProcessImpl::CreateIntranetRedirectDetector() { |
| 932 DCHECK(intranet_redirect_detector_.get() == NULL); | 945 DCHECK(intranet_redirect_detector_.get() == NULL); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1061 } | 1074 } |
| 1062 | 1075 |
| 1063 void BrowserProcessImpl::OnAutoupdateTimer() { | 1076 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1064 if (CanAutorestartForUpdate()) { | 1077 if (CanAutorestartForUpdate()) { |
| 1065 DLOG(WARNING) << "Detected update. Restarting browser."; | 1078 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1066 RestartBackgroundInstance(); | 1079 RestartBackgroundInstance(); |
| 1067 } | 1080 } |
| 1068 } | 1081 } |
| 1069 | 1082 |
| 1070 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1083 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |