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

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

Issue 1327763003: Added and implemented URLRequest::GetTotalSentBytes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@spdy_sent_bytes_impl
Patch Set: Addressed nits 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 | « net/http/http_transaction_test_util.cc ('k') | net/url_request/url_request.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_REQUEST_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_H_
6 #define NET_URL_REQUEST_URL_REQUEST_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_H_
7 7
8 #include <stdint.h>
9
8 #include <string> 10 #include <string>
9 #include <vector> 11 #include <vector>
10 12
11 #include "base/debug/leak_tracker.h" 13 #include "base/debug/leak_tracker.h"
12 #include "base/logging.h" 14 #include "base/logging.h"
13 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
15 #include "base/strings/string16.h" 17 #include "base/strings/string16.h"
16 #include "base/supports_user_data.h" 18 #include "base/supports_user_data.h"
17 #include "base/threading/non_thread_safe.h" 19 #include "base/threading/non_thread_safe.h"
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 // 352 //
351 // 1. A redirect or auth callback is currently running. Once it ends, the 353 // 1. A redirect or auth callback is currently running. Once it ends, the
352 // headers may become unavailable as a new request with the new address 354 // headers may become unavailable as a new request with the new address
353 // or credentials is made. 355 // or credentials is made.
354 // 356 //
355 // 2. The OnResponseStarted callback is currently running or has run. 357 // 2. The OnResponseStarted callback is currently running or has run.
356 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const; 358 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const;
357 359
358 // Gets the total amount of data received from network after SSL decoding and 360 // Gets the total amount of data received from network after SSL decoding and
359 // proxy handling. Pertains only to the last URLRequestJob issued by this 361 // proxy handling. Pertains only to the last URLRequestJob issued by this
360 // URLRequest -- i.e. the last redirect. 362 // URLRequest, i.e. reset on redirects, but not reset when multiple roundtrips
363 // are used for range requests or auth.
361 int64 GetTotalReceivedBytes() const; 364 int64 GetTotalReceivedBytes() const;
362 365
366 // Gets the total amount of data sent over the network before SSL encoding and
367 // proxy handling. Pertains only to the last URLRequestJob issued by this
368 // URLRequest, i.e. reset on redirects, but not reset when multiple roundtrips
369 // are used for range requests or auth.
370 int64_t GetTotalSentBytes() const;
371
363 // Returns the current load state for the request. The returned value's 372 // Returns the current load state for the request. The returned value's
364 // |param| field is an optional parameter describing details related to the 373 // |param| field is an optional parameter describing details related to the
365 // load state. Not all load states have a parameter. 374 // load state. Not all load states have a parameter.
366 LoadStateWithParam GetLoadState() const; 375 LoadStateWithParam GetLoadState() const;
367 376
368 // Returns a partial representation of the request's state as a value, for 377 // Returns a partial representation of the request's state as a value, for
369 // debugging. 378 // debugging.
370 scoped_ptr<base::Value> GetStateAsValue() const; 379 scoped_ptr<base::Value> GetStateAsValue() const;
371 380
372 // Logs information about the what external object currently blocking the 381 // Logs information about the what external object currently blocking the
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 HostPortPair proxy_server_; 837 HostPortPair proxy_server_;
829 838
830 scoped_ptr<const base::debug::StackTrace> stack_trace_; 839 scoped_ptr<const base::debug::StackTrace> stack_trace_;
831 840
832 DISALLOW_COPY_AND_ASSIGN(URLRequest); 841 DISALLOW_COPY_AND_ASSIGN(URLRequest);
833 }; 842 };
834 843
835 } // namespace net 844 } // namespace net
836 845
837 #endif // NET_URL_REQUEST_URL_REQUEST_H_ 846 #endif // NET_URL_REQUEST_URL_REQUEST_H_
OLDNEW
« no previous file with comments | « net/http/http_transaction_test_util.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698