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

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

Issue 17894010: Receiving and sending dismissal parameters (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 5 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/google_now/background.js ('k') | no next file » | 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 9405bdecc43f296fcdc592abd2df3aeb557e149f..eb8f5cc0b741c3924fd80dac07c648a57c8f279e 100644
--- a/chrome/browser/resources/google_now/utility.js
+++ b/chrome/browser/resources/google_now/utility.js
@@ -32,14 +32,15 @@ function verify(condition, message) {
/**
* Builds a request to the notification server.
* @param {string} handlerName Server handler to send the request to.
+ * @param {string} contentType Value for the Content-type header.
* @return {XMLHttpRequest} Server request.
*/
-function buildServerRequest(handlerName) {
+function buildServerRequest(handlerName, contentType) {
var request = new XMLHttpRequest();
request.responseType = 'text';
request.open('POST', NOTIFICATION_CARDS_URL + '/' + handlerName, true);
- request.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
+ request.setRequestHeader('Content-type', contentType);
return request;
}
@@ -177,7 +178,8 @@ function buildTaskManager(areConflicting) {
'&script=' + encodeURIComponent(file) +
'&line=' + encodeURIComponent(line) +
'&trace=' + encodeURIComponent(filteredStack);
- var request = buildServerRequest('jserror');
+ var request = buildServerRequest('jserror',
+ 'application/x-www-form-urlencoded');
request.onloadend = function(event) {
console.log('sendErrorReport status: ' + request.status);
};
« no previous file with comments | « chrome/browser/resources/google_now/background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698