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

Unified Diff: chrome/browser/errorpage_browsertest.cc

Issue 686343002: Add MaybeInterceptRedirect/Response to URLRequestInterceptor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added tests, removed DRP Created 6 years, 1 month 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/errorpage_browsertest.cc
diff --git a/chrome/browser/errorpage_browsertest.cc b/chrome/browser/errorpage_browsertest.cc
index dcab17ddbc01ecf444d1632c7eebe060c6738a0a..0c8a97cdfdccbac68e496f216263293368358964 100644
--- a/chrome/browser/errorpage_browsertest.cc
+++ b/chrome/browser/errorpage_browsertest.cc
@@ -177,6 +177,19 @@ class FailFirstNRequestsInterceptor : public net::URLRequestInterceptor {
}
}
+ net::URLRequestJob* MaybeInterceptRedirect(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate,
+ const GURL& location) const override {
+ return NULL;
+ }
+
+ net::URLRequestJob* MaybeInterceptResponse(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate) const override {
+ return NULL;
+ }
+
int requests() const { return requests_; }
int failures() const { return failures_; }
@@ -223,6 +236,19 @@ class LinkDoctorInterceptor : public net::URLRequestInterceptor {
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
}
+ net::URLRequestJob* MaybeInterceptRedirect(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate,
+ const GURL& location) const override {
+ return NULL;
+ }
+
+ net::URLRequestJob* MaybeInterceptResponse(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate) const override {
+ return NULL;
+ }
+
void WaitForRequests(int requests_to_wait_for) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK_EQ(-1, requests_to_wait_for_);
@@ -947,6 +973,19 @@ class AddressUnreachableInterceptor : public net::URLRequestInterceptor {
net::ERR_ADDRESS_UNREACHABLE);
}
+ net::URLRequestJob* MaybeInterceptResponse(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate) const override {
+ return NULL;
+ }
+
+ net::URLRequestJob* MaybeInterceptRedirect(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate,
+ const GURL& location) const override {
+ return NULL;
+ }
+
private:
DISALLOW_COPY_AND_ASSIGN(AddressUnreachableInterceptor);
};

Powered by Google App Engine
This is Rietveld 408576698