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

Unified Diff: chrome/browser/resources/google_now/utility.js

Issue 24109007: Switching to a new format for sending errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: AUTO Created 7 years, 3 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 | « no previous file | chrome/browser/resources/google_now/utility_unittest.gtestjs » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/google_now/utility.js
diff --git a/chrome/browser/resources/google_now/utility.js b/chrome/browser/resources/google_now/utility.js
index a6fed9478738f8b896bb97c941111d3c3b58f00b..c66b9fff0fec812a4f7746999a01a58b487c1baa 100644
--- a/chrome/browser/resources/google_now/utility.js
+++ b/chrome/browser/resources/google_now/utility.js
@@ -118,17 +118,18 @@ function sendErrorReport(error) {
if (error.canSendMessageToServer)
errorText = errorText + ': ' + error.message;
- var requestParameters =
- 'error=' + encodeURIComponent(errorText) +
- '&script=' + encodeURIComponent(file) +
- '&line=' + encodeURIComponent(line) +
- '&trace=' + encodeURIComponent(filteredStack);
- var request = buildServerRequest('jserror',
- 'application/x-www-form-urlencoded');
+ var errorObject = {
+ message: errorText,
+ file: file,
+ line: line,
+ trace: filteredStack
+ };
+
+ var request = buildServerRequest('jserrors', 'application/json');
request.onloadend = function(event) {
console.log('sendErrorReport status: ' + request.status);
};
- request.send(requestParameters);
+ request.send(JSON.stringify(errorObject));
}
// Limiting 1 error report per background page load.
« no previous file with comments | « no previous file | chrome/browser/resources/google_now/utility_unittest.gtestjs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698