Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: chrome/browser/metrics/thread_watcher.cc

Issue 63153003: mac: Prepare for -Wunused-functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
(...skipping 21 matching lines...) Expand all
32 32
33 // The following are unique function names for forcing the crash when a thread 33 // The following are unique function names for forcing the crash when a thread
34 // is unresponsive. This makes it possible to tell from the callstack alone what 34 // is unresponsive. This makes it possible to tell from the callstack alone what
35 // thread was unresponsive. 35 // thread was unresponsive.
36 // 36 //
37 // We disable optimizations for this block of functions so the compiler doesn't 37 // We disable optimizations for this block of functions so the compiler doesn't
38 // merge them all together. 38 // merge them all together.
39 MSVC_DISABLE_OPTIMIZE() 39 MSVC_DISABLE_OPTIMIZE()
40 MSVC_PUSH_DISABLE_WARNING(4748) 40 MSVC_PUSH_DISABLE_WARNING(4748)
41 41
42 #ifndef NDEBUG
42 int* NullPointer() { 43 int* NullPointer() {
43 return reinterpret_cast<int*>(NULL); 44 return reinterpret_cast<int*>(NULL);
44 } 45 }
46 #endif
45 47
46 void NullPointerCrash(int line_number) { 48 void NullPointerCrash(int line_number) {
47 #ifndef NDEBUG 49 #ifndef NDEBUG
48 *NullPointer() = line_number; // Crash. 50 *NullPointer() = line_number; // Crash.
49 #else 51 #else
50 logging::DumpWithoutCrashing(); 52 logging::DumpWithoutCrashing();
51 #endif 53 #endif
52 } 54 }
53 55
54 NOINLINE void ShutdownCrash() { 56 NOINLINE void ShutdownCrash() {
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 983
982 #if defined(OS_WIN) 984 #if defined(OS_WIN)
983 // On Windows XP, give twice the time for shutdown. 985 // On Windows XP, give twice the time for shutdown.
984 if (base::win::GetVersion() <= base::win::VERSION_XP) 986 if (base::win::GetVersion() <= base::win::VERSION_XP)
985 actual_duration *= 2; 987 actual_duration *= 2;
986 #endif 988 #endif
987 989
988 shutdown_watchdog_ = new ShutdownWatchDogThread(actual_duration); 990 shutdown_watchdog_ = new ShutdownWatchDogThread(actual_duration);
989 shutdown_watchdog_->Arm(); 991 shutdown_watchdog_->Arm();
990 } 992 }
OLDNEW
« no previous file with comments | « chrome/browser/managed_mode/managed_user_service.cc ('k') | chrome/browser/metrics/variations/variations_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698