| OLD | NEW |
| 1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 launch_data_t LaunchDataDictionaryForJob(const std::string& label) { | 26 launch_data_t LaunchDataDictionaryForJob(const std::string& label) { |
| 27 base::mac::ScopedLaunchData request( | 27 base::mac::ScopedLaunchData request( |
| 28 launch_data_alloc(LAUNCH_DATA_DICTIONARY)); | 28 launch_data_alloc(LAUNCH_DATA_DICTIONARY)); |
| 29 launch_data_dict_insert( | 29 launch_data_dict_insert( |
| 30 request, launch_data_new_string(label.c_str()), LAUNCH_KEY_GETJOB); | 30 request, launch_data_new_string(label.c_str()), LAUNCH_KEY_GETJOB); |
| 31 | 31 |
| 32 base::mac::ScopedLaunchData response(launch_msg(request)); | 32 base::mac::ScopedLaunchData response(launch_msg(request)); |
| 33 if (launch_data_get_type(response) != LAUNCH_DATA_DICTIONARY) { | 33 if (launch_data_get_type(response) != LAUNCH_DATA_DICTIONARY) { |
| 34 return NULL; | 34 return nullptr; |
| 35 } | 35 } |
| 36 | 36 |
| 37 return response.release(); | 37 return response.release(); |
| 38 } | 38 } |
| 39 | 39 |
| 40 } // namespace | 40 } // namespace |
| 41 | 41 |
| 42 namespace crashpad { | 42 namespace crashpad { |
| 43 | 43 |
| 44 bool ServiceManagementSubmitJob(CFDictionaryRef job_cf) { | 44 bool ServiceManagementSubmitJob(CFDictionaryRef job_cf) { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 } | 131 } |
| 132 | 132 |
| 133 if (launch_data_get_type(pid) != LAUNCH_DATA_INTEGER) { | 133 if (launch_data_get_type(pid) != LAUNCH_DATA_INTEGER) { |
| 134 return 0; | 134 return 0; |
| 135 } | 135 } |
| 136 | 136 |
| 137 return launch_data_get_integer(pid); | 137 return launch_data_get_integer(pid); |
| 138 } | 138 } |
| 139 | 139 |
| 140 } // namespace crashpad | 140 } // namespace crashpad |
| OLD | NEW |