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/alias.h" | 11 #include "base/debug/alias.h" |
12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
13 #include "base/string_number_conversions.h" | 13 #include "base/string_number_conversions.h" |
14 #include "base/string_split.h" | 14 #include "base/string_split.h" |
15 #include "base/string_tokenizer.h" | 15 #include "base/string_tokenizer.h" |
16 #include "base/threading/thread_restrictions.h" | 16 #include "base/threading/thread_restrictions.h" |
17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
18 #include "chrome/browser/metrics/metrics_service.h" | 18 #include "chrome/browser/metrics/metrics_service.h" |
19 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
20 #include "chrome/common/chrome_version_info.h" | 20 #include "chrome/common/chrome_version_info.h" |
| 21 #include "chrome/common/dump_without_crashing.h" |
21 #include "chrome/common/logging_chrome.h" | 22 #include "chrome/common/logging_chrome.h" |
22 | 23 |
23 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
24 #include "base/win/windows_version.h" | 25 #include "base/win/windows_version.h" |
25 #endif | 26 #endif |
26 | 27 |
27 using content::BrowserThread; | 28 using content::BrowserThread; |
28 | 29 |
29 namespace { | 30 namespace { |
30 | 31 |
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
939 | 940 |
940 #if defined(OS_WIN) | 941 #if defined(OS_WIN) |
941 // On Windows XP, give twice the time for shutdown. | 942 // On Windows XP, give twice the time for shutdown. |
942 if (base::win::GetVersion() <= base::win::VERSION_XP) | 943 if (base::win::GetVersion() <= base::win::VERSION_XP) |
943 actual_duration *= 2; | 944 actual_duration *= 2; |
944 #endif | 945 #endif |
945 | 946 |
946 shutdown_watchdog_ = new ShutdownWatchDogThread(actual_duration); | 947 shutdown_watchdog_ = new ShutdownWatchDogThread(actual_duration); |
947 shutdown_watchdog_->Arm(); | 948 shutdown_watchdog_->Arm(); |
948 } | 949 } |
OLD | NEW |