OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 static Value* HistoricNetworkStatsInfoToValue(); | 113 static Value* HistoricNetworkStatsInfoToValue(); |
114 | 114 |
115 // Creates a Value summary of the state of the network session. The caller is | 115 // Creates a Value summary of the state of the network session. The caller is |
116 // responsible for deleting the returned value. | 116 // responsible for deleting the returned value. |
117 Value* SessionNetworkStatsInfoToValue() const; | 117 Value* SessionNetworkStatsInfoToValue() const; |
118 | 118 |
119 private: | 119 private: |
120 friend class ChromeNetworkDelegateTest; | 120 friend class ChromeNetworkDelegateTest; |
121 | 121 |
122 // NetworkDelegate implementation. | 122 // NetworkDelegate implementation. |
| 123 virtual void OnBeforePreconnect(const GURL& url) OVERRIDE; |
123 virtual int OnBeforeURLRequest(net::URLRequest* request, | 124 virtual int OnBeforeURLRequest(net::URLRequest* request, |
124 const net::CompletionCallback& callback, | 125 const net::CompletionCallback& callback, |
125 GURL* new_url) OVERRIDE; | 126 GURL* new_url) OVERRIDE; |
126 virtual int OnBeforeSendHeaders(net::URLRequest* request, | 127 virtual int OnBeforeSendHeaders(net::URLRequest* request, |
127 const net::CompletionCallback& callback, | 128 const net::CompletionCallback& callback, |
128 net::HttpRequestHeaders* headers) OVERRIDE; | 129 net::HttpRequestHeaders* headers) OVERRIDE; |
129 virtual void OnSendHeaders(net::URLRequest* request, | 130 virtual void OnSendHeaders(net::URLRequest* request, |
130 const net::HttpRequestHeaders& headers) OVERRIDE; | 131 const net::HttpRequestHeaders& headers) OVERRIDE; |
131 virtual int OnHeadersReceived( | 132 virtual int OnHeadersReceived( |
132 net::URLRequest* request, | 133 net::URLRequest* request, |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 // over the network. | 204 // over the network. |
204 int64 received_content_length_; | 205 int64 received_content_length_; |
205 | 206 |
206 // Total original size of all content before it was transferred. | 207 // Total original size of all content before it was transferred. |
207 int64 original_content_length_; | 208 int64 original_content_length_; |
208 | 209 |
209 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); | 210 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); |
210 }; | 211 }; |
211 | 212 |
212 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ | 213 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ |
OLD | NEW |