OLD | NEW |
1 // Copyright (c) 2006, Google Inc. | 1 // Copyright (c) 2006, Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 const UInt8 *data_bytes = | 147 const UInt8 *data_bytes = |
148 CFReadStreamGetBuffer(read_stream, 0, &num_bytes_read); | 148 CFReadStreamGetBuffer(read_stream, 0, &num_bytes_read); |
149 if (data_bytes) { | 149 if (data_bytes) { |
150 data = CFDataCreate(NULL, data_bytes, num_bytes_read); | 150 data = CFDataCreate(NULL, data_bytes, num_bytes_read); |
151 } | 151 } |
152 CFReadStreamClose(read_stream); | 152 CFReadStreamClose(read_stream); |
153 CFRelease(read_stream); | 153 CFRelease(read_stream); |
154 if (!data) { | 154 if (!data) { |
155 return; | 155 return; |
156 } | 156 } |
157 CFDictionaryRef list = static_cast<CFDictionaryRef> | 157 CFDictionaryRef list = |
158 (CFPropertyListCreateFromXMLData(NULL, data, kCFPropertyListImmutable, | 158 static_cast<CFDictionaryRef>(CFPropertyListCreateWithData( |
159 NULL)); | 159 NULL, data, kCFPropertyListImmutable, NULL, NULL)); |
160 CFRelease(data); | 160 CFRelease(data); |
161 if (!list) { | 161 if (!list) { |
162 return; | 162 return; |
163 } | 163 } |
164 CFStringRef build_version = static_cast<CFStringRef> | 164 CFStringRef build_version = static_cast<CFStringRef> |
165 (CFDictionaryGetValue(list, CFSTR("ProductBuildVersion"))); | 165 (CFDictionaryGetValue(list, CFSTR("ProductBuildVersion"))); |
166 CFStringRef product_version = static_cast<CFStringRef> | 166 CFStringRef product_version = static_cast<CFStringRef> |
167 (CFDictionaryGetValue(list, CFSTR("ProductVersion"))); | 167 (CFDictionaryGetValue(list, CFSTR("ProductVersion"))); |
168 string build_str = ConvertToString(build_version); | 168 string build_str = ConvertToString(build_version); |
169 string product_str = ConvertToString(product_version); | 169 string product_str = ConvertToString(product_version); |
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1582 } else { | 1582 } else { |
1583 info_ptr->validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID; | 1583 info_ptr->validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID; |
1584 info_ptr->dump_thread_id = handler_thread_; | 1584 info_ptr->dump_thread_id = handler_thread_; |
1585 info_ptr->requesting_thread_id = 0; | 1585 info_ptr->requesting_thread_id = 0; |
1586 } | 1586 } |
1587 | 1587 |
1588 return true; | 1588 return true; |
1589 } | 1589 } |
1590 | 1590 |
1591 } // namespace google_breakpad | 1591 } // namespace google_breakpad |
OLD | NEW |