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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 bool ChromeCrashReporterClient::EnableBreakpadForProcess( | 378 bool ChromeCrashReporterClient::EnableBreakpadForProcess( |
377 const std::string& process_type) { | 379 const std::string& process_type) { |
378 return process_type == switches::kRendererProcess || | 380 return process_type == switches::kRendererProcess || |
379 process_type == switches::kPluginProcess || | 381 process_type == switches::kPluginProcess || |
380 process_type == switches::kPpapiPluginProcess || | 382 process_type == switches::kPpapiPluginProcess || |
381 process_type == switches::kZygoteProcess || | 383 process_type == switches::kZygoteProcess || |
382 process_type == switches::kGpuProcess; | 384 process_type == switches::kGpuProcess; |
383 } | 385 } |
384 | 386 |
385 } // namespace chrome | 387 } // namespace chrome |
OLD | NEW |