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

Side by Side Diff: net/socket/client_socket_pool_base_unittest.cc

Issue 2235973002: Add a SetDoNotFragment() method to DatagramSocket, and call this for (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Blimp Created 4 years, 4 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/socket/client_socket_pool_base.h" 5 #include "net/socket/client_socket_pool_base.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 148
149 int Write(IOBuffer* /* buf */, 149 int Write(IOBuffer* /* buf */,
150 int len, 150 int len,
151 const CompletionCallback& /* callback */) override { 151 const CompletionCallback& /* callback */) override {
152 was_used_to_convey_data_ = true; 152 was_used_to_convey_data_ = true;
153 return len; 153 return len;
154 } 154 }
155 int SetReceiveBufferSize(int32_t size) override { return OK; } 155 int SetReceiveBufferSize(int32_t size) override { return OK; }
156 int SetSendBufferSize(int32_t size) override { return OK; } 156 int SetSendBufferSize(int32_t size) override { return OK; }
157 int SetDoNotFragment(bool do_not_fragment) override { return OK; }
157 158
158 // StreamSocket implementation. 159 // StreamSocket implementation.
159 int Connect(const CompletionCallback& callback) override { 160 int Connect(const CompletionCallback& callback) override {
160 connected_ = true; 161 connected_ = true;
161 return OK; 162 return OK;
162 } 163 }
163 164
164 void Disconnect() override { connected_ = false; } 165 void Disconnect() override { connected_ = false; }
165 bool IsConnected() const override { return connected_; } 166 bool IsConnected() const override { return connected_; }
166 bool IsConnectedAndIdle() const override { 167 bool IsConnectedAndIdle() const override {
(...skipping 3599 matching lines...) Expand 10 before | Expand all | Expand 10 after
3766 request(1)->handle()->Reset(); 3767 request(1)->handle()->Reset();
3767 ASSERT_EQ(1, pool_->NumConnectJobsInGroup("a")); 3768 ASSERT_EQ(1, pool_->NumConnectJobsInGroup("a"));
3768 3769
3769 EXPECT_THAT(request(2)->WaitForResult(), IsOk()); 3770 EXPECT_THAT(request(2)->WaitForResult(), IsOk());
3770 EXPECT_FALSE(request(1)->have_result()); 3771 EXPECT_FALSE(request(1)->have_result());
3771 } 3772 }
3772 3773
3773 } // namespace 3774 } // namespace
3774 3775
3775 } // namespace net 3776 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698