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

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

Issue 2262653003: Make URLRequest::Read to return net errors or bytes read instead of a bool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_impl.h" 5 #include "net/base/network_delegate_impl.h"
6 6
7 #include "net/base/net_errors.h" 7 #include "net/base/net_errors.h"
8 8
9 namespace net { 9 namespace net {
10 10
(...skipping 23 matching lines...) Expand all
34 int NetworkDelegateImpl::OnHeadersReceived( 34 int NetworkDelegateImpl::OnHeadersReceived(
35 URLRequest* request, 35 URLRequest* request,
36 const CompletionCallback& callback, 36 const CompletionCallback& callback,
37 const HttpResponseHeaders* original_response_headers, 37 const HttpResponseHeaders* original_response_headers,
38 scoped_refptr<HttpResponseHeaders>* override_response_headers, 38 scoped_refptr<HttpResponseHeaders>* override_response_headers,
39 GURL* allowed_unsafe_redirect_url) { 39 GURL* allowed_unsafe_redirect_url) {
40 return OK; 40 return OK;
41 } 41 }
42 42
43 void NetworkDelegateImpl::OnBeforeRedirect(URLRequest* request, 43 void NetworkDelegateImpl::OnBeforeRedirect(URLRequest* request,
44 const GURL& new_location) { 44 const GURL& new_location) {}
45
46 void NetworkDelegateImpl::OnResponseStarted(URLRequest* request,
47 int net_error) {
48 OnResponseStarted(request);
45 } 49 }
46 50
47 void NetworkDelegateImpl::OnResponseStarted(URLRequest* request) { 51 // Deprecated.
48 } 52 void NetworkDelegateImpl::OnResponseStarted(URLRequest* request) {}
49 53
50 void NetworkDelegateImpl::OnNetworkBytesReceived(URLRequest* request, 54 void NetworkDelegateImpl::OnNetworkBytesReceived(URLRequest* request,
51 int64_t bytes_received) {} 55 int64_t bytes_received) {}
52 56
53 void NetworkDelegateImpl::OnNetworkBytesSent(URLRequest* request, 57 void NetworkDelegateImpl::OnNetworkBytesSent(URLRequest* request,
54 int64_t bytes_sent) {} 58 int64_t bytes_sent) {}
55 59
56 void NetworkDelegateImpl::OnCompleted(URLRequest* request, bool started) { 60 void NetworkDelegateImpl::OnCompleted(URLRequest* request,
61 bool started,
62 int net_error) {
63 OnCompleted(request, started);
57 } 64 }
58 65
66 // Deprecated.
67 void NetworkDelegateImpl::OnCompleted(URLRequest* request, bool started) {}
68
59 void NetworkDelegateImpl::OnURLRequestDestroyed(URLRequest* request) { 69 void NetworkDelegateImpl::OnURLRequestDestroyed(URLRequest* request) {
60 } 70 }
61 71
62 void NetworkDelegateImpl::OnPACScriptError(int line_number, 72 void NetworkDelegateImpl::OnPACScriptError(int line_number,
63 const base::string16& error) { 73 const base::string16& error) {
64 } 74 }
65 75
66 NetworkDelegate::AuthRequiredResponse NetworkDelegateImpl::OnAuthRequired( 76 NetworkDelegate::AuthRequiredResponse NetworkDelegateImpl::OnAuthRequired(
67 URLRequest* request, 77 URLRequest* request,
68 const AuthChallengeInfo& auth_info, 78 const AuthChallengeInfo& auth_info,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 112 }
103 113
104 bool NetworkDelegateImpl::OnCancelURLRequestWithPolicyViolatingReferrerHeader( 114 bool NetworkDelegateImpl::OnCancelURLRequestWithPolicyViolatingReferrerHeader(
105 const URLRequest& request, 115 const URLRequest& request,
106 const GURL& target_url, 116 const GURL& target_url,
107 const GURL& referrer_url) const { 117 const GURL& referrer_url) const {
108 return false; 118 return false;
109 } 119 }
110 120
111 } // namespace net 121 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698