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

Unified Diff: chrome/browser/net/connect_interceptor.cc

Issue 11293252: Change Interceptors into URLRequestJobFactory::ProtocolHandlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync (including tedv's change) Created 8 years 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/net/connect_interceptor.cc
diff --git a/chrome/browser/net/connect_interceptor.cc b/chrome/browser/net/connect_interceptor.cc
index c1d6deac19b66137cd1179dc5153e8147e91c9de..d95770cdeae25840a0331514d5f30d16b67c4ce0 100644
--- a/chrome/browser/net/connect_interceptor.cc
+++ b/chrome/browser/net/connect_interceptor.cc
@@ -6,6 +6,7 @@
#include "chrome/browser/net/predictor.h"
#include "net/base/load_flags.h"
+#include "net/url_request/protocol_intercept_job_factory.h"
#include "net/url_request/url_request.h"
namespace chrome_browser_net {
@@ -27,11 +28,11 @@ ConnectInterceptor::ConnectInterceptor(Predictor* predictor)
ConnectInterceptor::~ConnectInterceptor() {
}
-net::URLRequestJob* ConnectInterceptor::MaybeIntercept(
- net::URLRequest* request, net::NetworkDelegate* network_delegate) const {
+void ConnectInterceptor::WitnessURLRequest(
+ net::URLRequest* request) const {
mmenke 2012/12/18 20:32:15 nit: May be able to fit on one line.
GURL request_scheme_host(Predictor::CanonicalizeUrl(request->url()));
if (request_scheme_host == GURL::EmptyGURL())
- return NULL;
+ return;
// Learn what URLs are likely to be needed during next startup.
predictor_->LearnAboutInitialNavigation(request_scheme_host);
@@ -74,7 +75,7 @@ net::URLRequestJob* ConnectInterceptor::MaybeIntercept(
// We don't update the RecentlySeen() time because any preconnections
// need to be made at the first navigation (i.e., when referer was loaded)
// and wouldn't have waited for this current request navigation.
- return NULL;
+ return;
}
}
timed_cache_.SetRecentlySeen(request_scheme_host);
@@ -84,19 +85,7 @@ net::URLRequestJob* ConnectInterceptor::MaybeIntercept(
// predictions now for subresources or for redirected hosts.
if ((request->load_flags() & net::LOAD_SUB_FRAME) || redirected_host)
predictor_->PredictFrameSubresources(request_scheme_host);
- return NULL;
-}
-
-net::URLRequestJob* ConnectInterceptor::MaybeInterceptResponse(
- net::URLRequest* request, net::NetworkDelegate* network_delegate) const {
- return NULL;
-}
-
-net::URLRequestJob* ConnectInterceptor::MaybeInterceptRedirect(
- const GURL& location,
- net::URLRequest* request,
- net::NetworkDelegate* network_delegate) const {
- return NULL;
+ return;
}
ConnectInterceptor::TimedCache::TimedCache(const base::TimeDelta& max_duration)

Powered by Google App Engine
This is Rietveld 408576698