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

Unified Diff: chrome/browser/extensions/api/web_request/web_request_api.cc

Issue 10702079: Use the first_party_for_cookies URL to filter which requests the WebRequest API sees (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src
Patch Set: Created 8 years, 6 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 | « no previous file | chrome/browser/extensions/api/web_request/web_request_api_helpers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/web_request/web_request_api.cc
diff --git a/chrome/browser/extensions/api/web_request/web_request_api.cc b/chrome/browser/extensions/api/web_request/web_request_api.cc
index 6d6caf644fe12209f63bd671ad1e7e788d0653c0..6a38e94219f863224614df2cbd3a5fa8cf46bc56 100644
--- a/chrome/browser/extensions/api/web_request/web_request_api.cc
+++ b/chrome/browser/extensions/api/web_request/web_request_api.cc
@@ -474,7 +474,7 @@ int ExtensionWebRequestEventRouter::OnBeforeRequest(
const net::CompletionCallback& callback,
GURL* new_url) {
// We hide events from the system context as well as sensitive requests.
- if (!profile || helpers::HideRequestForURL(request->url()))
+ if (!profile || helpers::HideRequest(request))
return net::OK;
if (IsPageLoad(request))
@@ -532,7 +532,7 @@ int ExtensionWebRequestEventRouter::OnBeforeSendHeaders(
const net::CompletionCallback& callback,
net::HttpRequestHeaders* headers) {
// We hide events from the system context as well as sensitive requests.
- if (!profile || helpers::HideRequestForURL(request->url()))
+ if (!profile || helpers::HideRequest(request))
return net::OK;
bool initialize_blocked_requests = false;
@@ -583,7 +583,7 @@ void ExtensionWebRequestEventRouter::OnSendHeaders(
net::URLRequest* request,
const net::HttpRequestHeaders& headers) {
// We hide events from the system context as well as sensitive requests.
- if (!profile || helpers::HideRequestForURL(request->url()))
+ if (!profile || helpers::HideRequest(request))
return;
if (GetAndSetSignaled(request->identifier(), kOnSendHeaders))
@@ -616,7 +616,7 @@ int ExtensionWebRequestEventRouter::OnHeadersReceived(
net::HttpResponseHeaders* original_response_headers,
scoped_refptr<net::HttpResponseHeaders>* override_response_headers) {
// We hide events from the system context as well as sensitive requests.
- if (!profile || helpers::HideRequestForURL(request->url()))
+ if (!profile || helpers::HideRequest(request))
return net::OK;
bool initialize_blocked_requests = false;
@@ -680,7 +680,7 @@ ExtensionWebRequestEventRouter::OnAuthRequired(
net::AuthCredentials* credentials) {
// No profile means that this is for authentication challenges in the
// system context. Skip in that case. Also skip sensitive requests.
- if (!profile || helpers::HideRequestForURL(request->url()))
+ if (!profile || helpers::HideRequest(request))
return net::NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION;
int extra_info_spec = 0;
@@ -725,7 +725,7 @@ void ExtensionWebRequestEventRouter::OnBeforeRedirect(
net::URLRequest* request,
const GURL& new_location) {
// We hide events from the system context as well as sensitive requests.
- if (!profile || helpers::HideRequestForURL(request->url()))
+ if (!profile || helpers::HideRequest(request))
return;
if (GetAndSetSignaled(request->identifier(), kOnBeforeRedirect))
@@ -770,7 +770,7 @@ void ExtensionWebRequestEventRouter::OnResponseStarted(
ExtensionInfoMap* extension_info_map,
net::URLRequest* request) {
// We hide events from the system context as well as sensitive requests.
- if (!profile || helpers::HideRequestForURL(request->url()))
+ if (!profile || helpers::HideRequest(request))
return;
// OnResponseStarted is even triggered, when the request was cancelled.
@@ -813,7 +813,7 @@ void ExtensionWebRequestEventRouter::OnCompleted(
ExtensionInfoMap* extension_info_map,
net::URLRequest* request) {
// We hide events from the system context as well as sensitive requests.
- if (!profile || helpers::HideRequestForURL(request->url()))
+ if (!profile || helpers::HideRequest(request))
return;
request_time_tracker_->LogRequestEndTime(request->identifier(),
@@ -862,7 +862,7 @@ void ExtensionWebRequestEventRouter::OnErrorOccurred(
net::URLRequest* request,
bool started) {
// We hide events from the system context as well as sensitive requests.
- if (!profile || helpers::HideRequestForURL(request->url()))
+ if (!profile || helpers::HideRequest(request))
return;
request_time_tracker_->LogRequestEndTime(request->identifier(),
« no previous file with comments | « no previous file | chrome/browser/extensions/api/web_request/web_request_api_helpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698