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

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

Issue 1314783007: Added and implemented HttpStream::GetTotalSentBytes for basic streams. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/http_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <math.h> // ceil 7 #include <math.h> // ceil
8 #include <stdarg.h> 8 #include <stdarg.h>
9 #include <stdint.h>
mmenke 2015/08/31 22:23:13 nit: Know it was like this before, but there shou
sclittle 2015/09/01 01:21:47 Done.
9 #include <string> 10 #include <string>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/basictypes.h" 13 #include "base/basictypes.h"
13 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
14 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
15 #include "base/files/file_util.h" 16 #include "base/files/file_util.h"
16 #include "base/json/json_writer.h" 17 #include "base/json/json_writer.h"
17 #include "base/logging.h" 18 #include "base/logging.h"
18 #include "base/memory/scoped_ptr.h" 19 #include "base/memory/scoped_ptr.h"
(...skipping 13342 matching lines...) Expand 10 before | Expand all | Expand 10 after
13361 bool IsConnectionReusable() const override { 13362 bool IsConnectionReusable() const override {
13362 ADD_FAILURE(); 13363 ADD_FAILURE();
13363 return false; 13364 return false;
13364 } 13365 }
13365 13366
13366 int64 GetTotalReceivedBytes() const override { 13367 int64 GetTotalReceivedBytes() const override {
13367 ADD_FAILURE(); 13368 ADD_FAILURE();
13368 return 0; 13369 return 0;
13369 } 13370 }
13370 13371
13372 int64_t GetTotalSentBytes() const override {
13373 ADD_FAILURE();
13374 return 0;
13375 }
13376
13371 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override { 13377 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override {
13372 ADD_FAILURE(); 13378 ADD_FAILURE();
13373 return false; 13379 return false;
13374 } 13380 }
13375 13381
13376 void GetSSLInfo(SSLInfo* ssl_info) override { ADD_FAILURE(); } 13382 void GetSSLInfo(SSLInfo* ssl_info) override { ADD_FAILURE(); }
13377 13383
13378 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override { 13384 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {
13379 ADD_FAILURE(); 13385 ADD_FAILURE();
13380 } 13386 }
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
13584 bool IsConnectionReusable() const override { 13590 bool IsConnectionReusable() const override {
13585 NOTREACHED(); 13591 NOTREACHED();
13586 return false; 13592 return false;
13587 } 13593 }
13588 13594
13589 int64 GetTotalReceivedBytes() const override { 13595 int64 GetTotalReceivedBytes() const override {
13590 NOTREACHED(); 13596 NOTREACHED();
13591 return 0; 13597 return 0;
13592 } 13598 }
13593 13599
13600 int64_t GetTotalSentBytes() const override {
13601 NOTREACHED();
13602 return 0;
13603 }
13604
13594 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override { 13605 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override {
13595 NOTREACHED(); 13606 NOTREACHED();
13596 return false; 13607 return false;
13597 } 13608 }
13598 13609
13599 void GetSSLInfo(SSLInfo* ssl_info) override {} 13610 void GetSSLInfo(SSLInfo* ssl_info) override {}
13600 13611
13601 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override { 13612 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {
13602 NOTREACHED(); 13613 NOTREACHED();
13603 } 13614 }
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
14588 ASSERT_TRUE(response); 14599 ASSERT_TRUE(response);
14589 ASSERT_TRUE(response->headers.get()); 14600 ASSERT_TRUE(response->headers.get());
14590 14601
14591 EXPECT_EQ(101, response->headers->response_code()); 14602 EXPECT_EQ(101, response->headers->response_code());
14592 14603
14593 trans.reset(); 14604 trans.reset();
14594 session->CloseAllConnections(); 14605 session->CloseAllConnections();
14595 } 14606 }
14596 14607
14597 } // namespace net 14608 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698