Cherry pick r1351 into chrome_37 branch.

Original commit message:
[Android]: Remove __system_property_get(ro.build.fingerprint) from
WriteOSInformation.

__system_property_get has been removed from the Android NDK for 'L' so Breakpad
no longer links. This CL just removes the call in WriteOSInformation because
Chrome already passes the build fingerprint as a crash key called
"android_build_fp" in the crash report HTTP POST message.

BUG=394841,393903
R=mark@chromium.org



git-svn-id: http://google-breakpad.googlecode.com/svn/branches/chrome_37@1353 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
rmcilroy@chromium.org 2014-07-18 17:58:36 +00:00
parent a6f96c48f3
commit a9d1f1f299

View File

@ -1758,23 +1758,6 @@ class MinidumpWriter {
space_left -= info_len; space_left -= info_len;
} }
#ifdef __ANDROID__
// On Android, try to get the build fingerprint and append it.
// Fail gracefully because there is no guarantee that the system
// property will always be available or accessible.
char fingerprint[PROP_VALUE_MAX];
int fingerprint_len = __system_property_get("ro.build.fingerprint",
fingerprint);
// System property values shall always be zero-terminated.
// Be paranoid and don't trust the system.
if (fingerprint_len > 0 && fingerprint_len < PROP_VALUE_MAX) {
const char* separator = " ";
if (!first_item)
my_strlcat(buf, separator, sizeof(buf));
my_strlcat(buf, fingerprint, sizeof(buf));
}
#endif
MDLocationDescriptor location; MDLocationDescriptor location;
if (!minidump_writer_.WriteString(buf, 0, &location)) if (!minidump_writer_.WriteString(buf, 0, &location))
return false; return false;