| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 #include "content/public/browser/browser_thread.h" | 99 #include "content/public/browser/browser_thread.h" |
| 100 #include "content/public/browser/child_process_security_policy.h" | 100 #include "content/public/browser/child_process_security_policy.h" |
| 101 #include "content/public/browser/notification_details.h" | 101 #include "content/public/browser/notification_details.h" |
| 102 #include "content/public/browser/plugin_service.h" | 102 #include "content/public/browser/plugin_service.h" |
| 103 #include "content/public/browser/render_process_host.h" | 103 #include "content/public/browser/render_process_host.h" |
| 104 #include "content/public/browser/resource_dispatcher_host.h" | 104 #include "content/public/browser/resource_dispatcher_host.h" |
| 105 #include "content/public/browser/service_worker_context.h" | 105 #include "content/public/browser/service_worker_context.h" |
| 106 #include "content/public/browser/storage_partition.h" | 106 #include "content/public/browser/storage_partition.h" |
| 107 #include "content/public/common/content_switches.h" | 107 #include "content/public/common/content_switches.h" |
| 108 #include "extensions/common/constants.h" | 108 #include "extensions/common/constants.h" |
| 109 #include "net/cert/sth_observer.h" |
| 109 #include "net/socket/client_socket_pool_manager.h" | 110 #include "net/socket/client_socket_pool_manager.h" |
| 110 #include "net/url_request/url_request_context_getter.h" | 111 #include "net/url_request/url_request_context_getter.h" |
| 111 #include "ui/base/idle/idle.h" | 112 #include "ui/base/idle/idle.h" |
| 112 #include "ui/base/l10n/l10n_util.h" | 113 #include "ui/base/l10n/l10n_util.h" |
| 113 #include "ui/message_center/message_center.h" | 114 #include "ui/message_center/message_center.h" |
| 114 | 115 |
| 115 #if defined(OS_WIN) | 116 #if defined(OS_WIN) |
| 116 #include "base/win/windows_version.h" | 117 #include "base/win/windows_version.h" |
| 117 #include "components/startup_metric_utils/common/pre_read_field_trial_utils_win.
h" | 118 #include "components/startup_metric_utils/common/pre_read_field_trial_utils_win.
h" |
| 118 #include "ui/views/focus/view_storage.h" | 119 #include "ui/views/focus/view_storage.h" |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 #else | 754 #else |
| 754 return nullptr; | 755 return nullptr; |
| 755 #endif | 756 #endif |
| 756 } | 757 } |
| 757 | 758 |
| 758 shell_integration::DefaultWebClientState | 759 shell_integration::DefaultWebClientState |
| 759 BrowserProcessImpl::CachedDefaultWebClientState() { | 760 BrowserProcessImpl::CachedDefaultWebClientState() { |
| 760 return cached_default_web_client_state_; | 761 return cached_default_web_client_state_; |
| 761 } | 762 } |
| 762 | 763 |
| 764 void BrowserProcessImpl::RegisterWithSTHObserver( |
| 765 net::ct::STHReporter* reporter) { |
| 766 CHECK(BrowserThread::PostTask( |
| 767 BrowserThread::IO, FROM_HERE, |
| 768 base::Bind(&IOThread::RegisterSTHReporter, |
| 769 base::Unretained(io_thread_.get()), reporter))); |
| 770 } |
| 771 |
| 763 // static | 772 // static |
| 764 void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { | 773 void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { |
| 765 registry->RegisterBooleanPref(prefs::kDefaultBrowserSettingEnabled, | 774 registry->RegisterBooleanPref(prefs::kDefaultBrowserSettingEnabled, |
| 766 false); | 775 false); |
| 767 // This policy needs to be defined before the net subsystem is initialized, | 776 // This policy needs to be defined before the net subsystem is initialized, |
| 768 // so we do it here. | 777 // so we do it here. |
| 769 registry->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy, | 778 registry->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy, |
| 770 net::kDefaultMaxSocketsPerProxyServer); | 779 net::kDefaultMaxSocketsPerProxyServer); |
| 771 | 780 |
| 772 registry->RegisterBooleanPref(prefs::kAllowCrossOriginAuthPrompt, false); | 781 registry->RegisterBooleanPref(prefs::kAllowCrossOriginAuthPrompt, false); |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 } | 1310 } |
| 1302 | 1311 |
| 1303 void BrowserProcessImpl::OnAutoupdateTimer() { | 1312 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1304 if (CanAutorestartForUpdate()) { | 1313 if (CanAutorestartForUpdate()) { |
| 1305 DLOG(WARNING) << "Detected update. Restarting browser."; | 1314 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1306 RestartBackgroundInstance(); | 1315 RestartBackgroundInstance(); |
| 1307 } | 1316 } |
| 1308 } | 1317 } |
| 1309 | 1318 |
| 1310 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1319 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |