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

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: Add UMA logging of Token Binding support and NetLog event for Token Binding key lookup Created 5 years, 1 month 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 GetProvidedTokenBindingWithKey(
110 const scoped_ptr<crypto::ECPrivateKey>& key,
111 std::string* header_out) override {
112 ADD_FAILURE();
113 return ERR_NOT_IMPLEMENTED;
114 }
109 115
110 // Mocked API 116 // Mocked API
111 int ReadResponseBody(IOBuffer* buf, 117 int ReadResponseBody(IOBuffer* buf,
112 int buf_len, 118 int buf_len,
113 const CompletionCallback& callback) override; 119 const CompletionCallback& callback) override;
114 void Close(bool not_reusable) override { 120 void Close(bool not_reusable) override {
115 CHECK(!closed_); 121 CHECK(!closed_);
116 closed_ = true; 122 closed_ = true;
117 result_waiter_->set_result(not_reusable); 123 result_waiter_->set_result(not_reusable);
118 } 124 }
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 too_many_chunks += 1; // Now it's too large. 309 too_many_chunks += 1; // Now it's too large.
304 310
305 mock_stream_->set_num_chunks(too_many_chunks); 311 mock_stream_->set_num_chunks(too_many_chunks);
306 drainer_->Start(session_.get()); 312 drainer_->Start(session_.get());
307 EXPECT_TRUE(result_waiter_.WaitForResult()); 313 EXPECT_TRUE(result_waiter_.WaitForResult());
308 } 314 }
309 315
310 } // namespace 316 } // namespace
311 317
312 } // namespace net 318 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698