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

Unified Diff: trunk/src/chrome/test/data/extensions/activity_log/options.js

Issue 14378006: Revert 195265 "Improved extension activity logging for the chrom..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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 | « trunk/src/chrome/chrome_browser_extensions.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/chrome/test/data/extensions/activity_log/options.js
===================================================================
--- trunk/src/chrome/test/data/extensions/activity_log/options.js (revision 195309)
+++ trunk/src/chrome/test/data/extensions/activity_log/options.js (working copy)
@@ -156,38 +156,18 @@
// Install a webRequest handler that will add an HTTP header to the outgoing
// request for the main page.
function doModifyHeaders(details) {
- var response = {};
-
var headers = details.requestHeaders;
if (headers === undefined) {
headers = [];
}
headers.push({'name': 'X-Test-Activity-Log-Send',
'value': 'Present'});
- response['requestHeaders'] = headers;
-
- headers = details.responseHeaders;
- if (headers === undefined) {
- headers = [];
- }
- headers = headers.filter(
- function(x) {return x["name"] != "Cache-Control"});
- headers.push({'name': 'X-Test-Response-Header',
- 'value': 'Inserted'});
- headers.push({'name': 'Set-Cookie',
- 'value': 'ActivityLog=InsertedCookie'});
- response['responseHeaders'] = headers;
-
- return response;
+ return {'requestHeaders': headers};
}
chrome.webRequest.onBeforeSendHeaders.addListener(
doModifyHeaders,
{'urls': ['http://*/*'], 'types': ['main_frame']},
['blocking', 'requestHeaders']);
- chrome.webRequest.onHeadersReceived.addListener(
- doModifyHeaders,
- {'urls': ['http://*/*'], 'types': ['main_frame']},
- ['blocking', 'responseHeaders']);
// Open a tab, then close it when it has finished loading--this should give
// the webRequest handler a chance to run.
« no previous file with comments | « trunk/src/chrome/chrome_browser_extensions.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698