Chromium Code Reviews| 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 418b6f3098d3e81e8fbfbdd80a4b7a8e218d6507..a72dd1a582a7900cb973714427e0fdc8313d23b0 100644 |
| --- a/chrome/browser/resources/google_now/utility.js |
| +++ b/chrome/browser/resources/google_now/utility.js |
| @@ -141,7 +141,13 @@ function sendErrorReport(error) { |
| request.onloadend = function(event) { |
| console.log('sendErrorReport status: ' + request.status); |
| }; |
| - request.send(JSON.stringify(errorObject)); |
| + |
| + chrome.identity.getAuthToken({interactive: false}, function(token) { |
| + if (token) { |
| + request.setRequestHeader('Authorization', 'Bearer ' + token); |
|
robliao
2013/10/23 22:24:15
setAuthorization reusuable here?
vadimt
2013/10/23 22:32:23
Nope, since it does stuff that we don't need here
|
| + request.send(JSON.stringify(errorObject)); |
| + } |
| + }); |
| } |
| // Limiting 1 error report per background page load. |