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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 // The entire point of this is to block so that the correct | 109 // The entire point of this is to block so that the correct |
110 // stack is logged. | 110 // stack is logged. |
111 base::ThreadRestrictions::ScopedAllowIO allow_io; | 111 base::ThreadRestrictions::ScopedAllowIO allow_io; |
112 base::PlatformThread::Join(handle); | 112 base::PlatformThread::Join(handle); |
113 } | 113 } |
114 } | 114 } |
115 | 115 |
116 private: | 116 private: |
117 DumpHelper() {} | 117 DumpHelper() {} |
118 | 118 |
119 virtual void ThreadMain() OVERRIDE { | 119 virtual void ThreadMain() override { |
120 base::PlatformThread::SetName("CrDumpHelper"); | 120 base::PlatformThread::SetName("CrDumpHelper"); |
121 BreakpadGenerateAndSendReport(gBreakpadRef); | 121 BreakpadGenerateAndSendReport(gBreakpadRef); |
122 } | 122 } |
123 | 123 |
124 DISALLOW_COPY_AND_ASSIGN(DumpHelper); | 124 DISALLOW_COPY_AND_ASSIGN(DumpHelper); |
125 }; | 125 }; |
126 | 126 |
127 void SIGABRTHandler(int signal) { | 127 void SIGABRTHandler(int signal) { |
128 // The OSX abort() (link below) masks all signals for the process, | 128 // The OSX abort() (link below) masks all signals for the process, |
129 // and all except SIGABRT for the thread. SIGABRT will be masked | 129 // and all except SIGABRT for the thread. SIGABRT will be masked |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 | 281 |
282 // Store process type in crash dump. | 282 // Store process type in crash dump. |
283 SetCrashKeyValue(@"ptype", process_type); | 283 SetCrashKeyValue(@"ptype", process_type); |
284 | 284 |
285 NSString* pid_value = | 285 NSString* pid_value = |
286 [NSString stringWithFormat:@"%d", static_cast<unsigned int>(getpid())]; | 286 [NSString stringWithFormat:@"%d", static_cast<unsigned int>(getpid())]; |
287 SetCrashKeyValue(@"pid", pid_value); | 287 SetCrashKeyValue(@"pid", pid_value); |
288 } | 288 } |
289 | 289 |
290 } // namespace breakpad | 290 } // namespace breakpad |
OLD | NEW |