| 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_mac.h" | 5 #include "components/crash/content/app/crashpad_mac.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 #include <unistd.h> | 8 #include <unistd.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // sever this connection. | 146 // sever this connection. |
| 147 arguments.push_back( | 147 arguments.push_back( |
| 148 "--reset-own-crash-exception-port-to-system-default"); | 148 "--reset-own-crash-exception-port-to-system-default"); |
| 149 } | 149 } |
| 150 | 150 |
| 151 bool result = crashpad_client.StartHandler(handler_path, | 151 bool result = crashpad_client.StartHandler(handler_path, |
| 152 database_path, | 152 database_path, |
| 153 url, | 153 url, |
| 154 process_annotations, | 154 process_annotations, |
| 155 arguments, | 155 arguments, |
| 156 false); | 156 true); |
| 157 if (result) { | 157 if (result) { |
| 158 result = crashpad_client.UseHandler(); | 158 result = crashpad_client.UseHandler(); |
| 159 } | 159 } |
| 160 | 160 |
| 161 // If this is an initial client that's not the browser process, it's | 161 // If this is an initial client that's not the browser process, it's |
| 162 // important to sever the connection to any existing handler. If | 162 // important to sever the connection to any existing handler. If |
| 163 // StartHandler() or UseHandler() failed, call UseSystemDefaultHandler() | 163 // StartHandler() or UseHandler() failed, call UseSystemDefaultHandler() |
| 164 // in that case to drop the link to the existing handler. | 164 // in that case to drop the link to the existing handler. |
| 165 if (!result && !browser_process) { | 165 if (!result && !browser_process) { |
| 166 crashpad::CrashpadClient::UseSystemDefaultHandler(); | 166 crashpad::CrashpadClient::UseSystemDefaultHandler(); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 | 274 |
| 275 struct { | 275 struct { |
| 276 bool operator()(const UploadedReport& a, const UploadedReport& b) { | 276 bool operator()(const UploadedReport& a, const UploadedReport& b) { |
| 277 return a.creation_time >= b.creation_time; | 277 return a.creation_time >= b.creation_time; |
| 278 } | 278 } |
| 279 } sort_by_time; | 279 } sort_by_time; |
| 280 std::sort(uploaded_reports->begin(), uploaded_reports->end(), sort_by_time); | 280 std::sort(uploaded_reports->begin(), uploaded_reports->end(), sort_by_time); |
| 281 } | 281 } |
| 282 | 282 |
| 283 } // namespace crash_reporter | 283 } // namespace crash_reporter |
| OLD | NEW |