[DevTools] Remove forwarded connections counting
[chromium-blink-merge.git] / content / shell / app / shell_crash_reporter_client.cc
blobfab0e9031b55680471e417e45d82bca698ee8959
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/shell/app/shell_crash_reporter_client.h"
7 #include "base/command_line.h"
8 #include "base/files/file_path.h"
9 #include "base/strings/string16.h"
10 #include "base/strings/utf_string_conversions.h"
11 #include "content/public/common/content_switches.h"
12 #include "content/shell/common/shell_switches.h"
14 #if defined(OS_ANDROID)
15 #include "content/shell/android/shell_descriptors.h"
16 #endif
18 namespace content {
20 ShellCrashReporterClient::ShellCrashReporterClient() {}
21 ShellCrashReporterClient::~ShellCrashReporterClient() {}
23 #if defined(OS_WIN)
24 void ShellCrashReporterClient::GetProductNameAndVersion(
25 const base::FilePath& exe_path,
26 base::string16* product_name,
27 base::string16* version,
28 base::string16* special_build,
29 base::string16* channel_name) {
30 *product_name = base::ASCIIToUTF16("content_shell");
31 *version = base::ASCIIToUTF16(CONTENT_SHELL_VERSION);
32 *special_build = base::string16();
33 *channel_name = base::string16();
35 #endif
37 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS)
38 void ShellCrashReporterClient::GetProductNameAndVersion(
39 const char** product_name,
40 const char** version) {
41 *product_name = "content_shell";
42 *version = CONTENT_SHELL_VERSION;
45 base::FilePath ShellCrashReporterClient::GetReporterLogFilename() {
46 return base::FilePath(FILE_PATH_LITERAL("uploads.log"));
48 #endif
50 bool ShellCrashReporterClient::GetCrashDumpLocation(base::FilePath* crash_dir) {
51 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
52 switches::kCrashDumpsDir))
53 return false;
54 *crash_dir = base::CommandLine::ForCurrentProcess()->GetSwitchValuePath(
55 switches::kCrashDumpsDir);
56 return true;
59 #if defined(OS_ANDROID)
60 int ShellCrashReporterClient::GetAndroidMinidumpDescriptor() {
61 return kAndroidMinidumpDescriptor;
63 #endif
65 bool ShellCrashReporterClient::EnableBreakpadForProcess(
66 const std::string& process_type) {
67 return process_type == switches::kRendererProcess ||
68 process_type == switches::kPluginProcess ||
69 process_type == switches::kPpapiPluginProcess ||
70 process_type == switches::kZygoteProcess ||
71 process_type == switches::kGpuProcess;
74 } // namespace content