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 #import "components/crash/app/breakpad_mac.h" | 5 #import "components/crash/app/breakpad_mac.h" |
6 | 6 |
7 #include <CoreFoundation/CoreFoundation.h> | 7 #include <CoreFoundation/CoreFoundation.h> |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 if (gBreakpadRef == NULL) { | 275 if (gBreakpadRef == NULL) { |
276 return; | 276 return; |
277 } | 277 } |
278 | 278 |
279 // Determine the process type. | 279 // Determine the process type. |
280 NSString* process_type = @"browser"; | 280 NSString* process_type = @"browser"; |
281 if (!process_type_switch.empty()) { | 281 if (!process_type_switch.empty()) { |
282 process_type = base::SysUTF8ToNSString(process_type_switch); | 282 process_type = base::SysUTF8ToNSString(process_type_switch); |
283 } | 283 } |
284 | 284 |
285 GetCrashReporterClient()->InstallAdditionalFilters(gBreakpadRef); | |
286 | |
287 // Store process type in crash dump. | 285 // Store process type in crash dump. |
288 SetCrashKeyValue(@"ptype", process_type); | 286 SetCrashKeyValue(@"ptype", process_type); |
289 | 287 |
290 NSString* pid_value = | 288 NSString* pid_value = |
291 [NSString stringWithFormat:@"%d", static_cast<unsigned int>(getpid())]; | 289 [NSString stringWithFormat:@"%d", static_cast<unsigned int>(getpid())]; |
292 SetCrashKeyValue(@"pid", pid_value); | 290 SetCrashKeyValue(@"pid", pid_value); |
293 } | 291 } |
294 | 292 |
295 } // namespace breakpad | 293 } // namespace breakpad |
OLD | NEW |