crash_reporter: clarify chrome crash ignore message

We ignore Chrome crashes when it is the kernel that runs us.  When Chrome
itself runs us, we will take their crashes.  The log output here though
has long confused developers, so rephrase it slightly.

BUG=None
TEST=`cros_run_unit_tests -p crash-reporter --board x86-alex` passes
TEST=`cbuildbot {amd64,x86}-generic-full` passes (VMTests)

Change-Id: Ia13a766134f5a20a1cc4eaab74ac46633d3177eb
Reviewed-on: https://chromium-review.googlesource.com/172261
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/crash_reporter/user_collector.cc b/crash_reporter/user_collector.cc
index eefe5df..014394a 100644
--- a/crash_reporter/user_collector.cc
+++ b/crash_reporter/user_collector.cc
@@ -584,7 +584,8 @@
   // crashes towards user crashes, so user crashes really mean non-Chrome
   // user-space crashes.
   if (!handle_chrome_crashes && IsChromeExecName(exec)) {
-    *reason = "ignoring - chrome crash";
+    *reason = "ignoring call by kernel - chrome crash; "
+              "waiting for chrome to call us directly";
     return false;
   }
 
diff --git a/crash_reporter/user_collector_test.cc b/crash_reporter/user_collector_test.cc
index d1a3bcf..71fc015 100644
--- a/crash_reporter/user_collector_test.cc
+++ b/crash_reporter/user_collector_test.cc
@@ -20,6 +20,11 @@
 
 static const char kFilePath[] = "/my/path";
 
+// Keep in sync with UserCollector::ShouldDump.
+static const char kChromeIgnoreMsg[] =
+  "ignoring call by kernel - chrome crash; "
+  "waiting for chrome to call us directly";
+
 using base::FilePath;
 using chromeos::FindLog;
 
@@ -159,25 +164,25 @@
   // When running a crash test, behave as normal.
   EXPECT_FALSE(collector_.ShouldDump(false, false, false,
                                      "chrome", &reason));
-  EXPECT_EQ("ignoring - chrome crash", reason);
+  EXPECT_EQ(kChromeIgnoreMsg, reason);
   EXPECT_FALSE(collector_.ShouldDump(false, false, false,
                                      "supplied_Compositor", &reason));
-  EXPECT_EQ("ignoring - chrome crash", reason);
+  EXPECT_EQ(kChromeIgnoreMsg, reason);
   EXPECT_FALSE(collector_.ShouldDump(false, false, false,
                                      "supplied_PipelineThread", &reason));
-  EXPECT_EQ("ignoring - chrome crash", reason);
+  EXPECT_EQ(kChromeIgnoreMsg, reason);
   EXPECT_FALSE(collector_.ShouldDump(false, false, false,
                                      "Chrome_ChildIOThread", &reason));
-  EXPECT_EQ("ignoring - chrome crash", reason);
+  EXPECT_EQ(kChromeIgnoreMsg, reason);
   EXPECT_FALSE(collector_.ShouldDump(false, false, false,
                                      "supplied_Chrome_ChildIOT", &reason));
-  EXPECT_EQ("ignoring - chrome crash", reason);
+  EXPECT_EQ(kChromeIgnoreMsg, reason);
   EXPECT_FALSE(collector_.ShouldDump(false, false, false,
                                      "supplied_ChromotingClien", &reason));
-  EXPECT_EQ("ignoring - chrome crash", reason);
+  EXPECT_EQ(kChromeIgnoreMsg, reason);
   EXPECT_FALSE(collector_.ShouldDump(false, false, false,
                                      "supplied_LocalInputMonit", &reason));
-  EXPECT_EQ("ignoring - chrome crash", reason);
+  EXPECT_EQ(kChromeIgnoreMsg, reason);
 
   // When running a developer image, test that chrome crashes are handled
   // when the "handle_chrome_crashes" flag is set.
@@ -243,7 +248,7 @@
   collector_.HandleCrash("5:2:ignored", "chrome");
   EXPECT_TRUE(FindLog(
       "Received crash notification for chrome[5] sig 2"));
-  EXPECT_TRUE(FindLog("(ignoring - chrome crash)"));
+  EXPECT_TRUE(FindLog(kChromeIgnoreMsg));
   ASSERT_EQ(s_crashes, 0);
 }
 
@@ -252,7 +257,7 @@
   collector_.HandleCrash("0:2:chrome", NULL);
   EXPECT_TRUE(FindLog(
       "Received crash notification for supplied_chrome[0] sig 2"));
-  EXPECT_TRUE(FindLog("(ignoring - chrome crash)"));
+  EXPECT_TRUE(FindLog(kChromeIgnoreMsg));
   ASSERT_EQ(s_crashes, 0);
 }