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

Unified Diff: extensions/browser/api/web_request/web_request_api_helpers.h

Issue 2708923005: Extensions: Add metrics for Web Request API actions. (Closed)
Patch Set: Rename enum WebRequestAction -> RequestAction in histograms.xml to be in line with the implementation. Created 3 years, 10 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
Index: extensions/browser/api/web_request/web_request_api_helpers.h
diff --git a/extensions/browser/api/web_request/web_request_api_helpers.h b/extensions/browser/api/web_request/web_request_api_helpers.h
index b1b9e6cbdb8a601bc2d303141d083f5e459370e4..d6da9813975969eb66c63557f4092c81e5f8d0a0 100644
--- a/extensions/browser/api/web_request/web_request_api_helpers.h
+++ b/extensions/browser/api/web_request/web_request_api_helpers.h
@@ -281,11 +281,14 @@ void MergeCookiesInOnBeforeSendHeadersResponses(
const net::NetLogWithSource* net_log);
// Modifies the headers in |request_headers| according to |deltas|. Conflicts
// are tried to be resolved.
+// Stores in |request_headers_modified| whether the request headers were
+// modified.
void MergeOnBeforeSendHeadersResponses(
const EventResponseDeltas& deltas,
net::HttpRequestHeaders* request_headers,
extensions::WarningSet* conflicting_extensions,
- const net::NetLogWithSource* net_log);
+ const net::NetLogWithSource* net_log,
+ bool* request_headers_modified);
// Modifies the "Set-Cookie" headers in |override_response_headers| according to
// |deltas.response_cookie_modifications|. If |override_response_headers| is
// NULL, a copy of |original_response_headers| is created. Conflicts are
@@ -302,6 +305,8 @@ void MergeCookiesInOnHeadersReceivedResponses(
// Extension-initiated redirects are written to |override_response_headers|
// (to request redirection) and |*allowed_unsafe_redirect_url| (to make sure
// that the request is not cancelled with net::ERR_UNSAFE_REDIRECT).
+// Stores in |response_headers_modified| whether the response headers were
+// modified.
void MergeOnHeadersReceivedResponses(
const GURL& url,
const EventResponseDeltas& deltas,
@@ -309,7 +314,8 @@ void MergeOnHeadersReceivedResponses(
scoped_refptr<net::HttpResponseHeaders>* override_response_headers,
GURL* allowed_unsafe_redirect_url,
extensions::WarningSet* conflicting_extensions,
- const net::NetLogWithSource* net_log);
+ const net::NetLogWithSource* net_log,
+ bool* response_headers_modified);
// Merge the responses of blocked onAuthRequired handlers. The first
// registered listener that supplies authentication credentials in a response,
// if any, will have its authentication credentials used. |request| must be
« no previous file with comments | « extensions/browser/api/web_request/web_request_api.cc ('k') | extensions/browser/api/web_request/web_request_api_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698