summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/api/extension_api.json
diff options
context:
space:
mode:
authorbattre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-14 19:26:10 +0000
committerbattre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-14 19:26:10 +0000
commit5796dc94436c7d92b0b913aeb091ff6ea98ee575 (patch)
tree139f193789e8b2f412eaa4574b0af916fb7e896d /chrome/common/extensions/api/extension_api.json
parentf667e2ee48c8347341b5dc18a409ee7f564cb266 (diff)
downloadchromium_src-5796dc94436c7d92b0b913aeb091ff6ea98ee575.zip
chromium_src-5796dc94436c7d92b0b913aeb091ff6ea98ee575.tar.gz
chromium_src-5796dc94436c7d92b0b913aeb091ff6ea98ee575.tar.bz2
Replace onRequestSent with onSendHeaders in webrequest API
This CL replaces the onRequestSent signal of the webrequest API with a new onSendHeader signal. The sequence is now: onBeforeRequest -> onBeforeSendHeaders -> onSendHeaders. This change allows us to completely remove the webrequest API from the network transaction layer and stay in the URL request layer. That solve the problem that the network layer may convert one URLRequest to multiple HTTP requests which should be transparent to the webrequest API. It also solves the problem that requests answered from the cache did not trigger an onRequestSent event. Given the choice of removing onRequestSent completely and replacing it with onSendHeaders, I chose the latter so that extensions can see the headers sent to the network after other extensions had a chance to modify them. BUG=no TEST=no Review URL: http://codereview.chromium.org/7353021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92584 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/api/extension_api.json')
-rw-r--r--chrome/common/extensions/api/extension_api.json9
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json
index bb3b5c5..38a7782 100644
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -4135,9 +4135,9 @@
}
},
{
- "name": "onRequestSent",
+ "name": "onSendHeaders",
"type": "function",
- "description": "Fires when a request is sent to the server.",
+ "description": "Fires just before a request is going to be sent to the server (modifications of prvious onBeforeSendHeaders callbacks are visible by the time onSendHeaders is fired).",
"parameters": [
{
"type": "object",
@@ -4145,7 +4145,6 @@
"properties": {
"requestId": {"type": "string", "description": "The ID of the request."},
"url": {"type": "string"},
- "ip": {"type": "string", "description": "The server IP address that is actually connected to. Note that it may be a literal IPv6 address."},
"timeStamp": {"type": "number", "description": "The time when the browser finished sending the request, in milliseconds since the epoch."},
"requestHeaders": {"$ref": "HttpHeaders", "optional": true, "description": "The HTTP request headers that have been sent out with this request."}
}
@@ -4181,6 +4180,7 @@
"properties": {
"requestId": {"type": "string", "description": "The ID of the request."},
"url": {"type": "string"},
+ "ip": {"type": "string", "optional": true, "description": "The server IP address that the request was actually sent to. Note that it may be a literal IPv6 address."},
"statusCode": {"type": "integer", "description": "Standard HTTP status code returned by the server."},
"timeStamp": {"type": "number", "description": "The time when the status line and response headers were received, in milliseconds since the epoch."},
"responseHeaders": {"$ref": "HttpHeaders", "optional": true, "description": "The HTTP response headers that were received along with this response."},
@@ -4218,6 +4218,7 @@
"properties": {
"requestId": {"type": "string", "description": "The ID of the request."},
"url": {"type": "string", "description": "The URL of the current request."},
+ "ip": {"type": "string", "optional": true, "description": "The server IP address that the request was actually sent to. Note that it may be a literal IPv6 address."},
"statusCode": {"type": "integer", "description": "Standard HTTP status code returned by the server."},
"redirectUrl": {"type": "string", "description": "The new URL."},
"timeStamp": {"type": "number", "description": "The time when the browser was about to make the redirect, in milliseconds since the epoch."},
@@ -4256,6 +4257,7 @@
"properties": {
"requestId": {"type": "string", "description": "The ID of the request."},
"url": {"type": "string", "description": "The URL of the current request."},
+ "ip": {"type": "string", "optional": true, "description": "The server IP address that the request was actually sent to. Note that it may be a literal IPv6 address."},
"statusCode": {"type": "integer", "description": "Standard HTTP status code returned by the server."},
"timeStamp": {"type": "number", "description": "The time when the response was received completely, in milliseconds since the epoch."},
"responseHeaders": {"$ref": "HttpHeaders", "optional": true, "description": "The HTTP response headers that were received along with this response."},
@@ -4293,6 +4295,7 @@
"properties": {
"requestId": {"type": "string", "description": "The ID of the request."},
"url": {"type": "string", "description": "The URL of the current request."},
+ "ip": {"type": "string", "optional": true, "description": "The server IP address that the request was actually sent to. Note that it may be a literal IPv6 address."},
"error": {"type": "string", "description": "The error description. This string is <em>not</em> guaranteed to remain backwards compatible between releases. You must not parse and act based upon its content."},
"timeStamp": {"type": "number", "description": "The time when the error occurred, in milliseconds since the epoch."}
}