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

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

Issue 2189353003: Sent feedback reports must respect the product ID if any was provided (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Devlin's comments Created 4 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
Index: chrome/browser/resources/feedback/js/feedback.js
diff --git a/chrome/browser/resources/feedback/js/feedback.js b/chrome/browser/resources/feedback/js/feedback.js
index 0b929ac2a4aecb4bf7777240a766b00f41f2af3d..c5a8433879843eacf2dc827113ef1ea8a7045928 100644
--- a/chrome/browser/resources/feedback/js/feedback.js
+++ b/chrome/browser/resources/feedback/js/feedback.js
@@ -204,6 +204,15 @@ function sendReport() {
if (!$('screenshot-checkbox').checked)
feedbackInfo.screenshot = null;
+ var productId = parseInt('' + feedbackInfo.productId);
+ if (isNaN(productId)) {
+ // For apps that still use a string value as the |productId|, we must clear
+ // that value since the API uses an integer value, and a conflict in data
+ // types will cause the report to fail to be sent.
+ productId = null;
+ }
+ feedbackInfo.productId = productId;
+
// Request sending the report, show the landing page (if allowed), and close
// this window right away. The FeedbackRequest object that represents this
// report will take care of sending the report in the background.

Powered by Google App Engine
This is Rietveld 408576698