| 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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 } | 524 } |
| 525 | 525 |
| 526 IntranetRedirectDetector* BrowserProcessImpl::intranet_redirect_detector() { | 526 IntranetRedirectDetector* BrowserProcessImpl::intranet_redirect_detector() { |
| 527 DCHECK(CalledOnValidThread()); | 527 DCHECK(CalledOnValidThread()); |
| 528 if (!intranet_redirect_detector_.get()) | 528 if (!intranet_redirect_detector_.get()) |
| 529 CreateIntranetRedirectDetector(); | 529 CreateIntranetRedirectDetector(); |
| 530 return intranet_redirect_detector_.get(); | 530 return intranet_redirect_detector_.get(); |
| 531 } | 531 } |
| 532 | 532 |
| 533 const std::string& BrowserProcessImpl::GetApplicationLocale() { | 533 const std::string& BrowserProcessImpl::GetApplicationLocale() { |
| 534 DCHECK(CalledOnValidThread()); |
| 534 DCHECK(!locale_.empty()); | 535 DCHECK(!locale_.empty()); |
| 535 return locale_; | 536 return locale_; |
| 536 } | 537 } |
| 537 | 538 |
| 538 void BrowserProcessImpl::SetApplicationLocale(const std::string& locale) { | 539 void BrowserProcessImpl::SetApplicationLocale(const std::string& locale) { |
| 540 DCHECK(CalledOnValidThread()); |
| 539 locale_ = locale; | 541 locale_ = locale; |
| 540 extension_l10n_util::SetProcessLocale(locale); | 542 extension_l10n_util::SetProcessLocale(locale); |
| 541 } | 543 } |
| 542 | 544 |
| 543 DownloadStatusUpdater* BrowserProcessImpl::download_status_updater() { | 545 DownloadStatusUpdater* BrowserProcessImpl::download_status_updater() { |
| 544 return download_status_updater_.get(); | 546 return download_status_updater_.get(); |
| 545 } | 547 } |
| 546 | 548 |
| 547 DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { | 549 DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { |
| 548 DCHECK(CalledOnValidThread()); | 550 DCHECK(CalledOnValidThread()); |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 } | 936 } |
| 935 | 937 |
| 936 void BrowserProcessImpl::OnAutoupdateTimer() { | 938 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 937 if (CanAutorestartForUpdate()) { | 939 if (CanAutorestartForUpdate()) { |
| 938 DLOG(WARNING) << "Detected update. Restarting browser."; | 940 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 939 RestartBackgroundInstance(); | 941 RestartBackgroundInstance(); |
| 940 } | 942 } |
| 941 } | 943 } |
| 942 | 944 |
| 943 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 945 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |