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 #ifndef CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ |
6 #define CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ | 6 #define CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "net/http/http_network_delegate.h" | 10 #include "net/http/http_network_delegate.h" |
11 | 11 |
12 // ChromeNetworkDelegate is the central point from within the chrome code to | 12 // ChromeNetworkDelegate is the central point from within the chrome code to |
13 // add hooks into the network stack. | 13 // add hooks into the network stack. |
14 class ChromeNetworkDelegate : public net::HttpNetworkDelegate { | 14 class ChromeNetworkDelegate : public net::HttpNetworkDelegate { |
15 public: | 15 public: |
16 ChromeNetworkDelegate(); | 16 ChromeNetworkDelegate(); |
17 ~ChromeNetworkDelegate(); | 17 ~ChromeNetworkDelegate(); |
18 | 18 |
19 // net::HttpNetworkDelegate methods: | 19 // net::HttpNetworkDelegate methods: |
20 virtual void OnBeforeURLRequest(net::URLRequest* request); | 20 virtual void OnBeforeURLRequest(net::URLRequest* request); |
21 virtual void OnSendHttpRequest(net::HttpRequestHeaders* headers); | 21 virtual void OnSendHttpRequest(net::HttpRequestHeaders* headers); |
| 22 virtual void OnResponseStarted(net::URLRequest* request); |
| 23 virtual void OnReadCompleted(net::URLRequest* request, int bytes_read); |
22 | 24 |
23 // TODO(willchan): Add functions for consumers to register ways to | 25 // TODO(willchan): Add functions for consumers to register ways to |
24 // access/modify the request. | 26 // access/modify the request. |
25 | 27 |
26 private: | 28 private: |
27 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); | 29 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); |
28 }; | 30 }; |
29 | 31 |
30 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ | 32 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ |
OLD | NEW |