crash-reporter: Write out a magic string for Chrome crashes.

Also do some much needed code cleanup.

BUG=chromium:363660
TEST=emerge platform2

Change-Id: Ica9abfd854e2c77d970851805989c86a6a45fdee
Reviewed-on: https://chromium-review.googlesource.com/196764
Commit-Queue: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/crash_reporter/crash_collector.cc b/crash_reporter/crash_collector.cc
index 0521a06..1a0898b 100644
--- a/crash_reporter/crash_collector.cc
+++ b/crash_reporter/crash_collector.cc
@@ -76,8 +76,7 @@
 using base::StringPrintf;
 
 CrashCollector::CrashCollector()
-    : forced_crash_directory_(NULL),
-      lsb_release_(kLsbRelease),
+    : lsb_release_(kLsbRelease),
       log_config_path_(kDefaultLogConfig) {
 }
 
@@ -262,8 +261,8 @@
   if (out_of_capacity != NULL) *out_of_capacity = false;
 
   // For testing.
-  if (forced_crash_directory_ != NULL) {
-    *crash_directory = FilePath(forced_crash_directory_);
+  if (!forced_crash_directory_.empty()) {
+    *crash_directory = forced_crash_directory_;
     return true;
   }
 
@@ -498,7 +497,7 @@
                                         const std::string &exec_name,
                                         const std::string &payload_path) {
   std::map<std::string, std::string> contents;
-  if (!ReadKeyValueFile(FilePath(std::string(lsb_release_)), '=', &contents)) {
+  if (!ReadKeyValueFile(FilePath(lsb_release_), '=', &contents)) {
     LOG(ERROR) << "Problem parsing " << lsb_release_;
     // Even though there was some failure, take as much as we could read.
   }