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

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

Issue 1378613004: Set Token-Binding HTTP header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tb-tls-ext-new
Patch Set: rebase Created 5 years, 2 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_response_body_drainer.h" 5 #include "net/http/http_response_body_drainer.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <cstring> 9 #include <cstring>
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 99 }
100 100
101 bool IsConnectionReused() const override { return false; } 101 bool IsConnectionReused() const override { return false; }
102 void SetConnectionReused() override {} 102 void SetConnectionReused() override {}
103 bool CanReuseConnection() const override { return false; } 103 bool CanReuseConnection() const override { return false; }
104 int64_t GetTotalReceivedBytes() const override { return 0; } 104 int64_t GetTotalReceivedBytes() const override { return 0; }
105 int64_t GetTotalSentBytes() const override { return 0; } 105 int64_t GetTotalSentBytes() const override { return 0; }
106 void GetSSLInfo(SSLInfo* ssl_info) override {} 106 void GetSSLInfo(SSLInfo* ssl_info) override {}
107 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {} 107 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {}
108 bool GetRemoteEndpoint(IPEndPoint* endpoint) override { return false; } 108 bool GetRemoteEndpoint(IPEndPoint* endpoint) override { return false; }
109 int GetTokenBindingMessageHeader(std::string* out) override {
110 return ERR_NOT_IMPLEMENTED;
111 }
109 112
110 // Mocked API 113 // Mocked API
111 int ReadResponseBody(IOBuffer* buf, 114 int ReadResponseBody(IOBuffer* buf,
112 int buf_len, 115 int buf_len,
113 const CompletionCallback& callback) override; 116 const CompletionCallback& callback) override;
114 void Close(bool not_reusable) override { 117 void Close(bool not_reusable) override {
115 CHECK(!closed_); 118 CHECK(!closed_);
116 closed_ = true; 119 closed_ = true;
117 result_waiter_->set_result(not_reusable); 120 result_waiter_->set_result(not_reusable);
118 } 121 }
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 too_many_chunks += 1; // Now it's too large. 306 too_many_chunks += 1; // Now it's too large.
304 307
305 mock_stream_->set_num_chunks(too_many_chunks); 308 mock_stream_->set_num_chunks(too_many_chunks);
306 drainer_->Start(session_.get()); 309 drainer_->Start(session_.get());
307 EXPECT_TRUE(result_waiter_.WaitForResult()); 310 EXPECT_TRUE(result_waiter_.WaitForResult());
308 } 311 }
309 312
310 } // namespace 313 } // namespace
311 314
312 } // namespace net 315 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_request_headers.cc ('k') | net/http/http_stream.h » ('j') | net/http/http_stream.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698