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

Side by Side Diff: net/base/layered_network_delegate.h

Issue 1284993005: Notify NetworkDelegate when bytes have been received over the network. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed empty cronet OnRawBytesRead implementation Created 5 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
« no previous file with comments | « ios/web/shell/shell_network_delegate.cc ('k') | net/base/layered_network_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef NET_BASE_LAYERED_NETWORK_DELEGATE_H_ 5 #ifndef NET_BASE_LAYERED_NETWORK_DELEGATE_H_
6 #define NET_BASE_LAYERED_NETWORK_DELEGATE_H_ 6 #define NET_BASE_LAYERED_NETWORK_DELEGATE_H_
7 7
8 #include <stdint.h>
9
8 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
10 #include "net/base/completion_callback.h" 12 #include "net/base/completion_callback.h"
11 #include "net/base/network_delegate.h" 13 #include "net/base/network_delegate.h"
12 #include "net/cookies/canonical_cookie.h" 14 #include "net/cookies/canonical_cookie.h"
13 15
14 class GURL; 16 class GURL;
15 17
16 namespace base { 18 namespace base {
17 class FilePath; 19 class FilePath;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 void OnSendHeaders(URLRequest* request, 57 void OnSendHeaders(URLRequest* request,
56 const HttpRequestHeaders& headers) final; 58 const HttpRequestHeaders& headers) final;
57 int OnHeadersReceived( 59 int OnHeadersReceived(
58 URLRequest* request, 60 URLRequest* request,
59 const CompletionCallback& callback, 61 const CompletionCallback& callback,
60 const HttpResponseHeaders* original_response_headers, 62 const HttpResponseHeaders* original_response_headers,
61 scoped_refptr<HttpResponseHeaders>* override_response_headers, 63 scoped_refptr<HttpResponseHeaders>* override_response_headers,
62 GURL* allowed_unsafe_redirect_url) final; 64 GURL* allowed_unsafe_redirect_url) final;
63 void OnBeforeRedirect(URLRequest* request, const GURL& new_location) final; 65 void OnBeforeRedirect(URLRequest* request, const GURL& new_location) final;
64 void OnResponseStarted(URLRequest* request) final; 66 void OnResponseStarted(URLRequest* request) final;
65 void OnRawBytesRead(const URLRequest& request, int bytes_read) final; 67 void OnNetworkBytesReceived(const URLRequest& request,
68 int64_t bytes_received) final;
66 void OnCompleted(URLRequest* request, bool started) final; 69 void OnCompleted(URLRequest* request, bool started) final;
67 void OnURLRequestDestroyed(URLRequest* request) final; 70 void OnURLRequestDestroyed(URLRequest* request) final;
68 void OnPACScriptError(int line_number, const base::string16& error) final; 71 void OnPACScriptError(int line_number, const base::string16& error) final;
69 AuthRequiredResponse OnAuthRequired(URLRequest* request, 72 AuthRequiredResponse OnAuthRequired(URLRequest* request,
70 const AuthChallengeInfo& auth_info, 73 const AuthChallengeInfo& auth_info,
71 const AuthCallback& callback, 74 const AuthCallback& callback,
72 AuthCredentials* credentials) final; 75 AuthCredentials* credentials) final;
73 bool OnCanGetCookies(const URLRequest& request, 76 bool OnCanGetCookies(const URLRequest& request,
74 const CookieList& cookie_list) final; 77 const CookieList& cookie_list) final;
75 bool OnCanSetCookie(const URLRequest& request, 78 bool OnCanSetCookie(const URLRequest& request,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 const CompletionCallback& callback, 117 const CompletionCallback& callback,
115 const HttpResponseHeaders* original_response_headers, 118 const HttpResponseHeaders* original_response_headers,
116 scoped_refptr<HttpResponseHeaders>* override_response_headers, 119 scoped_refptr<HttpResponseHeaders>* override_response_headers,
117 GURL* allowed_unsafe_redirect_url); 120 GURL* allowed_unsafe_redirect_url);
118 121
119 virtual void OnBeforeRedirectInternal(URLRequest* request, 122 virtual void OnBeforeRedirectInternal(URLRequest* request,
120 const GURL& new_location); 123 const GURL& new_location);
121 124
122 virtual void OnResponseStartedInternal(URLRequest* request); 125 virtual void OnResponseStartedInternal(URLRequest* request);
123 126
124 virtual void OnRawBytesReadInternal(const URLRequest& request, 127 virtual void OnNetworkBytesReceivedInternal(const URLRequest& request,
125 int bytes_read); 128 int64_t bytes_received);
126 129
127 virtual void OnCompletedInternal(URLRequest* request, bool started); 130 virtual void OnCompletedInternal(URLRequest* request, bool started);
128 131
129 virtual void OnURLRequestDestroyedInternal(URLRequest* request); 132 virtual void OnURLRequestDestroyedInternal(URLRequest* request);
130 133
131 virtual void OnPACScriptErrorInternal(int line_number, 134 virtual void OnPACScriptErrorInternal(int line_number,
132 const base::string16& error); 135 const base::string16& error);
133 136
134 virtual void OnCanGetCookiesInternal(const URLRequest& request, 137 virtual void OnCanGetCookiesInternal(const URLRequest& request,
135 const CookieList& cookie_list); 138 const CookieList& cookie_list);
(...skipping 21 matching lines...) Expand all
157 const GURL& target_url, 160 const GURL& target_url,
158 const GURL& referrer_url) const; 161 const GURL& referrer_url) const;
159 162
160 private: 163 private:
161 scoped_ptr<NetworkDelegate> nested_network_delegate_; 164 scoped_ptr<NetworkDelegate> nested_network_delegate_;
162 }; 165 };
163 166
164 } // namespace net 167 } // namespace net
165 168
166 #endif // NET_BASE_LAYERED_NETWORK_DELEGATE_H_ 169 #endif // NET_BASE_LAYERED_NETWORK_DELEGATE_H_
OLDNEW
« no previous file with comments | « ios/web/shell/shell_network_delegate.cc ('k') | net/base/layered_network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698