Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** @type {string} | 5 /** @type {string} |
| 6 * @const | 6 * @const |
| 7 */ | 7 */ |
| 8 var FEEDBACK_LANDING_PAGE = | 8 var FEEDBACK_LANDING_PAGE = |
| 9 'https://support.google.com/chrome/go/feedback_confirmation'; | 9 'https://support.google.com/chrome/go/feedback_confirmation'; |
| 10 | 10 |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 197 feedbackInfo.traceId = null; | 197 feedbackInfo.traceId = null; |
| 198 } | 198 } |
| 199 </if> | 199 </if> |
| 200 | 200 |
| 201 feedbackInfo.sendHistograms = useHistograms; | 201 feedbackInfo.sendHistograms = useHistograms; |
| 202 | 202 |
| 203 // If the user doesn't want to send the screenshot. | 203 // If the user doesn't want to send the screenshot. |
| 204 if (!$('screenshot-checkbox').checked) | 204 if (!$('screenshot-checkbox').checked) |
| 205 feedbackInfo.screenshot = null; | 205 feedbackInfo.screenshot = null; |
| 206 | 206 |
| 207 var productId = parseInt('' + feedbackInfo.productId); | |
| 208 if (isNaN(productId)) { | |
| 209 // For apps that still use a string value as the |productId|, we must clear | |
|
Devlin
2016/08/03 18:04:36
Which apps are these? Do they all go through this
afakhry
2016/08/03 20:16:10
For the whitelisted apps, I sent an alert email to
Devlin
2016/08/03 22:11:50
Awesome, thanks!
| |
| 210 // that value since the API uses an integer value, and a conflict in data | |
| 211 // types will cause the report to fail to be sent. | |
| 212 productId = null; | |
| 213 } | |
| 214 feedbackInfo.productId = productId; | |
| 215 | |
| 207 // Request sending the report, show the landing page (if allowed), and close | 216 // Request sending the report, show the landing page (if allowed), and close |
| 208 // this window right away. The FeedbackRequest object that represents this | 217 // this window right away. The FeedbackRequest object that represents this |
| 209 // report will take care of sending the report in the background. | 218 // report will take care of sending the report in the background. |
| 210 sendFeedbackReport(useSystemInfo); | 219 sendFeedbackReport(useSystemInfo); |
| 211 if (feedbackInfo.flow != FeedbackFlow.LOGIN) | 220 if (feedbackInfo.flow != FeedbackFlow.LOGIN) |
| 212 window.open(FEEDBACK_LANDING_PAGE, '_blank'); | 221 window.open(FEEDBACK_LANDING_PAGE, '_blank'); |
| 213 window.close(); | 222 window.close(); |
| 214 return true; | 223 return true; |
| 215 } | 224 } |
| 216 | 225 |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 447 $('cancel-button').onclick = cancel; | 456 $('cancel-button').onclick = cancel; |
| 448 $('remove-attached-file').onclick = clearAttachedFile; | 457 $('remove-attached-file').onclick = clearAttachedFile; |
| 449 <if expr="chromeos"> | 458 <if expr="chromeos"> |
| 450 $('performance-info-checkbox').addEventListener( | 459 $('performance-info-checkbox').addEventListener( |
| 451 'change', performanceFeedbackChanged); | 460 'change', performanceFeedbackChanged); |
| 452 </if> | 461 </if> |
| 453 }); | 462 }); |
| 454 } | 463 } |
| 455 | 464 |
| 456 initialize(); | 465 initialize(); |
| OLD | NEW |