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

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

Issue 403393003: HTTP retry support. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 #include "net/http/http_stream_factory_impl.h" 5 #include "net/http/http_stream_factory_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 const CompletionCallback& callback) OVERRIDE { 78 const CompletionCallback& callback) OVERRIDE {
79 return ERR_IO_PENDING; 79 return ERR_IO_PENDING;
80 } 80 }
81 virtual void Close(bool not_reusable) OVERRIDE {} 81 virtual void Close(bool not_reusable) OVERRIDE {}
82 virtual bool IsResponseBodyComplete() const OVERRIDE { return false; } 82 virtual bool IsResponseBodyComplete() const OVERRIDE { return false; }
83 virtual bool CanFindEndOfResponse() const OVERRIDE { return false; } 83 virtual bool CanFindEndOfResponse() const OVERRIDE { return false; }
84 virtual bool IsConnectionReused() const OVERRIDE { return false; } 84 virtual bool IsConnectionReused() const OVERRIDE { return false; }
85 virtual void SetConnectionReused() OVERRIDE {} 85 virtual void SetConnectionReused() OVERRIDE {}
86 virtual bool IsConnectionReusable() const OVERRIDE { return false; } 86 virtual bool IsConnectionReusable() const OVERRIDE { return false; }
87 virtual int64 GetTotalReceivedBytes() const OVERRIDE { return 0; } 87 virtual int64 GetTotalReceivedBytes() const OVERRIDE { return 0; }
88 virtual int64 GetReceivedBodyLength() const OVERRIDE { return 0; }
89
88 virtual bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const 90 virtual bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const
89 OVERRIDE { 91 OVERRIDE {
90 return false; 92 return false;
91 } 93 }
92 virtual void GetSSLInfo(SSLInfo* ssl_info) OVERRIDE {} 94 virtual void GetSSLInfo(SSLInfo* ssl_info) OVERRIDE {}
93 virtual void GetSSLCertRequestInfo( 95 virtual void GetSSLCertRequestInfo(
94 SSLCertRequestInfo* cert_request_info) OVERRIDE {} 96 SSLCertRequestInfo* cert_request_info) OVERRIDE {}
95 virtual bool IsSpdyHttpStream() const OVERRIDE { return false; } 97 virtual bool IsSpdyHttpStream() const OVERRIDE { return false; }
96 virtual void Drain(HttpNetworkSession* session) OVERRIDE {} 98 virtual void Drain(HttpNetworkSession* session) OVERRIDE {}
97 virtual void SetPriority(RequestPriority priority) OVERRIDE {} 99 virtual void SetPriority(RequestPriority priority) OVERRIDE {}
100 virtual void SetRestartInfo(int64 read_offset, const void* hash,
101 size_t hash_length) OVERRIDE {}
102 virtual void GetHash(void* output, size_t len) OVERRIDE {}
98 103
99 virtual scoped_ptr<WebSocketStream> Upgrade() OVERRIDE { 104 virtual scoped_ptr<WebSocketStream> Upgrade() OVERRIDE {
100 return scoped_ptr<WebSocketStream>(); 105 return scoped_ptr<WebSocketStream>();
101 } 106 }
102 107
103 private: 108 private:
104 const StreamType type_; 109 const StreamType type_;
105 }; 110 };
106 111
107 // HttpStreamFactoryImpl subclass that can wait until a preconnect is complete. 112 // HttpStreamFactoryImpl subclass that can wait until a preconnect is complete.
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); 1310 EXPECT_TRUE(waiter.used_proxy_info().is_direct());
1306 1311
1307 // Make sure there is no orphaned job. it is already canceled. 1312 // Make sure there is no orphaned job. it is already canceled.
1308 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>( 1313 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>(
1309 session->http_stream_factory_for_websocket())->num_orphaned_jobs()); 1314 session->http_stream_factory_for_websocket())->num_orphaned_jobs());
1310 } 1315 }
1311 1316
1312 } // namespace 1317 } // namespace
1313 1318
1314 } // namespace net 1319 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698