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

Unified Diff: chrome/common/dump_without_crashing.cc

Issue 99523009: Move DumpProcessWithoutCrash to base, so we can use it from net and content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/dump_without_crashing.h ('k') | chrome/common/logging_chrome.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/dump_without_crashing.cc
diff --git a/chrome/common/dump_without_crashing.cc b/chrome/common/dump_without_crashing.cc
deleted file mode 100644
index 65c6494d43f32726814c41baf0bb26c154403cb0..0000000000000000000000000000000000000000
--- a/chrome/common/dump_without_crashing.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "build/build_config.h"
-
-#include "chrome/common/dump_without_crashing.h"
-
-#include "base/logging.h"
-#include "chrome/common/chrome_constants.h"
-
-#if defined(OS_WIN)
-#include <windows.h>
-#endif
-
-namespace {
-
-#if defined(OS_POSIX)
-// Pointer to the function that's called by DumpWithoutCrashing() to dump the
-// process's memory.
-void (*dump_without_crashing_function_)() = NULL;
-#endif
-
-} // namespace
-
-namespace logging {
-
-void DumpWithoutCrashing() {
-#if defined(OS_WIN)
- // Get the breakpad pointer from chrome.exe
- typedef void (__cdecl *DumpProcessFunction)();
- DumpProcessFunction DumpProcess = reinterpret_cast<DumpProcessFunction>(
- ::GetProcAddress(::GetModuleHandle(chrome::kBrowserProcessExecutableName),
- "DumpProcessWithoutCrash"));
- if (DumpProcess)
- DumpProcess();
-#elif defined(OS_POSIX)
- if (dump_without_crashing_function_)
- (*dump_without_crashing_function_)();
-#else
- NOTIMPLEMENTED();
-#endif
-}
-
-#if defined(OS_POSIX)
-void SetDumpWithoutCrashingFunction(void (*function)()) {
- dump_without_crashing_function_ = function;
-}
-#endif
-
-} // namespace logging
« no previous file with comments | « chrome/common/dump_without_crashing.h ('k') | chrome/common/logging_chrome.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698