Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2354)

Unified Diff: chrome/browser/resources/feedback.js

Issue 22695004: Attach performance tracing data to feedback reports (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/feedback.html ('k') | chrome/browser/ui/webui/feedback_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/feedback.js
diff --git a/chrome/browser/resources/feedback.js b/chrome/browser/resources/feedback.js
index c5e183eabeac2a159aea262adc05c57b5e66beda..34e96455d79b7326954c749dab93126b627a7f2d 100644
--- a/chrome/browser/resources/feedback.js
+++ b/chrome/browser/resources/feedback.js
@@ -18,6 +18,7 @@ savedThumbnailIds['saved-screenshots'] = '';
var categoryTag = '';
var filePath = '';
var forceDisableScreenshots = false;
+var traceId = 0;
// Globals to manage reading data from the attach a file option.
var attachFileBinaryData = '';
@@ -184,6 +185,10 @@ function sendReport() {
// Add chromeos data if it exists.
if ($('sys-info-checkbox')) {
reportArray = reportArray.concat([String($('sys-info-checkbox').checked)]);
+ if (!$('performance-info-checkbox').checked) {
+ traceId = 0;
+ }
+ reportArray = reportArray.concat([String(traceId)]);
}
if ($('attach-file-checkbox') &&
@@ -274,6 +279,24 @@ function changeToCurrent() {
currentSelected();
}
+<if expr="pp_ifdef('chromeos')">
+/**
+ * Update the page when performance feedback state is changed.
+ */
+function performanceFeedbackChanged() {
+ if ($('performance-info-checkbox').checked) {
+ $('attach-file-checkbox').disabled = true;
+ $('attach-file-checkbox').checked = false;
+
+ $('screenshot-checkbox').disabled = true;
+ $('screenshot-checkbox').checked = false;
+ } else {
+ $('attach-file-checkbox').disabled = false;
+ $('screenshot-checkbox').disabled = false;
+ }
+}
+</if>
+
///////////////////////////////////////////////////////////////////////////////
// Document Functions:
/**
@@ -293,6 +316,9 @@ function load() {
<if expr="pp_ifdef('chromeos')">
$('screenshot-link-tosaved').onclick = changeToSaved;
$('screenshot-link-tocurrent').onclick = changeToCurrent;
+
+ $('performance-info-checkbox').addEventListener(
+ 'change', performanceFeedbackChanged);
</if>
$('send-report-button').onclick = sendReport;
$('cancel-button').onclick = cancel;
@@ -304,6 +330,7 @@ function load() {
'categoryTag': '',
'customPageUrl': '',
'filePath': '',
+ 'traceId': 0,
};
var loc = window.location;
@@ -357,6 +384,13 @@ function load() {
}
}
+ traceId = parameters['traceId'];
+ if (traceId != 0 && ($('performance-info-area'))) {
+ $('performance-info-area').hidden = false;
+ $('performance-info-checkbox').checked = true;
+ performanceFeedbackChanged();
+ }
+
chrome.send('getDialogDefaults');
chrome.send('refreshCurrentScreenshot');
}
« no previous file with comments | « chrome/browser/resources/feedback.html ('k') | chrome/browser/ui/webui/feedback_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698