]> khamidou — GitHub mirrors - electron.git/commitdiff
Do not append "Renderer" in product name when uploading.
authorCheng Zhao <zcbenz@gmail.com>
Tue, 19 Nov 2013 04:19:23 +0000 (12:19 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 19 Nov 2013 04:19:59 +0000 (12:19 +0800)
common/crash_reporter/crash_reporter.cc
common/crash_reporter/crash_reporter.h
common/crash_reporter/crash_reporter_mac.mm
spec/api/crash-reporter.coffee

index c5765418bc445d94ea379c6dc7dc46b0a7e88417..39d66956bd8f6e6a5632c0a5a6840c64239f09e6 100644 (file)
@@ -19,7 +19,7 @@ CrashReporter::CrashReporter() {
 CrashReporter::~CrashReporter() {
 }
 
-void CrashReporter::Start(std::string product_name,
+void CrashReporter::Start(const std::string& product_name,
                           const std::string& company_name,
                           const std::string& submit_url,
                           bool auto_submit,
@@ -27,8 +27,6 @@ void CrashReporter::Start(std::string product_name,
                           const StringMap& extra_parameters) {
   SetUploadParameters(extra_parameters);
 
-  // Append "Renderer" for the renderer.
-  product_name += " Renderer";
   InitBreakpad(product_name, ATOM_VERSION_STRING, company_name, submit_url,
                auto_submit, skip_system_crash_handler);
 }
index 3e61bcceed601e64ee2d17f4c15cf2cf17f5d700..bc549b949a8a53b1735cfe2c992559cc026262b6 100644 (file)
@@ -18,7 +18,7 @@ class CrashReporter {
 
   static CrashReporter* GetInstance();
 
-  void Start(std::string product_name,
+  void Start(const std::string& product_name,
              const std::string& company_name,
              const std::string& submit_url,
              bool auto_submit,
index 8502b92ea9a7bc7106320cd0e9ecfdebc04be573..47b399d591b082822499a44b1b65d8fbcbbac00f 100644 (file)
@@ -28,11 +28,16 @@ void CrashReporterMac::InitBreakpad(const std::string& product_name,
   if (breakpad_ != NULL)
     BreakpadRelease(breakpad_);
 
+  std::string display_name = is_browser_ ? product_name :
+                                           product_name + " Renderer";
+
   NSMutableDictionary* parameters =
       [NSMutableDictionary dictionaryWithCapacity:4];
 
   [parameters setValue:base::SysUTF8ToNSString(product_name)
                 forKey:@BREAKPAD_PRODUCT];
+  [parameters setValue:base::SysUTF8ToNSString(product_name)
+                forKey:@BREAKPAD_PRODUCT_DISPLAY];
   [parameters setValue:base::SysUTF8ToNSString(version)
                 forKey:@BREAKPAD_VERSION];
   [parameters setValue:base::SysUTF8ToNSString(company_name)
index 86d0a0bb48195e808d0f045881a4ad52251df820..b612356dd2dd319903d75614b37e66a722469023 100644 (file)
@@ -13,7 +13,7 @@ describe 'crash-reporter module', ->
     server = http.createServer (req, res) ->
       form = new formidable.IncomingForm()
       form.parse req, (error, fields, files) ->
-        assert.equal fields['prod'], 'Atom-Shell Renderer'
+        assert.equal fields['prod'], 'Atom-Shell'
         assert.equal fields['ver'], process.versions['atom-shell']
         assert.equal fields['process_type'], 'renderer'
         assert.equal fields['platform'], process.platform