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

Side by Side Diff: chrome/browser/net/connect_interceptor.h

Issue 10855209: Refactoring: ProtocolHandler::MaybeCreateJob takes NetworkDelegate as argument (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: NetworkDelegate fixed almost everywhere Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_NET_CONNECT_INTERCEPTOR_H_ 5 #ifndef CHROME_BROWSER_NET_CONNECT_INTERCEPTOR_H_
6 #define CHROME_BROWSER_NET_CONNECT_INTERCEPTOR_H_ 6 #define CHROME_BROWSER_NET_CONNECT_INTERCEPTOR_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/memory/mru_cache.h" 9 #include "base/memory/mru_cache.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 10 matching lines...) Expand all
21 public: 21 public:
22 // Construction includes registration as an URL. 22 // Construction includes registration as an URL.
23 explicit ConnectInterceptor(Predictor* predictor); 23 explicit ConnectInterceptor(Predictor* predictor);
24 // Destruction includes unregistering. 24 // Destruction includes unregistering.
25 virtual ~ConnectInterceptor(); 25 virtual ~ConnectInterceptor();
26 26
27 protected: 27 protected:
28 // Overridden from net::URLRequest::Interceptor: 28 // Overridden from net::URLRequest::Interceptor:
29 // Learn about referrers, and optionally preconnect based on history. 29 // Learn about referrers, and optionally preconnect based on history.
30 virtual net::URLRequestJob* MaybeIntercept( 30 virtual net::URLRequestJob* MaybeIntercept(
31 net::URLRequest* request) const OVERRIDE; 31 net::URLRequest* request,
32 net::NetworkDelegate* network_delegate) const OVERRIDE;
32 virtual net::URLRequestJob* MaybeInterceptResponse( 33 virtual net::URLRequestJob* MaybeInterceptResponse(
33 net::URLRequest* request) const OVERRIDE; 34 net::URLRequest* request) const OVERRIDE;
34 virtual net::URLRequestJob* MaybeInterceptRedirect( 35 virtual net::URLRequestJob* MaybeInterceptRedirect(
35 const GURL& location, net::URLRequest* request) const OVERRIDE; 36 const GURL& location, net::URLRequest* request) const OVERRIDE;
36 37
37 private: 38 private:
38 // Provide access to local class TimedCache for testing. 39 // Provide access to local class TimedCache for testing.
39 FRIEND_TEST_ALL_PREFIXES(ConnectInterceptorTest, TimedCacheRecall); 40 FRIEND_TEST_ALL_PREFIXES(ConnectInterceptorTest, TimedCacheRecall);
40 FRIEND_TEST_ALL_PREFIXES(ConnectInterceptorTest, TimedCacheEviction); 41 FRIEND_TEST_ALL_PREFIXES(ConnectInterceptorTest, TimedCacheEviction);
41 42
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 }; 74 };
74 TimedCache timed_cache_; 75 TimedCache timed_cache_;
75 Predictor* const predictor_; 76 Predictor* const predictor_;
76 77
77 DISALLOW_COPY_AND_ASSIGN(ConnectInterceptor); 78 DISALLOW_COPY_AND_ASSIGN(ConnectInterceptor);
78 }; 79 };
79 80
80 } // namespace chrome_browser_net 81 } // namespace chrome_browser_net
81 82
82 #endif // CHROME_BROWSER_NET_CONNECT_INTERCEPTOR_H_ 83 #endif // CHROME_BROWSER_NET_CONNECT_INTERCEPTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698