| 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 "chrome/app/chrome_crash_reporter_client.h" | 5 #include "chrome/app/chrome_crash_reporter_client.h" |
| 6 | 6 |
| 7 #include "base/atomicops.h" | 7 #include "base/atomicops.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 // A atomic counter to make each crash dump value name unique. | 73 // A atomic counter to make each crash dump value name unique. |
| 74 base::subtle::Atomic32 g_browser_crash_dump_count = 0; | 74 base::subtle::Atomic32 g_browser_crash_dump_count = 0; |
| 75 #endif | 75 #endif |
| 76 | 76 |
| 77 } // namespace | 77 } // namespace |
| 78 | 78 |
| 79 ChromeCrashReporterClient::ChromeCrashReporterClient() {} | 79 ChromeCrashReporterClient::ChromeCrashReporterClient() {} |
| 80 | 80 |
| 81 ChromeCrashReporterClient::~ChromeCrashReporterClient() {} | 81 ChromeCrashReporterClient::~ChromeCrashReporterClient() {} |
| 82 | 82 |
| 83 #if !defined(OS_MACOSX) |
| 83 void ChromeCrashReporterClient::SetCrashReporterClientIdFromGUID( | 84 void ChromeCrashReporterClient::SetCrashReporterClientIdFromGUID( |
| 84 const std::string& client_guid) { | 85 const std::string& client_guid) { |
| 85 crash_keys::SetCrashClientIdFromGUID(client_guid); | 86 crash_keys::SetMetricsClientIdFromGUID(client_guid); |
| 86 } | 87 } |
| 88 #endif |
| 87 | 89 |
| 88 #if defined(OS_WIN) | 90 #if defined(OS_WIN) |
| 89 bool ChromeCrashReporterClient::GetAlternativeCrashDumpLocation( | 91 bool ChromeCrashReporterClient::GetAlternativeCrashDumpLocation( |
| 90 base::FilePath* crash_dir) { | 92 base::FilePath* crash_dir) { |
| 91 // By setting the BREAKPAD_DUMP_LOCATION environment variable, an alternate | 93 // By setting the BREAKPAD_DUMP_LOCATION environment variable, an alternate |
| 92 // location to write breakpad crash dumps can be set. | 94 // location to write breakpad crash dumps can be set. |
| 93 scoped_ptr<base::Environment> env(base::Environment::Create()); | 95 scoped_ptr<base::Environment> env(base::Environment::Create()); |
| 94 std::string alternate_crash_dump_location; | 96 std::string alternate_crash_dump_location; |
| 95 if (env->GetVar("BREAKPAD_DUMP_LOCATION", &alternate_crash_dump_location)) { | 97 if (env->GetVar("BREAKPAD_DUMP_LOCATION", &alternate_crash_dump_location)) { |
| 96 *crash_dir = base::FilePath::FromUTF8Unsafe(alternate_crash_dump_location); | 98 *crash_dir = base::FilePath::FromUTF8Unsafe(alternate_crash_dump_location); |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 bool ChromeCrashReporterClient::EnableBreakpadForProcess( | 371 bool ChromeCrashReporterClient::EnableBreakpadForProcess( |
| 370 const std::string& process_type) { | 372 const std::string& process_type) { |
| 371 return process_type == switches::kRendererProcess || | 373 return process_type == switches::kRendererProcess || |
| 372 process_type == switches::kPluginProcess || | 374 process_type == switches::kPluginProcess || |
| 373 process_type == switches::kPpapiPluginProcess || | 375 process_type == switches::kPpapiPluginProcess || |
| 374 process_type == switches::kZygoteProcess || | 376 process_type == switches::kZygoteProcess || |
| 375 process_type == switches::kGpuProcess; | 377 process_type == switches::kGpuProcess; |
| 376 } | 378 } |
| 377 | 379 |
| 378 } // namespace chrome | 380 } // namespace chrome |
| OLD | NEW |