OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 "content/shell/app/shell_crash_reporter_client.h" | 5 #include "content/shell/app/shell_crash_reporter_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 *product_name = "content_shell"; | 41 *product_name = "content_shell"; |
42 *version = CONTENT_SHELL_VERSION; | 42 *version = CONTENT_SHELL_VERSION; |
43 } | 43 } |
44 | 44 |
45 base::FilePath ShellCrashReporterClient::GetReporterLogFilename() { | 45 base::FilePath ShellCrashReporterClient::GetReporterLogFilename() { |
46 return base::FilePath(FILE_PATH_LITERAL("uploads.log")); | 46 return base::FilePath(FILE_PATH_LITERAL("uploads.log")); |
47 } | 47 } |
48 #endif | 48 #endif |
49 | 49 |
50 bool ShellCrashReporterClient::GetCrashDumpLocation(base::FilePath* crash_dir) { | 50 bool ShellCrashReporterClient::GetCrashDumpLocation(base::FilePath* crash_dir) { |
51 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kCrashDumpsDir)) | 51 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 52 switches::kCrashDumpsDir)) |
52 return false; | 53 return false; |
53 *crash_dir = CommandLine::ForCurrentProcess()->GetSwitchValuePath( | 54 *crash_dir = base::CommandLine::ForCurrentProcess()->GetSwitchValuePath( |
54 switches::kCrashDumpsDir); | 55 switches::kCrashDumpsDir); |
55 return true; | 56 return true; |
56 } | 57 } |
57 | 58 |
58 #if defined(OS_ANDROID) | 59 #if defined(OS_ANDROID) |
59 int ShellCrashReporterClient::GetAndroidMinidumpDescriptor() { | 60 int ShellCrashReporterClient::GetAndroidMinidumpDescriptor() { |
60 return kAndroidMinidumpDescriptor; | 61 return kAndroidMinidumpDescriptor; |
61 } | 62 } |
62 #endif | 63 #endif |
63 | 64 |
64 bool ShellCrashReporterClient::EnableBreakpadForProcess( | 65 bool ShellCrashReporterClient::EnableBreakpadForProcess( |
65 const std::string& process_type) { | 66 const std::string& process_type) { |
66 return process_type == switches::kRendererProcess || | 67 return process_type == switches::kRendererProcess || |
67 process_type == switches::kPluginProcess || | 68 process_type == switches::kPluginProcess || |
68 process_type == switches::kPpapiPluginProcess || | 69 process_type == switches::kPpapiPluginProcess || |
69 process_type == switches::kZygoteProcess || | 70 process_type == switches::kZygoteProcess || |
70 process_type == switches::kGpuProcess; | 71 process_type == switches::kGpuProcess; |
71 } | 72 } |
72 | 73 |
73 } // namespace content | 74 } // namespace content |
OLD | NEW |