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

Side by Side Diff: ipc/ipc_sync_channel_unittest.cc

Issue 2657005: Get rid of DISALLOW_EVIL_CONSTRUCTORS macro usage in our code base. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: added the macro back Created 10 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
« no previous file with comments | « ipc/ipc_sync_channel.h ('k') | net/base/gzip_filter.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // Unit test for SyncChannel. 5 // Unit test for SyncChannel.
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 scoped_ptr<WaitableEvent> channel_created_; 215 scoped_ptr<WaitableEvent> channel_created_;
216 std::string channel_name_; 216 std::string channel_name_;
217 Channel::Mode mode_; 217 Channel::Mode mode_;
218 scoped_ptr<SyncChannel> channel_; 218 scoped_ptr<SyncChannel> channel_;
219 base::Thread ipc_thread_; 219 base::Thread ipc_thread_;
220 base::Thread listener_thread_; 220 base::Thread listener_thread_;
221 base::Thread* overrided_thread_; 221 base::Thread* overrided_thread_;
222 222
223 base::WaitableEvent shutdown_event_; 223 base::WaitableEvent shutdown_event_;
224 224
225 DISALLOW_EVIL_CONSTRUCTORS(Worker); 225 DISALLOW_COPY_AND_ASSIGN(Worker);
226 }; 226 };
227 227
228 228
229 // Starts the test with the given workers. This function deletes the workers 229 // Starts the test with the given workers. This function deletes the workers
230 // when it's done. 230 // when it's done.
231 void RunTest(std::vector<Worker*> workers) { 231 void RunTest(std::vector<Worker*> workers) {
232 // First we create the workers that are channel servers, or else the other 232 // First we create the workers that are channel servers, or else the other
233 // workers' channel initialization might fail because the pipe isn't created.. 233 // workers' channel initialization might fail because the pipe isn't created..
234 for (size_t i = 0; i < workers.size(); ++i) { 234 for (size_t i = 0; i < workers.size(); ++i) {
235 if (workers[i]->mode() == Channel::MODE_SERVER) { 235 if (workers[i]->mode() == Channel::MODE_SERVER) {
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 1108
1109 } // namespace 1109 } // namespace
1110 1110
1111 // Tests basic synchronous call 1111 // Tests basic synchronous call
1112 TEST_F(IPCSyncChannelTest, SyncMessageFilter) { 1112 TEST_F(IPCSyncChannelTest, SyncMessageFilter) {
1113 std::vector<Worker*> workers; 1113 std::vector<Worker*> workers;
1114 workers.push_back(new SyncMessageFilterServer()); 1114 workers.push_back(new SyncMessageFilterServer());
1115 workers.push_back(new SimpleClient()); 1115 workers.push_back(new SimpleClient());
1116 RunTest(workers); 1116 RunTest(workers);
1117 } 1117 }
OLDNEW
« no previous file with comments | « ipc/ipc_sync_channel.h ('k') | net/base/gzip_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698