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

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: Addressed mmenke comments 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>
10
9 #include <string> 11 #include <string>
10 #include <vector> 12 #include <vector>
11 13
12 #include "base/basictypes.h" 14 #include "base/basictypes.h"
13 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
14 #include "base/files/file_path.h" 16 #include "base/files/file_path.h"
15 #include "base/files/file_util.h" 17 #include "base/files/file_util.h"
16 #include "base/json/json_writer.h" 18 #include "base/json/json_writer.h"
17 #include "base/logging.h" 19 #include "base/logging.h"
18 #include "base/memory/scoped_ptr.h" 20 #include "base/memory/scoped_ptr.h"
(...skipping 13342 matching lines...) Expand 10 before | Expand all | Expand 10 after
13361 bool IsConnectionReusable() const override { 13363 bool IsConnectionReusable() const override {
13362 ADD_FAILURE(); 13364 ADD_FAILURE();
13363 return false; 13365 return false;
13364 } 13366 }
13365 13367
13366 int64 GetTotalReceivedBytes() const override { 13368 int64 GetTotalReceivedBytes() const override {
13367 ADD_FAILURE(); 13369 ADD_FAILURE();
13368 return 0; 13370 return 0;
13369 } 13371 }
13370 13372
13373 int64_t GetTotalSentBytes() const override {
13374 ADD_FAILURE();
13375 return 0;
13376 }
13377
13371 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override { 13378 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override {
13372 ADD_FAILURE(); 13379 ADD_FAILURE();
13373 return false; 13380 return false;
13374 } 13381 }
13375 13382
13376 void GetSSLInfo(SSLInfo* ssl_info) override { ADD_FAILURE(); } 13383 void GetSSLInfo(SSLInfo* ssl_info) override { ADD_FAILURE(); }
13377 13384
13378 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override { 13385 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {
13379 ADD_FAILURE(); 13386 ADD_FAILURE();
13380 } 13387 }
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
13584 bool IsConnectionReusable() const override { 13591 bool IsConnectionReusable() const override {
13585 NOTREACHED(); 13592 NOTREACHED();
13586 return false; 13593 return false;
13587 } 13594 }
13588 13595
13589 int64 GetTotalReceivedBytes() const override { 13596 int64 GetTotalReceivedBytes() const override {
13590 NOTREACHED(); 13597 NOTREACHED();
13591 return 0; 13598 return 0;
13592 } 13599 }
13593 13600
13601 int64_t GetTotalSentBytes() const override {
13602 NOTREACHED();
13603 return 0;
13604 }
13605
13594 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override { 13606 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override {
13595 NOTREACHED(); 13607 NOTREACHED();
13596 return false; 13608 return false;
13597 } 13609 }
13598 13610
13599 void GetSSLInfo(SSLInfo* ssl_info) override {} 13611 void GetSSLInfo(SSLInfo* ssl_info) override {}
13600 13612
13601 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override { 13613 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {
13602 NOTREACHED(); 13614 NOTREACHED();
13603 } 13615 }
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
14588 ASSERT_TRUE(response); 14600 ASSERT_TRUE(response);
14589 ASSERT_TRUE(response->headers.get()); 14601 ASSERT_TRUE(response->headers.get());
14590 14602
14591 EXPECT_EQ(101, response->headers->response_code()); 14603 EXPECT_EQ(101, response->headers->response_code());
14592 14604
14593 trans.reset(); 14605 trans.reset();
14594 session->CloseAllConnections(); 14606 session->CloseAllConnections();
14595 } 14607 }
14596 14608
14597 } // namespace net 14609 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698