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

Side by Side Diff: net/curvecp/test_client.cc

Issue 6993015: Add unit-tests for SingleRequestHostResolver. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Try to re-upload cuz patch not applying on commit bot... Created 9 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/base/single_request_host_resolver_unittest.cc ('k') | net/ftp/ftp_network_transaction.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/curvecp/test_client.h" 5 #include "net/curvecp/test_client.h"
6 6
7 #include <string> 7 #include <string>
8 #include <deque> 8 #include <deque>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "net/base/address_list.h" 13 #include "net/base/address_list.h"
14 #include "net/base/host_resolver.h" 14 #include "net/base/host_resolver.h"
15 #include "net/base/io_buffer.h" 15 #include "net/base/io_buffer.h"
16 #include "net/base/net_errors.h" 16 #include "net/base/net_errors.h"
17 #include "net/base/net_log.h" 17 #include "net/base/net_log.h"
18 #include "net/base/single_request_host_resolver.h"
18 #include "net/curvecp/curvecp_client_socket.h" 19 #include "net/curvecp/curvecp_client_socket.h"
19 20
20 namespace net { 21 namespace net {
21 22
22 TestClient::TestClient() 23 TestClient::TestClient()
23 : socket_(NULL), 24 : socket_(NULL),
24 errors_(0), 25 errors_(0),
25 bytes_to_send_(0), 26 bytes_to_send_(0),
26 ALLOW_THIS_IN_INITIALIZER_LIST( 27 ALLOW_THIS_IN_INITIALIZER_LIST(
27 connect_callback_(this, &TestClient::OnConnectComplete)), 28 connect_callback_(this, &TestClient::OnConnectComplete)),
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 void TestClient::Finish(int result) { 170 void TestClient::Finish(int result) {
170 DCHECK(finished_callback_); 171 DCHECK(finished_callback_);
171 172
172 LOG(ERROR) << "TestClient Done!"; 173 LOG(ERROR) << "TestClient Done!";
173 CompletionCallback* callback = finished_callback_; 174 CompletionCallback* callback = finished_callback_;
174 finished_callback_ = NULL; 175 finished_callback_ = NULL;
175 callback->Run(result); 176 callback->Run(result);
176 } 177 }
177 178
178 } // namespace net 179 } // namespace net
OLDNEW
« no previous file with comments | « net/base/single_request_host_resolver_unittest.cc ('k') | net/ftp/ftp_network_transaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698