summaryrefslogtreecommitdiffstats
path: root/chrome/app/breakpad_linux.cc
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-05 22:31:03 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-05 22:31:03 +0000
commit157d547807a2b9d0e42f17636ffc39336a9a62f6 (patch)
tree9ae45f8dcd0a5298b39c44dd94d07219200e73c1 /chrome/app/breakpad_linux.cc
parent23ffe4da52705ce6fd12d3aa3e178c2b5dd79598 (diff)
downloadchromium_src-157d547807a2b9d0e42f17636ffc39336a9a62f6.zip
chromium_src-157d547807a2b9d0e42f17636ffc39336a9a62f6.tar.gz
chromium_src-157d547807a2b9d0e42f17636ffc39336a9a62f6.tar.bz2
Change id that identifies client in crash reports. Whenever metrics service recording is enabled, it sets the client id for crash reporting.
- On Windows this id gets stored in the registry so that we can read it pretty early regardless of the process type. If the id has not been generated (like in the case of first run) we initialize with empty string but the real id gets inserted once metrics service gets initialized. - On Linux we were creating a hash and storing it in 'Consent to Send Stats'. This change replaces that hash with the metrics id. Unlike before calling SetConsentToSendStats doesn't generate a new id, if an id already exists. - On Mac there was no id set. Now we use metrics id as guid for the browser process. For other process types a change is still required to pass that id as command line param to renderers/plugins (like Linux). BUG=23658 TEST=Cause a deliberate crash in Chrome renderer/browser/plugin and make sure the clientID reported to the crash server is the right GUID. Review URL: http://codereview.chromium.org/346007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31143 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/breakpad_linux.cc')
-rw-r--r--chrome/app/breakpad_linux.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/chrome/app/breakpad_linux.cc b/chrome/app/breakpad_linux.cc
index c60b3e8..fe47108 100644
--- a/chrome/app/breakpad_linux.cc
+++ b/chrome/app/breakpad_linux.cc
@@ -522,11 +522,11 @@ pid_t HandleCrashDump(const BreakpadInfo& info) {
return child;
}
-// This is defined in chrome/browser/google_update_settings_linux.cc, it's the
+// This is defined in chrome/browser/google_update_settings_posix.cc, it's the
// static string containing the user's unique GUID. We send this in the crash
// report.
namespace google_update {
-extern std::string linux_guid;
+extern std::string posix_guid;
}
// This is defined in base/linux_util.cc, it's the static string containing the
@@ -562,8 +562,8 @@ static bool CrashDone(const char* dump_path,
info.process_type_length = 7;
info.crash_url = NULL;
info.crash_url_length = 0;
- info.guid = google_update::linux_guid.data();
- info.guid_length = google_update::linux_guid.length();
+ info.guid = google_update::posix_guid.data();
+ info.guid_length = google_update::posix_guid.length();
info.distro = base::linux_distro.data();
info.distro_length = base::linux_distro.length();
info.upload = upload;
@@ -617,13 +617,13 @@ RendererCrashHandler(const void* crash_context, size_t crash_context_size,
char guid[kGuidSize + 1] = {0};
char crash_url[kMaxActiveURLSize + 1] = {0};
char distro[kDistroSize + 1] = {0};
- const size_t guid_len = std::min(google_update::linux_guid.size(),
+ const size_t guid_len = std::min(google_update::posix_guid.size(),
kGuidSize);
const size_t crash_url_len =
std::min(child_process_logging::active_url.size(), kMaxActiveURLSize);
const size_t distro_len =
std::min(base::linux_distro.size(), kDistroSize);
- memcpy(guid, google_update::linux_guid.data(), guid_len);
+ memcpy(guid, google_update::posix_guid.data(), guid_len);
memcpy(crash_url, child_process_logging::active_url.data(), crash_url_len);
memcpy(distro, base::linux_distro.data(), distro_len);
@@ -636,7 +636,7 @@ RendererCrashHandler(const void* crash_context, size_t crash_context_size,
iov[0].iov_base = const_cast<void*>(crash_context);
iov[0].iov_len = crash_context_size;
iov[1].iov_base = guid;
- iov[1].iov_len = kGuidSize + 1;
+ iov[1].iov_len = guid_len + 1;
iov[2].iov_base = crash_url;
iov[2].iov_len = kMaxActiveURLSize + 1;
iov[3].iov_base = distro;
@@ -695,10 +695,10 @@ void InitCrashReporter() {
parsed_command_line.GetSwitchValue(switches::kEnableCrashReporter));
size_t separator = switch_value.find(",");
if (separator != std::string::npos) {
- google_update::linux_guid = switch_value.substr(0, separator);
+ google_update::posix_guid = switch_value.substr(0, separator);
base::linux_distro = switch_value.substr(separator + 1);
} else {
- google_update::linux_guid = switch_value;
+ google_update::posix_guid = switch_value;
}
EnableRendererCrashDumping();
}