| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 #include "net/socket/client_socket_pool_manager.h" | 79 #include "net/socket/client_socket_pool_manager.h" |
| 80 #include "net/url_request/url_request_context_getter.h" | 80 #include "net/url_request/url_request_context_getter.h" |
| 81 #include "ui/base/clipboard/clipboard.h" | 81 #include "ui/base/clipboard/clipboard.h" |
| 82 #include "ui/base/l10n/l10n_util.h" | 82 #include "ui/base/l10n/l10n_util.h" |
| 83 | 83 |
| 84 #if !defined(ENABLE_CONFIGURATION_POLICY) | 84 #if !defined(ENABLE_CONFIGURATION_POLICY) |
| 85 #include "chrome/browser/policy/policy_service_stub.h" | 85 #include "chrome/browser/policy/policy_service_stub.h" |
| 86 #endif // defined(ENABLE_CONFIGURATION_POLICY) | 86 #endif // defined(ENABLE_CONFIGURATION_POLICY) |
| 87 | 87 |
| 88 #if defined(OS_WIN) | 88 #if defined(OS_WIN) |
| 89 #include "base/win/windows_version.h" |
| 89 #include "ui/views/focus/view_storage.h" | 90 #include "ui/views/focus/view_storage.h" |
| 90 #elif defined(OS_MACOSX) | 91 #elif defined(OS_MACOSX) |
| 91 #include "chrome/browser/chrome_browser_main_mac.h" | 92 #include "chrome/browser/chrome_browser_main_mac.h" |
| 92 #endif | 93 #endif |
| 93 | 94 |
| 94 #if defined(USE_AURA) | 95 #if defined(USE_AURA) |
| 95 #include "ui/aura/env.h" | 96 #include "ui/aura/env.h" |
| 96 #endif | 97 #endif |
| 97 | 98 |
| 98 #if defined(OS_CHROMEOS) | 99 #if defined(OS_CHROMEOS) |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 net::ClientSocketPoolManager::max_sockets_per_group( | 740 net::ClientSocketPoolManager::max_sockets_per_group( |
| 740 net::HttpNetworkSession::NORMAL_SOCKET_POOL))); | 741 net::HttpNetworkSession::NORMAL_SOCKET_POOL))); |
| 741 | 742 |
| 742 // This is observed by ChildProcessSecurityPolicy, which lives in content/ | 743 // This is observed by ChildProcessSecurityPolicy, which lives in content/ |
| 743 // though, so it can't register itself. | 744 // though, so it can't register itself. |
| 744 local_state_->RegisterListPref(prefs::kDisabledSchemes); | 745 local_state_->RegisterListPref(prefs::kDisabledSchemes); |
| 745 pref_change_registrar_.Add(prefs::kDisabledSchemes, this); | 746 pref_change_registrar_.Add(prefs::kDisabledSchemes, this); |
| 746 ApplyDisabledSchemesPolicy(); | 747 ApplyDisabledSchemesPolicy(); |
| 747 | 748 |
| 748 local_state_->RegisterBooleanPref(prefs::kAllowCrossOriginAuthPrompt, false); | 749 local_state_->RegisterBooleanPref(prefs::kAllowCrossOriginAuthPrompt, false); |
| 750 |
| 751 #if defined(OS_WIN) |
| 752 if (base::win::GetVersion() >= base::win::VERSION_WIN8) |
| 753 local_state_->RegisterBooleanPref(prefs::kRestartSwitchMode, false); |
| 754 #endif |
| 749 } | 755 } |
| 750 | 756 |
| 751 void BrowserProcessImpl::PreCreateThreads() { | 757 void BrowserProcessImpl::PreCreateThreads() { |
| 752 io_thread_.reset(new IOThread( | 758 io_thread_.reset(new IOThread( |
| 753 local_state(), net_log_.get(), extension_event_router_forwarder_.get())); | 759 local_state(), net_log_.get(), extension_event_router_forwarder_.get())); |
| 754 } | 760 } |
| 755 | 761 |
| 756 void BrowserProcessImpl::PreMainMessageLoopRun() { | 762 void BrowserProcessImpl::PreMainMessageLoopRun() { |
| 757 PluginService* plugin_service = PluginService::GetInstance(); | 763 PluginService* plugin_service = PluginService::GetInstance(); |
| 758 plugin_service->SetFilter(ChromePluginServiceFilter::GetInstance()); | 764 plugin_service->SetFilter(ChromePluginServiceFilter::GetInstance()); |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 } | 933 } |
| 928 | 934 |
| 929 void BrowserProcessImpl::OnAutoupdateTimer() { | 935 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 930 if (CanAutorestartForUpdate()) { | 936 if (CanAutorestartForUpdate()) { |
| 931 DLOG(WARNING) << "Detected update. Restarting browser."; | 937 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 932 RestartBackgroundInstance(); | 938 RestartBackgroundInstance(); |
| 933 } | 939 } |
| 934 } | 940 } |
| 935 | 941 |
| 936 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 942 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |