Add "Renderer" suffix in name when crashing in renderer process.
authorCheng Zhao <zcbenz@gmail.com>
Wed, 13 Nov 2013 11:06:11 +0000 (19:06 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 13 Nov 2013 11:06:11 +0000 (19:06 +0800)
common/crash_reporter/crash_reporter_mac.mm

index 5c27936..7ae2386 100644 (file)
@@ -20,15 +20,16 @@ class ScopedCrashReporter {
   ScopedCrashReporter() : is_browser_(!base::mac::IsBackgroundOnlyProcess()) {
     NSMutableDictionary* parameters =
         [NSMutableDictionary dictionaryWithCapacity:4];
-    [parameters setValue:@"Atom-Shell" forKey:@BREAKPAD_PRODUCT];
     [parameters setValue:@"GitHub, Inc" forKey:@BREAKPAD_VENDOR];
 
-    // Use application's version for crashes in browser.
     if (is_browser_) {
+      [parameters setValue:@"Atom-Shell" forKey:@BREAKPAD_PRODUCT];
+      // Use application's version for crashes in browser.
       std::string version = atom::Browser::Get()->GetVersion();
       [parameters setValue:base::SysUTF8ToNSString(version)
                     forKey:@BREAKPAD_VERSION];
     } else {
+      [parameters setValue:@"Atom-Shell Renderer" forKey:@BREAKPAD_PRODUCT];
       [parameters setValue:@ATOM_VERSION_STRING forKey:@BREAKPAD_VERSION];
     }
 
@@ -49,6 +50,8 @@ class ScopedCrashReporter {
 
   ~ScopedCrashReporter() { if (breakpad_) BreakpadRelease(breakpad_); }
 
+  bool is_browser() const { return is_browser_; }
+
   void SetKey(const std::string& key, const std::string& value) {
     BreakpadSetKeyValue(breakpad_,
                         base::SysUTF8ToNSString(key),