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

Side by Side Diff: chrome_frame/crash_reporting/crash_report.cc

Issue 2776010: Move the crash metrics to the crash reproting lib to avoid a back dependency ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months 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 1
2 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 2 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 // crash_report.cc : Implementation crash reporting. 6 // crash_report.cc : Implementation crash reporting.
7 #include "chrome_frame/crash_reporting/crash_report.h" 7 #include "chrome_frame/crash_reporting/crash_report.h"
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/lock.h" 10 #include "base/lock.h"
11 #include "breakpad/src/client/windows/handler/exception_handler.h" 11 #include "breakpad/src/client/windows/handler/exception_handler.h"
12 #include "chrome_frame/crash_metrics.h" 12 #include "chrome_frame/crash_reporting/crash_metrics.h"
13 13
14 // TODO(joshia): factor out common code with chrome used for crash reporting 14 // TODO(joshia): factor out common code with chrome used for crash reporting
15 const wchar_t kGoogleUpdatePipeName[] = L"\\\\.\\pipe\\GoogleCrashServices\\"; 15 const wchar_t kGoogleUpdatePipeName[] = L"\\\\.\\pipe\\GoogleCrashServices\\";
16 16
17 // This lock protects against concurrent access to g_breakpad. 17 // This lock protects against concurrent access to g_breakpad.
18 static Lock g_breakpad_lock; 18 static Lock g_breakpad_lock;
19 static google_breakpad::ExceptionHandler* g_breakpad = NULL; 19 static google_breakpad::ExceptionHandler* g_breakpad = NULL;
20 20
21 // These minidump flag combinations have been tested safe against the 21 // These minidump flag combinations have been tested safe against the
22 // DbgHelp.dll version that ships with Windows XP SP2. 22 // DbgHelp.dll version that ships with Windows XP SP2.
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 bool WriteMinidumpForException(EXCEPTION_POINTERS* p) { 174 bool WriteMinidumpForException(EXCEPTION_POINTERS* p) {
175 AutoLock lock(g_breakpad_lock); 175 AutoLock lock(g_breakpad_lock);
176 CrashMetricsReporter::GetInstance()->IncrementMetric( 176 CrashMetricsReporter::GetInstance()->IncrementMetric(
177 CrashMetricsReporter::CRASH_COUNT); 177 CrashMetricsReporter::CRASH_COUNT);
178 bool success = false; 178 bool success = false;
179 if (g_breakpad) { 179 if (g_breakpad) {
180 success = g_breakpad->WriteMinidumpForException(p); 180 success = g_breakpad->WriteMinidumpForException(p);
181 } 181 }
182 return success; 182 return success;
183 } 183 }
OLDNEW
« no previous file with comments | « chrome_frame/crash_reporting/crash_metrics.cc ('k') | chrome_frame/crash_reporting/crash_reporting.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698