Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/crash/content/app/crashpad.h" | 5 #include "components/crash/content/app/crashpad.h" |
| 6 | 6 |
| 7 #include <CoreFoundation/CoreFoundation.h> | 7 #include <CoreFoundation/CoreFoundation.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 #include <unistd.h> | 9 #include <unistd.h> |
| 10 | 10 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 "--reset-own-crash-exception-port-to-system-default"); | 90 "--reset-own-crash-exception-port-to-system-default"); |
| 91 } | 91 } |
| 92 | 92 |
| 93 crashpad::CrashpadClient crashpad_client; | 93 crashpad::CrashpadClient crashpad_client; |
| 94 bool result = crashpad_client.StartHandler(handler_path, | 94 bool result = crashpad_client.StartHandler(handler_path, |
| 95 database_path, | 95 database_path, |
| 96 metrics_path, | 96 metrics_path, |
| 97 url, | 97 url, |
| 98 process_annotations, | 98 process_annotations, |
| 99 arguments, | 99 arguments, |
| 100 true); | 100 true, |
| 101 if (result) { | 101 false); |
| 102 result = crashpad_client.UseHandler(); | |
| 103 } | |
| 104 | 102 |
| 105 // If this is an initial client that's not the browser process, it's | 103 // If this is an initial client that's not the browser process, it's |
| 106 // important to sever the connection to any existing handler. If | 104 // important to sever the connection to any existing handler. If |
| 107 // StartHandler() or UseHandler() failed, call UseSystemDefaultHandler() | 105 // StartHandler() call UseSystemDefaultHandler() in that case to drop the |
|
Mark Mentovai
2016/11/03 21:35:30
Removed too many words here.
scottmg
2016/11/03 22:01:08
Done.
| |
| 108 // in that case to drop the link to the existing handler. | 106 // link to the existing handler. |
| 109 if (!result && !browser_process) { | 107 if (!result && !browser_process) { |
| 110 crashpad::CrashpadClient::UseSystemDefaultHandler(); | 108 crashpad::CrashpadClient::UseSystemDefaultHandler(); |
| 111 } | 109 } |
| 112 } // @autoreleasepool | 110 } // @autoreleasepool |
| 113 } | 111 } |
| 114 | 112 |
| 115 return database_path; | 113 return database_path; |
| 116 } | 114 } |
| 117 | 115 |
| 118 } // namespace internal | 116 } // namespace internal |
| 119 } // namespace crash_reporter | 117 } // namespace crash_reporter |
| OLD | NEW |