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

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

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 years 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
« no previous file with comments | « net/socket/client_socket_pool_base.h ('k') | net/socket/client_socket_pool_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/bind_helpers.h" 12 #include "base/bind_helpers.h"
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/location.h" 14 #include "base/location.h"
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "base/macros.h"
16 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
17 #include "base/memory/scoped_vector.h" 18 #include "base/memory/scoped_vector.h"
18 #include "base/memory/weak_ptr.h" 19 #include "base/memory/weak_ptr.h"
19 #include "base/message_loop/message_loop.h" 20 #include "base/message_loop/message_loop.h"
20 #include "base/run_loop.h" 21 #include "base/run_loop.h"
21 #include "base/single_thread_task_runner.h" 22 #include "base/single_thread_task_runner.h"
22 #include "base/strings/string_number_conversions.h" 23 #include "base/strings/string_number_conversions.h"
23 #include "base/strings/stringprintf.h" 24 #include "base/strings/stringprintf.h"
24 #include "base/thread_task_runner_handle.h" 25 #include "base/thread_task_runner_handle.h"
25 #include "base/threading/platform_thread.h" 26 #include "base/threading/platform_thread.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 145 }
145 return ERR_UNEXPECTED; 146 return ERR_UNEXPECTED;
146 } 147 }
147 148
148 int Write(IOBuffer* /* buf */, 149 int Write(IOBuffer* /* buf */,
149 int len, 150 int len,
150 const CompletionCallback& /* callback */) override { 151 const CompletionCallback& /* callback */) override {
151 was_used_to_convey_data_ = true; 152 was_used_to_convey_data_ = true;
152 return len; 153 return len;
153 } 154 }
154 int SetReceiveBufferSize(int32 size) override { return OK; } 155 int SetReceiveBufferSize(int32_t size) override { return OK; }
155 int SetSendBufferSize(int32 size) override { return OK; } 156 int SetSendBufferSize(int32_t size) override { return OK; }
156 157
157 // StreamSocket implementation. 158 // StreamSocket implementation.
158 int Connect(const CompletionCallback& callback) override { 159 int Connect(const CompletionCallback& callback) override {
159 connected_ = true; 160 connected_ = true;
160 return OK; 161 return OK;
161 } 162 }
162 163
163 void Disconnect() override { connected_ = false; } 164 void Disconnect() override { connected_ = false; }
164 bool IsConnected() const override { return connected_; } 165 bool IsConnected() const override { return connected_; }
165 bool IsConnectedAndIdle() const override { 166 bool IsConnectedAndIdle() const override {
(...skipping 3920 matching lines...) Expand 10 before | Expand all | Expand 10 after
4086 request(1)->handle()->Reset(); 4087 request(1)->handle()->Reset();
4087 ASSERT_EQ(1, pool_->NumConnectJobsInGroup("a")); 4088 ASSERT_EQ(1, pool_->NumConnectJobsInGroup("a"));
4088 4089
4089 EXPECT_EQ(OK, request(2)->WaitForResult()); 4090 EXPECT_EQ(OK, request(2)->WaitForResult());
4090 EXPECT_FALSE(request(1)->have_result()); 4091 EXPECT_FALSE(request(1)->have_result());
4091 } 4092 }
4092 4093
4093 } // namespace 4094 } // namespace
4094 4095
4095 } // namespace net 4096 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/client_socket_pool_base.h ('k') | net/socket/client_socket_pool_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698