Chromium Code Reviews| 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) |