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

Unified Diff: chromecast/crash/cast_crash_reporter_client.cc

Issue 1154383006: Adding crash utilities to chromecast/crash. (Closed) Base URL: https://eureka-internal.googlesource.com/chromium/src@master
Patch Set: Refactored crash dependencies Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chromecast/crash/cast_crash_reporter_client.cc
diff --git a/chromecast/crash/cast_crash_reporter_client.cc b/chromecast/crash/cast_crash_reporter_client.cc
deleted file mode 100644
index 8edbfa6b7b26eb91df051b3801d596a90944609b..0000000000000000000000000000000000000000
--- a/chromecast/crash/cast_crash_reporter_client.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2014 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 "chromecast/crash/cast_crash_reporter_client.h"
-
-#include "base/time/time.h"
-#include "components/crash/app/breakpad_linux.h"
-#include "content/public/common/content_switches.h"
-
-namespace chromecast {
-
-namespace {
-
-char* g_process_type = NULL;
-uint64_t g_process_start_time = 0;
-
-} // namespace
-
-// static
-void CastCrashReporterClient::InitCrashReporter(
- const std::string& process_type) {
- g_process_start_time = (base::TimeTicks::Now() -
- base::TimeTicks()).InMilliseconds();
-
- // Save the process type (leaked).
- // Note: "browser" process is identified by empty process type string.
- const std::string& named_process_type(
- process_type.empty() ? "browser" : process_type);
- const size_t process_type_len = named_process_type.size() + 1;
- g_process_type = new char[process_type_len];
- strncpy(g_process_type, named_process_type.c_str(), process_type_len);
-
- // Start up breakpad for this process, if applicable.
- breakpad::InitCrashReporter(process_type);
-}
-
-// static
-char* CastCrashReporterClient::GetProcessType() {
- return g_process_type;
-}
-
-// static
-uint64_t CastCrashReporterClient::GetProcessStartTime() {
- return g_process_start_time;
-}
-
-CastCrashReporterClient::CastCrashReporterClient() {}
-CastCrashReporterClient::~CastCrashReporterClient() {}
-
-bool CastCrashReporterClient::EnableBreakpadForProcess(
- const std::string& process_type) {
- return process_type == switches::kRendererProcess ||
- process_type == switches::kZygoteProcess ||
- process_type == switches::kGpuProcess;
-}
-
-} // namespace chromecast

Powered by Google App Engine
This is Rietveld 408576698