diff options
author | rob <rob@robwu.nl> | 2016-01-12 12:48:40 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-12 20:49:55 +0000 |
commit | 3eb7a397449be2eda5f8ad5ad4436ad8377563c6 (patch) | |
tree | 7cf31f34acbac26151e9f9b913bff7184a5be329 /extensions/extensions.gypi | |
parent | 9f255ecca2d40b0c2172052d873d9d7e7646441f (diff) | |
download | chromium_src-3eb7a397449be2eda5f8ad5ad4436ad8377563c6.zip chromium_src-3eb7a397449be2eda5f8ad5ad4436ad8377563c6.tar.gz chromium_src-3eb7a397449be2eda5f8ad5ad4436ad8377563c6.tar.bz2 |
WebRequest API cleanup
Cleanup changes:
- Moved the event dictionary generation logic to a new class
(WebRequestEventDetails), to deduplicate logic and make it easier to
manipulate the event details.
- Remove some unused aliases, forward-declarations and includes.
- Fixed a few typos.
- Moved ExtraInfoSpec to web_request_api_helpers.
- Remove ExtractRequestInfoDetails.
- Solved TODOs from https://codereview.chromium.org/1413853005/
- Avoid unnecessary copying of event details (request body and headers,
response headers). Previously these dictionaries were always copied
and removed later, which is wasteful.
Visible changes:
- When a request has no response headers, the status code defaults to
-1 (from URLRequestJob) instead of a dummy value of 200. This affects
the webRequest.onResponseStarted and webRequest.onCompleted events for
file: and ftp: requests. The new behavior is consistent with the
webRequest.onBeforeRedirect event (which also reports -1 for unknown
statuses).
- requestBody is only included if set in extraInfoSpec (bug 542719).
BUG=432875,542719
TEST=./browser_tests --gtest_filter=ExtensionWebRequestApiTest.*
./unit_tests --gtest_filter=ExtensionWebRequestTest.*
Review URL: https://codereview.chromium.org/1577673002
Cr-Commit-Position: refs/heads/master@{#368979}
Diffstat (limited to 'extensions/extensions.gypi')
-rw-r--r-- | extensions/extensions.gypi | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/extensions/extensions.gypi b/extensions/extensions.gypi index b49e007..1900afd 100644 --- a/extensions/extensions.gypi +++ b/extensions/extensions.gypi @@ -498,6 +498,8 @@ 'browser/api/web_request/web_request_api_constants.h', 'browser/api/web_request/web_request_api_helpers.cc', 'browser/api/web_request/web_request_api_helpers.h', + 'browser/api/web_request/web_request_event_details.cc', + 'browser/api/web_request/web_request_event_details.h', 'browser/api/web_request/web_request_event_router_delegate.cc', 'browser/api/web_request/web_request_event_router_delegate.h', 'browser/api/web_request/web_request_permissions.cc', |