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

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

Issue 10693073: Revert 145136 - Merge 144529 - Use the first_party_for_cookies URL to filter which requests the Web… (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
Index: chrome/browser/extensions/api/web_request/web_request_api_helpers.cc
===================================================================
--- chrome/browser/extensions/api/web_request/web_request_api_helpers.cc (revision 145167)
+++ chrome/browser/extensions/api/web_request/web_request_api_helpers.cc (working copy)
@@ -10,7 +10,6 @@
#include "chrome/browser/extensions/api/web_request/web_request_api.h"
#include "chrome/common/url_constants.h"
#include "net/http/http_util.h"
-#include "net/url_request/url_request.h"
namespace extension_web_request_api_helpers {
@@ -594,8 +593,6 @@
// modified/canceled by extensions, e.g. because it is targeted to the webstore
// to check for updates, extension blacklisting, etc.
bool IsSensitiveURL(const GURL& url) {
- // TODO(battre) Merge this, CanExtensionAccessURL of web_request_api.cc and
- // Extension::CanExecuteScriptOnPage into one function.
bool is_webstore_gallery_url =
StartsWithASCII(url.spec(), extension_urls::kGalleryBrowsePrefix, true);
bool sensitive_chrome_url = false;
@@ -634,17 +631,8 @@
} // namespace
-bool HideRequest(net::URLRequest* request) {
- const GURL& url = request->url();
- const GURL& first_party_url = request->first_party_for_cookies();
- bool hide = false;
- if (first_party_url.is_valid()) {
- hide = IsSensitiveURL(first_party_url) ||
- !HasWebRequestScheme(first_party_url);
- }
- if (!hide)
- hide = IsSensitiveURL(url) || !HasWebRequestScheme(url);
- return hide;
+bool HideRequestForURL(const GURL& url) {
+ return IsSensitiveURL(url) || !HasWebRequestScheme(url);
}
#define ARRAYEND(array) (array + arraysize(array))

Powered by Google App Engine
This is Rietveld 408576698