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 <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 base::Bind(&BrowserProcessImpl::ApplyAllowCrossOriginAuthPromptPolicy, | 823 base::Bind(&BrowserProcessImpl::ApplyAllowCrossOriginAuthPromptPolicy, |
824 base::Unretained(this))); | 824 base::Unretained(this))); |
825 ApplyAllowCrossOriginAuthPromptPolicy(); | 825 ApplyAllowCrossOriginAuthPromptPolicy(); |
826 } | 826 } |
827 | 827 |
828 void BrowserProcessImpl::CreateWatchdogThread() { | 828 void BrowserProcessImpl::CreateWatchdogThread() { |
829 DCHECK(!created_watchdog_thread_ && watchdog_thread_.get() == NULL); | 829 DCHECK(!created_watchdog_thread_ && watchdog_thread_.get() == NULL); |
830 created_watchdog_thread_ = true; | 830 created_watchdog_thread_ = true; |
831 | 831 |
832 scoped_ptr<WatchDogThread> thread(new WatchDogThread()); | 832 scoped_ptr<WatchDogThread> thread(new WatchDogThread()); |
833 if (!thread->Start()) | 833 base::Thread::Options options; |
| 834 options.timer_slack = base::TIMER_SLACK_MAXIMUM; |
| 835 if (!thread->StartWithOptions(options)) |
834 return; | 836 return; |
835 watchdog_thread_.swap(thread); | 837 watchdog_thread_.swap(thread); |
836 } | 838 } |
837 | 839 |
838 void BrowserProcessImpl::CreateProfileManager() { | 840 void BrowserProcessImpl::CreateProfileManager() { |
839 DCHECK(!created_profile_manager_ && profile_manager_.get() == NULL); | 841 DCHECK(!created_profile_manager_ && profile_manager_.get() == NULL); |
840 created_profile_manager_ = true; | 842 created_profile_manager_ = true; |
841 | 843 |
842 base::FilePath user_data_dir; | 844 base::FilePath user_data_dir; |
843 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); | 845 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1106 } | 1108 } |
1107 | 1109 |
1108 void BrowserProcessImpl::OnAutoupdateTimer() { | 1110 void BrowserProcessImpl::OnAutoupdateTimer() { |
1109 if (CanAutorestartForUpdate()) { | 1111 if (CanAutorestartForUpdate()) { |
1110 DLOG(WARNING) << "Detected update. Restarting browser."; | 1112 DLOG(WARNING) << "Detected update. Restarting browser."; |
1111 RestartBackgroundInstance(); | 1113 RestartBackgroundInstance(); |
1112 } | 1114 } |
1113 } | 1115 } |
1114 | 1116 |
1115 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1117 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |