| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/net/connect_interceptor.h" | 5 #include "chrome/browser/net/connect_interceptor.h" |
| 6 | 6 |
| 7 #include "chrome/browser/net/predictor_api.h" | 7 #include "chrome/browser/net/predictor_api.h" |
| 8 #include "net/base/load_flags.h" | 8 #include "net/base/load_flags.h" |
| 9 | 9 |
| 10 namespace chrome_browser_net { | 10 namespace chrome_browser_net { |
| 11 | 11 |
| 12 ConnectInterceptor::ConnectInterceptor() { | 12 ConnectInterceptor::ConnectInterceptor() { |
| 13 URLRequest::RegisterRequestInterceptor(this); | 13 net::URLRequest::RegisterRequestInterceptor(this); |
| 14 } | 14 } |
| 15 | 15 |
| 16 ConnectInterceptor::~ConnectInterceptor() { | 16 ConnectInterceptor::~ConnectInterceptor() { |
| 17 URLRequest::UnregisterRequestInterceptor(this); | 17 net::URLRequest::UnregisterRequestInterceptor(this); |
| 18 } | 18 } |
| 19 | 19 |
| 20 net::URLRequestJob* ConnectInterceptor::MaybeIntercept( | 20 net::URLRequestJob* ConnectInterceptor::MaybeIntercept( |
| 21 net::URLRequest* request) { | 21 net::URLRequest* request) { |
| 22 GURL request_scheme_host(request->url().GetWithEmptyPath()); | 22 GURL request_scheme_host(request->url().GetWithEmptyPath()); |
| 23 | 23 |
| 24 // Learn what URLs are likely to be needed during next startup. | 24 // Learn what URLs are likely to be needed during next startup. |
| 25 LearnAboutInitialNavigation(request_scheme_host); | 25 LearnAboutInitialNavigation(request_scheme_host); |
| 26 | 26 |
| 27 bool redirected_host = false; | 27 bool redirected_host = false; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 return NULL; | 77 return NULL; |
| 78 } | 78 } |
| 79 | 79 |
| 80 net::URLRequestJob* ConnectInterceptor::MaybeInterceptRedirect( | 80 net::URLRequestJob* ConnectInterceptor::MaybeInterceptRedirect( |
| 81 net::URLRequest* request, | 81 net::URLRequest* request, |
| 82 const GURL& location) { | 82 const GURL& location) { |
| 83 return NULL; | 83 return NULL; |
| 84 } | 84 } |
| 85 | 85 |
| 86 } // namespace chrome_browser_net | 86 } // namespace chrome_browser_net |
| OLD | NEW |