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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 BooleanPrefMember* force_google_safe_search, | 117 BooleanPrefMember* force_google_safe_search, |
118 PrefService* pref_service); | 118 PrefService* pref_service); |
119 | 119 |
120 // When called, all file:// URLs will now be accessible. If this is not | 120 // When called, all file:// URLs will now be accessible. If this is not |
121 // called, then some platforms restrict access to file:// paths. | 121 // called, then some platforms restrict access to file:// paths. |
122 static void AllowAccessToAllFiles(); | 122 static void AllowAccessToAllFiles(); |
123 | 123 |
124 // Creates a Value summary of the persistent state of the network session. | 124 // Creates a Value summary of the persistent state of the network session. |
125 // The caller is responsible for deleting the returned value. | 125 // The caller is responsible for deleting the returned value. |
126 // Must be called on the UI thread. | 126 // Must be called on the UI thread. |
127 static Value* HistoricNetworkStatsInfoToValue(); | 127 static base::Value* HistoricNetworkStatsInfoToValue(); |
128 | 128 |
129 // Creates a Value summary of the state of the network session. The caller is | 129 // Creates a Value summary of the state of the network session. The caller is |
130 // responsible for deleting the returned value. | 130 // responsible for deleting the returned value. |
131 Value* SessionNetworkStatsInfoToValue() const; | 131 base::Value* SessionNetworkStatsInfoToValue() const; |
132 | 132 |
133 private: | 133 private: |
134 friend class ChromeNetworkDelegateTest; | 134 friend class ChromeNetworkDelegateTest; |
135 | 135 |
136 // NetworkDelegate implementation. | 136 // NetworkDelegate implementation. |
137 virtual int OnBeforeURLRequest(net::URLRequest* request, | 137 virtual int OnBeforeURLRequest(net::URLRequest* request, |
138 const net::CompletionCallback& callback, | 138 const net::CompletionCallback& callback, |
139 GURL* new_url) OVERRIDE; | 139 GURL* new_url) OVERRIDE; |
140 virtual int OnBeforeSendHeaders(net::URLRequest* request, | 140 virtual int OnBeforeSendHeaders(net::URLRequest* request, |
141 const net::CompletionCallback& callback, | 141 const net::CompletionCallback& callback, |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 222 |
223 // Total original size of all content before it was transferred. | 223 // Total original size of all content before it was transferred. |
224 int64 original_content_length_; | 224 int64 original_content_length_; |
225 | 225 |
226 scoped_ptr<ClientHints> client_hints_; | 226 scoped_ptr<ClientHints> client_hints_; |
227 | 227 |
228 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); | 228 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); |
229 }; | 229 }; |
230 | 230 |
231 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ | 231 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ |
OLD | NEW |