From 20e368eb89aec03de7c5daa95f5b7f197807887c Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 19 Nov 2013 12:19:23 +0800 Subject: [PATCH] Do not append "Renderer" in product name when uploading. --- common/crash_reporter/crash_reporter.cc | 4 +--- common/crash_reporter/crash_reporter.h | 2 +- common/crash_reporter/crash_reporter_mac.mm | 5 +++++ spec/api/crash-reporter.coffee | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/common/crash_reporter/crash_reporter.cc b/common/crash_reporter/crash_reporter.cc index c5765418..39d66956 100644 --- a/common/crash_reporter/crash_reporter.cc +++ b/common/crash_reporter/crash_reporter.cc @@ -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); } diff --git a/common/crash_reporter/crash_reporter.h b/common/crash_reporter/crash_reporter.h index 3e61bcce..bc549b94 100644 --- a/common/crash_reporter/crash_reporter.h +++ b/common/crash_reporter/crash_reporter.h @@ -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, diff --git a/common/crash_reporter/crash_reporter_mac.mm b/common/crash_reporter/crash_reporter_mac.mm index 8502b92e..47b399d5 100644 --- a/common/crash_reporter/crash_reporter_mac.mm +++ b/common/crash_reporter/crash_reporter_mac.mm @@ -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) diff --git a/spec/api/crash-reporter.coffee b/spec/api/crash-reporter.coffee index 86d0a0bb..b612356d 100644 --- a/spec/api/crash-reporter.coffee +++ b/spec/api/crash-reporter.coffee @@ -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 -- 2.43.0