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

Side by Side Diff: net/base/network_delegate.cc

Issue 649763002: git cl format the second third of the net/base directory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
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 #include "net/base/network_delegate.h" 5 #include "net/base/network_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/base/load_flags.h" 8 #include "net/base/load_flags.h"
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/proxy/proxy_info.h" 10 #include "net/proxy/proxy_info.h"
11 #include "net/url_request/url_request.h" 11 #include "net/url_request/url_request.h"
12 12
13 namespace net { 13 namespace net {
14 14
15 int NetworkDelegate::NotifyBeforeURLRequest( 15 int NetworkDelegate::NotifyBeforeURLRequest(URLRequest* request,
16 URLRequest* request, const CompletionCallback& callback, 16 const CompletionCallback& callback,
17 GURL* new_url) { 17 GURL* new_url) {
18 DCHECK(CalledOnValidThread()); 18 DCHECK(CalledOnValidThread());
19 DCHECK(request); 19 DCHECK(request);
20 DCHECK(!callback.is_null()); 20 DCHECK(!callback.is_null());
21 return OnBeforeURLRequest(request, callback, new_url); 21 return OnBeforeURLRequest(request, callback, new_url);
22 } 22 }
23 23
24 void NetworkDelegate::NotifyResolveProxy( 24 void NetworkDelegate::NotifyResolveProxy(const GURL& url,
25 const GURL& url, 25 int load_flags,
26 int load_flags, 26 const ProxyService& proxy_service,
27 const ProxyService& proxy_service, 27 ProxyInfo* result) {
28 ProxyInfo* result) {
29 DCHECK(CalledOnValidThread()); 28 DCHECK(CalledOnValidThread());
30 DCHECK(result); 29 DCHECK(result);
31 OnResolveProxy(url, load_flags, proxy_service, result); 30 OnResolveProxy(url, load_flags, proxy_service, result);
32 } 31 }
33 32
34 void NetworkDelegate::NotifyProxyFallback( 33 void NetworkDelegate::NotifyProxyFallback(const ProxyServer& bad_proxy,
35 const ProxyServer& bad_proxy, 34 int net_error) {
36 int net_error) {
37 DCHECK(CalledOnValidThread()); 35 DCHECK(CalledOnValidThread());
38 OnProxyFallback(bad_proxy, net_error); 36 OnProxyFallback(bad_proxy, net_error);
39 } 37 }
40 38
41 int NetworkDelegate::NotifyBeforeSendHeaders( 39 int NetworkDelegate::NotifyBeforeSendHeaders(URLRequest* request,
42 URLRequest* request, const CompletionCallback& callback, 40 const CompletionCallback& callback,
43 HttpRequestHeaders* headers) { 41 HttpRequestHeaders* headers) {
44 DCHECK(CalledOnValidThread()); 42 DCHECK(CalledOnValidThread());
45 DCHECK(headers); 43 DCHECK(headers);
46 DCHECK(!callback.is_null()); 44 DCHECK(!callback.is_null());
47 return OnBeforeSendHeaders(request, callback, headers); 45 return OnBeforeSendHeaders(request, callback, headers);
48 } 46 }
49 47
50 void NetworkDelegate::NotifyBeforeSendProxyHeaders( 48 void NetworkDelegate::NotifyBeforeSendProxyHeaders(
51 URLRequest* request, 49 URLRequest* request,
52 const ProxyInfo& proxy_info, 50 const ProxyInfo& proxy_info,
53 HttpRequestHeaders* headers) { 51 HttpRequestHeaders* headers) {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 return OnCancelURLRequestWithPolicyViolatingReferrerHeader( 172 return OnCancelURLRequestWithPolicyViolatingReferrerHeader(
175 request, target_url, referrer_url); 173 request, target_url, referrer_url);
176 } 174 }
177 175
178 int NetworkDelegate::OnBeforeURLRequest(URLRequest* request, 176 int NetworkDelegate::OnBeforeURLRequest(URLRequest* request,
179 const CompletionCallback& callback, 177 const CompletionCallback& callback,
180 GURL* new_url) { 178 GURL* new_url) {
181 return OK; 179 return OK;
182 } 180 }
183 181
184 void NetworkDelegate::OnResolveProxy( 182 void NetworkDelegate::OnResolveProxy(const GURL& url,
185 const GURL& url, 183 int load_flags,
186 int load_flags, 184 const ProxyService& proxy_service,
187 const ProxyService& proxy_service, 185 ProxyInfo* result) {
188 ProxyInfo* result) {
189 } 186 }
190 187
191 void NetworkDelegate::OnProxyFallback(const ProxyServer& bad_proxy, 188 void NetworkDelegate::OnProxyFallback(const ProxyServer& bad_proxy,
192 int net_error) { 189 int net_error) {
193 } 190 }
194 191
195 int NetworkDelegate::OnBeforeSendHeaders(URLRequest* request, 192 int NetworkDelegate::OnBeforeSendHeaders(URLRequest* request,
196 const CompletionCallback& callback, 193 const CompletionCallback& callback,
197 HttpRequestHeaders* headers) { 194 HttpRequestHeaders* headers) {
198 return OK; 195 return OK;
199 } 196 }
200 197
201 void NetworkDelegate::OnBeforeSendProxyHeaders( 198 void NetworkDelegate::OnBeforeSendProxyHeaders(URLRequest* request,
202 URLRequest* request, 199 const ProxyInfo& proxy_info,
203 const ProxyInfo& proxy_info, 200 HttpRequestHeaders* headers) {
204 HttpRequestHeaders* headers) {
205 } 201 }
206 202
207 void NetworkDelegate::OnSendHeaders(URLRequest* request, 203 void NetworkDelegate::OnSendHeaders(URLRequest* request,
208 const HttpRequestHeaders& headers) { 204 const HttpRequestHeaders& headers) {
209 } 205 }
210 206
211 int NetworkDelegate::OnHeadersReceived( 207 int NetworkDelegate::OnHeadersReceived(
212 URLRequest* request, 208 URLRequest* request,
213 const CompletionCallback& callback, 209 const CompletionCallback& callback,
214 const HttpResponseHeaders* original_response_headers, 210 const HttpResponseHeaders* original_response_headers,
(...skipping 25 matching lines...) Expand all
240 236
241 NetworkDelegate::AuthRequiredResponse NetworkDelegate::OnAuthRequired( 237 NetworkDelegate::AuthRequiredResponse NetworkDelegate::OnAuthRequired(
242 URLRequest* request, 238 URLRequest* request,
243 const AuthChallengeInfo& auth_info, 239 const AuthChallengeInfo& auth_info,
244 const AuthCallback& callback, 240 const AuthCallback& callback,
245 AuthCredentials* credentials) { 241 AuthCredentials* credentials) {
246 return AUTH_REQUIRED_RESPONSE_NO_ACTION; 242 return AUTH_REQUIRED_RESPONSE_NO_ACTION;
247 } 243 }
248 244
249 bool NetworkDelegate::OnCanGetCookies(const URLRequest& request, 245 bool NetworkDelegate::OnCanGetCookies(const URLRequest& request,
250 const CookieList& cookie_list) { 246 const CookieList& cookie_list) {
251 return true; 247 return true;
252 } 248 }
253 249
254 bool NetworkDelegate::OnCanSetCookie(const URLRequest& request, 250 bool NetworkDelegate::OnCanSetCookie(const URLRequest& request,
255 const std::string& cookie_line, 251 const std::string& cookie_line,
256 CookieOptions* options) { 252 CookieOptions* options) {
257 return true; 253 return true;
258 } 254 }
259 255
260 bool NetworkDelegate::OnCanAccessFile(const URLRequest& request, 256 bool NetworkDelegate::OnCanAccessFile(const URLRequest& request,
261 const base::FilePath& path) const { 257 const base::FilePath& path) const {
262 return false; 258 return false;
263 } 259 }
264 260
265 bool NetworkDelegate::OnCanThrottleRequest(const URLRequest& request) const { 261 bool NetworkDelegate::OnCanThrottleRequest(const URLRequest& request) const {
266 return false; 262 return false;
267 } 263 }
268 264
269 bool NetworkDelegate::OnCanEnablePrivacyMode( 265 bool NetworkDelegate::OnCanEnablePrivacyMode(
270 const GURL& url, 266 const GURL& url,
271 const GURL& first_party_for_cookies) const { 267 const GURL& first_party_for_cookies) const {
272 return false; 268 return false;
273 } 269 }
274 270
275 int NetworkDelegate::OnBeforeSocketStreamConnect( 271 int NetworkDelegate::OnBeforeSocketStreamConnect(
276 SocketStream* socket, 272 SocketStream* socket,
277 const CompletionCallback& callback) { 273 const CompletionCallback& callback) {
278 return OK; 274 return OK;
279 } 275 }
280 276
281 bool NetworkDelegate::OnCancelURLRequestWithPolicyViolatingReferrerHeader( 277 bool NetworkDelegate::OnCancelURLRequestWithPolicyViolatingReferrerHeader(
282 const URLRequest& request, 278 const URLRequest& request,
283 const GURL& target_url, 279 const GURL& target_url,
284 const GURL& referrer_url) const { 280 const GURL& referrer_url) const {
285 return false; 281 return false;
286 } 282 }
287 283
288 } // namespace net 284 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698