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

Side by Side Diff: net/http/failing_http_transaction_factory.cc

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
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/http/failing_http_transaction_factory.h" 5 #include "net/http/failing_http_transaction_factory.h"
6 6
7 #include <stdint.h>
8
7 #include "base/bind.h" 9 #include "base/bind.h"
8 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
9 #include "base/location.h" 11 #include "base/location.h"
10 #include "base/logging.h" 12 #include "base/logging.h"
11 #include "base/single_thread_task_runner.h" 13 #include "base/single_thread_task_runner.h"
12 #include "base/thread_task_runner_handle.h" 14 #include "base/thread_task_runner_handle.h"
13 #include "net/base/load_timing_info.h" 15 #include "net/base/load_timing_info.h"
14 #include "net/base/upload_progress.h" 16 #include "net/base/upload_progress.h"
15 #include "net/http/http_response_info.h" 17 #include "net/http/http_response_info.h"
16 #include "net/socket/connection_attempts.h" 18 #include "net/socket/connection_attempts.h"
(...skipping 25 matching lines...) Expand all
42 const CompletionCallback& callback) override; 44 const CompletionCallback& callback) override;
43 int RestartWithAuth(const AuthCredentials& credentials, 45 int RestartWithAuth(const AuthCredentials& credentials,
44 const CompletionCallback& callback) override; 46 const CompletionCallback& callback) override;
45 bool IsReadyToRestartForAuth() override; 47 bool IsReadyToRestartForAuth() override;
46 int Read(IOBuffer* buf, 48 int Read(IOBuffer* buf,
47 int buf_len, 49 int buf_len,
48 const CompletionCallback& callback) override; 50 const CompletionCallback& callback) override;
49 void StopCaching() override; 51 void StopCaching() override;
50 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override; 52 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override;
51 int64 GetTotalReceivedBytes() const override; 53 int64 GetTotalReceivedBytes() const override;
54 int64_t GetTotalSentBytes() const override;
52 void DoneReading() override; 55 void DoneReading() override;
53 const HttpResponseInfo* GetResponseInfo() const override; 56 const HttpResponseInfo* GetResponseInfo() const override;
54 LoadState GetLoadState() const override; 57 LoadState GetLoadState() const override;
55 UploadProgress GetUploadProgress() const override; 58 UploadProgress GetUploadProgress() const override;
56 void SetQuicServerInfo(QuicServerInfo* quic_server_info) override; 59 void SetQuicServerInfo(QuicServerInfo* quic_server_info) override;
57 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; 60 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
58 void SetPriority(RequestPriority priority) override; 61 void SetPriority(RequestPriority priority) override;
59 void SetWebSocketHandshakeStreamCreateHelper( 62 void SetWebSocketHandshakeStreamCreateHelper(
60 WebSocketHandshakeStreamBase::CreateHelper* create_helper) override; 63 WebSocketHandshakeStreamBase::CreateHelper* create_helper) override;
61 void SetBeforeNetworkStartCallback( 64 void SetBeforeNetworkStartCallback(
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 118
116 bool FailingHttpTransaction::GetFullRequestHeaders( 119 bool FailingHttpTransaction::GetFullRequestHeaders(
117 HttpRequestHeaders* headers) const { 120 HttpRequestHeaders* headers) const {
118 return false; 121 return false;
119 } 122 }
120 123
121 int64 FailingHttpTransaction::GetTotalReceivedBytes() const { 124 int64 FailingHttpTransaction::GetTotalReceivedBytes() const {
122 return 0; 125 return 0;
123 } 126 }
124 127
128 int64_t FailingHttpTransaction::GetTotalSentBytes() const {
129 return 0;
130 }
131
125 void FailingHttpTransaction::DoneReading() { 132 void FailingHttpTransaction::DoneReading() {
126 NOTREACHED(); 133 NOTREACHED();
127 } 134 }
128 135
129 const HttpResponseInfo* FailingHttpTransaction::GetResponseInfo() const { 136 const HttpResponseInfo* FailingHttpTransaction::GetResponseInfo() const {
130 return &response_; 137 return &response_;
131 } 138 }
132 139
133 LoadState FailingHttpTransaction::GetLoadState() const { 140 LoadState FailingHttpTransaction::GetLoadState() const {
134 return LOAD_STATE_IDLE; 141 return LOAD_STATE_IDLE;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 HttpCache* FailingHttpTransactionFactory::GetCache() { 200 HttpCache* FailingHttpTransactionFactory::GetCache() {
194 return NULL; 201 return NULL;
195 } 202 }
196 203
197 HttpNetworkSession* FailingHttpTransactionFactory::GetSession() { 204 HttpNetworkSession* FailingHttpTransactionFactory::GetSession() {
198 return session_; 205 return session_;
199 } 206 }
200 207
201 } // namespace net 208 } // namespace net
202 209
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_network_transaction.cc ('k') | net/http/http_cache_transaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698