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

Side by Side Diff: net/url_request/url_fetcher_delegate.h

Issue 2303653002: Precache per-resource cap should be applied on network bytes used (Closed)
Patch Set: Addressed mmenke comments 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
« no previous file with comments | « net/url_request/url_fetcher_core.cc ('k') | net/url_request/url_fetcher_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 (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 NET_URL_REQUEST_URL_FETCHER_DELEGATE_H_ 5 #ifndef NET_URL_REQUEST_URL_FETCHER_DELEGATE_H_
6 #define NET_URL_REQUEST_URL_FETCHER_DELEGATE_H_ 6 #define NET_URL_REQUEST_URL_FETCHER_DELEGATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 12
13 #include "net/base/net_export.h" 13 #include "net/base/net_export.h"
14 14
15 namespace net { 15 namespace net {
16 16
17 class URLFetcher; 17 class URLFetcher;
18 18
19 // A delegate interface for users of URLFetcher. 19 // A delegate interface for users of URLFetcher.
20 class NET_EXPORT URLFetcherDelegate { 20 class NET_EXPORT URLFetcherDelegate {
21 public: 21 public:
22 // This will be called when the URL has been fetched, successfully or not. 22 // This will be called when the URL has been fetched, successfully or not.
23 // Use accessor methods on |source| to get the results. 23 // Use accessor methods on |source| to get the results.
24 virtual void OnURLFetchComplete(const URLFetcher* source) = 0; 24 virtual void OnURLFetchComplete(const URLFetcher* source) = 0;
25 25
26 // This will be called when some part of the response is read. |current| 26 // This will be called when some part of the response is read. |current|
27 // denotes the number of bytes received up to the call, and |total| is the 27 // denotes the number of bytes received up to the call, and |total| is the
28 // expected total size of the response (or -1 if not determined). 28 // expected total size of the response (or -1 if not determined).
waffles 2016/09/15 17:00:01 I believe this comment needs to be updated.
Raj 2016/09/15 18:56:17 Done.
29 virtual void OnURLFetchDownloadProgress(const URLFetcher* source, 29 virtual void OnURLFetchDownloadProgress(const URLFetcher* source,
30 int64_t current, 30 int64_t current,
31 int64_t total); 31 int64_t total,
32 int64_t current_network_bytes);
32 33
33 // This will be called when uploading of POST or PUT requests proceeded. 34 // This will be called when uploading of POST or PUT requests proceeded.
34 // |current| denotes the number of bytes sent so far, and |total| is the 35 // |current| denotes the number of bytes sent so far, and |total| is the
35 // total size of uploading data (or -1 if chunked upload is enabled). 36 // total size of uploading data (or -1 if chunked upload is enabled).
36 virtual void OnURLFetchUploadProgress(const URLFetcher* source, 37 virtual void OnURLFetchUploadProgress(const URLFetcher* source,
37 int64_t current, 38 int64_t current,
38 int64_t total); 39 int64_t total);
39 40
40 protected: 41 protected:
41 virtual ~URLFetcherDelegate(); 42 virtual ~URLFetcherDelegate();
42 }; 43 };
43 44
44 } // namespace net 45 } // namespace net
45 46
46 #endif // NET_URL_REQUEST_URL_FETCHER_DELEGATE_H_ 47 #endif // NET_URL_REQUEST_URL_FETCHER_DELEGATE_H_
OLDNEW
« no previous file with comments | « net/url_request/url_fetcher_core.cc ('k') | net/url_request/url_fetcher_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698