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

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

Issue 1279543002: Support needed to measure user and service traffic in Chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@NewHistogram
Patch Set: Created 5 years, 4 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 #ifndef NET_URL_REQUEST_URL_FETCHER_CORE_H_ 5 #ifndef NET_URL_REQUEST_URL_FETCHER_CORE_H_
6 #define NET_URL_REQUEST_URL_FETCHER_CORE_H_ 6 #define NET_URL_REQUEST_URL_FETCHER_CORE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 void SaveResponseWithWriter( 109 void SaveResponseWithWriter(
110 scoped_ptr<URLFetcherResponseWriter> response_writer); 110 scoped_ptr<URLFetcherResponseWriter> response_writer);
111 HttpResponseHeaders* GetResponseHeaders() const; 111 HttpResponseHeaders* GetResponseHeaders() const;
112 HostPortPair GetSocketAddress() const; 112 HostPortPair GetSocketAddress() const;
113 bool WasFetchedViaProxy() const; 113 bool WasFetchedViaProxy() const;
114 bool WasCached() const; 114 bool WasCached() const;
115 const GURL& GetOriginalURL() const; 115 const GURL& GetOriginalURL() const;
116 const GURL& GetURL() const; 116 const GURL& GetURL() const;
117 const URLRequestStatus& GetStatus() const; 117 const URLRequestStatus& GetStatus() const;
118 int GetResponseCode() const; 118 int GetResponseCode() const;
119 int64 GetBytesReceivedSize() const;
120 int64 GetBytesSentSize() const;
119 const ResponseCookies& GetCookies() const; 121 const ResponseCookies& GetCookies() const;
120 int64_t GetReceivedResponseContentLength() const; 122 int64_t GetReceivedResponseContentLength() const;
121 int64_t GetTotalReceivedBytes() const; 123 int64_t GetTotalReceivedBytes() const;
122 // Reports that the received content was malformed (i.e. failed parsing 124 // Reports that the received content was malformed (i.e. failed parsing
123 // or validation). This makes the throttling logic that does exponential 125 // or validation). This makes the throttling logic that does exponential
124 // back-off when servers are having problems treat the current request as 126 // back-off when servers are having problems treat the current request as
125 // a failure. Your call to this method will be ignored if your request is 127 // a failure. Your call to this method will be ignored if your request is
126 // already considered a failure based on the HTTP response code or response 128 // already considered a failure based on the HTTP response code or response
127 // headers. 129 // headers.
128 void ReceivedContentWasMalformed(); 130 void ReceivedContentWasMalformed();
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 // Timer to poll the progress of uploading for POST and PUT requests. 329 // Timer to poll the progress of uploading for POST and PUT requests.
328 // When crbug.com/119629 is fixed, scoped_ptr is not necessary here. 330 // When crbug.com/119629 is fixed, scoped_ptr is not necessary here.
329 scoped_ptr<base::RepeatingTimer<URLFetcherCore> > 331 scoped_ptr<base::RepeatingTimer<URLFetcherCore> >
330 upload_progress_checker_timer_; 332 upload_progress_checker_timer_;
331 // Number of bytes sent so far. 333 // Number of bytes sent so far.
332 int64 current_upload_bytes_; 334 int64 current_upload_bytes_;
333 // Number of bytes received so far. 335 // Number of bytes received so far.
334 int64 current_response_bytes_; 336 int64 current_response_bytes_;
335 // Total expected bytes to receive (-1 if it cannot be determined). 337 // Total expected bytes to receive (-1 if it cannot be determined).
336 int64 total_response_bytes_; 338 int64 total_response_bytes_;
337 339 // Total received bytes size
bengr 2015/08/07 18:00:02 Add a period.
amohammadkhan 2015/08/11 22:04:36 Done.
340 int64 total_downloaded_bytes_;
341 // total sent bytes size
bengr 2015/08/07 18:00:02 You can be more specific for these. Total bytes se
amohammadkhan 2015/08/11 22:04:36 Done.
342 int64 total_sent_bytes_;
338 // TODO(willchan): Get rid of this after debugging crbug.com/90971. 343 // TODO(willchan): Get rid of this after debugging crbug.com/90971.
339 base::debug::StackTrace stack_trace_; 344 base::debug::StackTrace stack_trace_;
340 345
341 static base::LazyInstance<Registry> g_registry; 346 static base::LazyInstance<Registry> g_registry;
342 347
343 DISALLOW_COPY_AND_ASSIGN(URLFetcherCore); 348 DISALLOW_COPY_AND_ASSIGN(URLFetcherCore);
344 }; 349 };
345 350
346 } // namespace net 351 } // namespace net
347 352
348 #endif // NET_URL_REQUEST_URL_FETCHER_CORE_H_ 353 #endif // NET_URL_REQUEST_URL_FETCHER_CORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698