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/metrics/thread_watcher.h" | 5 #include "chrome/browser/metrics/thread_watcher.h" |
6 | 6 |
7 #include <math.h> // ceil | 7 #include <math.h> // ceil |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/debug/dump_without_crashing.h" | 11 #include "base/debug/dump_without_crashing.h" |
12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
13 #include "base/location.h" | 13 #include "base/location.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
16 #include "base/strings/string_split.h" | 16 #include "base/strings/string_split.h" |
17 #include "base/strings/string_tokenizer.h" | 17 #include "base/strings/string_tokenizer.h" |
18 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
19 #include "base/thread_task_runner_handle.h" | |
20 #include "base/threading/platform_thread.h" | 19 #include "base/threading/platform_thread.h" |
21 #include "base/threading/thread_restrictions.h" | 20 #include "base/threading/thread_restrictions.h" |
| 21 #include "base/threading/thread_task_runner_handle.h" |
22 #include "build/build_config.h" | 22 #include "build/build_config.h" |
23 #include "chrome/browser/chrome_notification_types.h" | 23 #include "chrome/browser/chrome_notification_types.h" |
24 #include "chrome/browser/metrics/thread_watcher_report_hang.h" | 24 #include "chrome/browser/metrics/thread_watcher_report_hang.h" |
25 #include "chrome/common/channel_info.h" | 25 #include "chrome/common/channel_info.h" |
26 #include "chrome/common/chrome_switches.h" | 26 #include "chrome/common/chrome_switches.h" |
27 #include "chrome/common/logging_chrome.h" | 27 #include "chrome/common/logging_chrome.h" |
28 #include "components/metrics/call_stack_profile_metrics_provider.h" | 28 #include "components/metrics/call_stack_profile_metrics_provider.h" |
29 #include "components/version_info/version_info.h" | 29 #include "components/version_info/version_info.h" |
30 #include "content/public/browser/notification_service.h" | 30 #include "content/public/browser/notification_service.h" |
31 | 31 |
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1000 | 1000 |
1001 #if defined(OS_WIN) | 1001 #if defined(OS_WIN) |
1002 // On Windows XP, give twice the time for shutdown. | 1002 // On Windows XP, give twice the time for shutdown. |
1003 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1003 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1004 actual_duration *= 2; | 1004 actual_duration *= 2; |
1005 #endif | 1005 #endif |
1006 | 1006 |
1007 shutdown_watchdog_ = new ShutdownWatchDogThread(actual_duration); | 1007 shutdown_watchdog_ = new ShutdownWatchDogThread(actual_duration); |
1008 shutdown_watchdog_->Arm(); | 1008 shutdown_watchdog_->Arm(); |
1009 } | 1009 } |
OLD | NEW |