Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: crash_collector.cc

Issue 6559003: Modify crash-reporter to collect crash information for unofficial builds. (Closed) Base URL: http://git.chromium.org/git/crash-reporter.git@master
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « crash_collector.h ('k') | user_collector.cc » ('j') | user_collector.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crash_collector.cc
diff --git a/crash_collector.cc b/crash_collector.cc
index afd72d1e129757c3a5f992abac0171d47d826057..5f6bf4728b5f5b9f4a64149bc26a006bad46014d 100644
--- a/crash_collector.cc
+++ b/crash_collector.cc
@@ -410,3 +410,24 @@ void CrashCollector::WriteCrashMetaData(const FilePath &meta_path,
logger_->LogError("Unable to write %s", meta_path.value().c_str());
}
}
+
+bool
+CrashCollector::IsOfficialBuild() {
+ std::map<std::string, std::string> contents;
+ if (!ReadKeyValueFile(FilePath(std::string(lsb_release_)), '=', &contents)) {
+ logger_->LogError("Problem parsing %s", lsb_release_);
+ // Even though there was some failure, take as much as we could read.
+ }
+ std::string version_description("unknown");
+ std::map<std::string, std::string>::iterator i;
+ if ((i = contents.find("CHROMEOS_VERSION_DESCRIPTION")) != contents.end()) {
+ version_description = i->second;
+ }
+
+ return (version_description.find("Official") != std::string::npos);
+}
+
+bool CrashCollector::IsCrashTestInProgress() {
kmixter1 2011/02/23 04:49:02 Use file_util::PathExists.
thieule 2011/02/23 21:03:04 Done.
+ struct stat statbuf;
+ return (stat("/tmp/crash-test-in-progress", &statbuf) == 0);
+}
« no previous file with comments | « crash_collector.h ('k') | user_collector.cc » ('j') | user_collector.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698