diff options
author | stuartmorgan <stuartmorgan@chromium.org> | 2016-02-02 09:10:45 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-02 17:12:07 +0000 |
commit | cbf24e69bd47446397a0283b20c81671469f33ce (patch) | |
tree | cc82e0b150b118a9bfcb28e664f3af5f15ea84fc | |
parent | bde29d307177ffb470edce2aefa69185ff00ea45 (diff) | |
download | chromium_src-cbf24e69bd47446397a0283b20c81671469f33ce.zip chromium_src-cbf24e69bd47446397a0283b20c81671469f33ce.tar.gz chromium_src-cbf24e69bd47446397a0283b20c81671469f33ce.tar.bz2 |
Update the chrome://crashes bug template
Clarifies the message about not filing bugs without extra information,
and moves it to the top, in addition to tweaking the wording on
chrome://crashes, in the hopes of reducing the number of useless
reports filed through this system.
Also automatically populates the OS line, rather than requiring the
user to do it.
BUG=481452, 457090
Review URL: https://codereview.chromium.org/1217443006
Cr-Commit-Position: refs/heads/master@{#372965}
-rw-r--r-- | chrome/browser/ui/webui/crashes_ui.cc | 13 | ||||
-rw-r--r-- | components/crash/core/browser/resources/crashes.js | 21 | ||||
-rw-r--r-- | components/crash_strings.grdp | 4 | ||||
-rw-r--r-- | ios/chrome/browser/ui/webui/crashes_ui.cc | 14 |
4 files changed, 35 insertions, 17 deletions
diff --git a/chrome/browser/ui/webui/crashes_ui.cc b/chrome/browser/ui/webui/crashes_ui.cc index 6cc6c99..4bdaa9b 100644 --- a/chrome/browser/ui/webui/crashes_ui.cc +++ b/chrome/browser/ui/webui/crashes_ui.cc @@ -11,6 +11,7 @@ #include "base/macros.h" #include "base/memory/ref_counted_memory.h" #include "base/strings/utf_string_conversions.h" +#include "base/sys_info.h" #include "base/values.h" #include "build/build_config.h" #include "chrome/browser/crash_upload_list.h" @@ -168,8 +169,16 @@ void CrashesDOMHandler::UpdateUI() { base::FundamentalValue enabled(crash_reporting_enabled); base::FundamentalValue dynamic_backend(system_crash_reporter); base::StringValue version(version_info::GetVersionNumber()); - web_ui()->CallJavascriptFunction(crash::kCrashesUIUpdateCrashList, enabled, - dynamic_backend, crash_list, version); + base::StringValue os_string(base::SysInfo::OperatingSystemName() + " " + + base::SysInfo::OperatingSystemVersion()); + + std::vector<const base::Value*> args; + args.push_back(&enabled); + args.push_back(&dynamic_backend); + args.push_back(&crash_list); + args.push_back(&version); + args.push_back(&os_string); + web_ui()->CallJavascriptFunction(crash::kCrashesUIUpdateCrashList, args); } } // namespace diff --git a/components/crash/core/browser/resources/crashes.js b/components/crash/core/browser/resources/crashes.js index 1a1a5c5..5f31a11 100644 --- a/components/crash/core/browser/resources/crashes.js +++ b/components/crash/core/browser/resources/crashes.js @@ -18,8 +18,9 @@ function requestCrashes() { * @param {boolean} dynamicBackend Whether the crash backend is dynamic. * @param {array} crashes The list of crashes. * @param {string} version The browser version. + * @param {string} os The OS name and version. */ -function updateCrashList(enabled, dynamicBackend, crashes, version) { +function updateCrashList(enabled, dynamicBackend, crashes, version, os) { $('countBanner').textContent = loadTimeData.getStringF('crashCountFormat', crashes.length); @@ -55,24 +56,24 @@ function updateCrashList(enabled, dynamicBackend, crashes, version) { var linkBlock = document.createElement('p'); var link = document.createElement('a'); var commentLines = [ + 'IMPORTANT: Your crash has already been automatically reported ' + + 'to our crash system. Please file this bug only if you can provide ' + + 'more information about it.', + '', + '', 'Chrome Version: ' + version, - // TODO(tbreisacher): fill in the OS automatically? - 'Operating System: e.g., "Windows 7", "Mac OSX 10.6"', + 'Operating System: ' + os, '', 'URL (if applicable) where crash occurred:', '', 'Can you reproduce this crash?', '', - 'What steps will reproduce this crash? (or if it\'s not ' + - 'reproducible, what were you doing just before the crash)?', - '', + 'What steps will reproduce this crash? (If it\'s not ' + + 'reproducible, what were you doing just before the crash?)', '1.', '2.', '3.', '', - '*Please note that issues filed with no information filled in ' + - 'above will be marked as WontFix*', - '', '****DO NOT CHANGE BELOW THIS LINE****', - 'report_id:' + crash.id + 'Crash ID: crash/' + crash.id ]; var params = { template: 'Crash Report', diff --git a/components/crash_strings.grdp b/components/crash_strings.grdp index a5ba816..dc42a24 100644 --- a/components/crash_strings.grdp +++ b/components/crash_strings.grdp @@ -11,10 +11,10 @@ Crash ID <ph name="CRASH_ID">$1<ex>8fa95dbb6f2ec862</ex></ph> (<ph name="CRASH_LOCAL_ID">$2<ex>Chrome</ex></ph>) </message> <message name="IDS_CRASH_CRASH_TIME_FORMAT" desc="Format for crash entry occurence time on chrome://crashes"> - Occurred <ph name="CRASH_TIME">$1<ex>Tuesday, January 25, 2011 2:58:02 PM</ex></ph> + Automatically reported <ph name="CRASH_TIME">$1<ex>Tuesday, January 25, 2011 2:58:02 PM</ex></ph> </message> <message name="IDS_CRASH_BUG_LINK_LABEL" desc="Link text for filing a crash bug on chrome://crashes"> - File bug + Provide additional details </message> <message name="IDS_CRASH_NO_CRASHES_MESSAGE" desc="The explanatory message for chrome://crashes when there are no crashes"> You have no recently reported crashes. Crashes that occurred when crash reporting was disabled will not appear here. diff --git a/ios/chrome/browser/ui/webui/crashes_ui.cc b/ios/chrome/browser/ui/webui/crashes_ui.cc index 3576543..40a73ee 100644 --- a/ios/chrome/browser/ui/webui/crashes_ui.cc +++ b/ios/chrome/browser/ui/webui/crashes_ui.cc @@ -11,6 +11,7 @@ #include "base/macros.h" #include "base/memory/ref_counted_memory.h" #include "base/strings/utf_string_conversions.h" +#include "base/sys_info.h" #include "base/values.h" #include "components/crash/core/browser/crashes_ui_util.h" #include "components/version_info/version_info.h" @@ -126,9 +127,16 @@ void CrashesDOMHandler::UpdateUI() { base::FundamentalValue enabled(crash_reporting_enabled); base::FundamentalValue dynamic_backend(false); base::StringValue version(version_info::GetVersionNumber()); - - web_ui()->CallJavascriptFunction(crash::kCrashesUIUpdateCrashList, enabled, - dynamic_backend, crash_list, version); + base::StringValue os_string(base::SysInfo::OperatingSystemName() + " " + + base::SysInfo::OperatingSystemVersion()); + + std::vector<const base::Value*> args; + args.push_back(&enabled); + args.push_back(&dynamic_backend); + args.push_back(&crash_list); + args.push_back(&version); + args.push_back(&os_string); + web_ui()->CallJavascriptFunction(crash::kCrashesUIUpdateCrashList, args); } } // namespace |