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

Side by Side Diff: mojo/system/core_test_base.cc

Issue 140403002: Mojo: Add the ability to hook up a channel to the embedder API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win Created 6 years, 11 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 | « mojo/system/core_impl.cc ('k') | mojo/system/embedder.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "mojo/system/core_test_base.h" 5 #include "mojo/system/core_test_base.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 } 169 }
170 170
171 void CoreTestBase::TearDown() { 171 void CoreTestBase::TearDown() {
172 delete core_; 172 delete core_;
173 core_ = NULL; 173 core_ = NULL;
174 } 174 }
175 175
176 MojoHandle CoreTestBase::CreateMockHandle(CoreTestBase::MockHandleInfo* info) { 176 MojoHandle CoreTestBase::CreateMockHandle(CoreTestBase::MockHandleInfo* info) {
177 CHECK(core_); 177 CHECK(core_);
178 scoped_refptr<MockDispatcher> dispatcher(new MockDispatcher(info)); 178 scoped_refptr<MockDispatcher> dispatcher(new MockDispatcher(info));
179 base::AutoLock locker(core_->handle_table_lock_); 179 return core_->AddDispatcher(dispatcher);
180 return core_->AddDispatcherNoLock(dispatcher);
181 } 180 }
182 181
183 // CoreTestBase_MockHandleInfo ------------------------------------------------- 182 // CoreTestBase_MockHandleInfo -------------------------------------------------
184 183
185 CoreTestBase_MockHandleInfo::CoreTestBase_MockHandleInfo() 184 CoreTestBase_MockHandleInfo::CoreTestBase_MockHandleInfo()
186 : ctor_call_count_(0), 185 : ctor_call_count_(0),
187 dtor_call_count_(0), 186 dtor_call_count_(0),
188 close_call_count_(0), 187 close_call_count_(0),
189 write_message_call_count_(0), 188 write_message_call_count_(0),
190 read_message_call_count_(0), 189 read_message_call_count_(0),
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 337 }
339 338
340 void CoreTestBase_MockHandleInfo::IncrementCancelAllWaitersCallCount() { 339 void CoreTestBase_MockHandleInfo::IncrementCancelAllWaitersCallCount() {
341 base::AutoLock locker(lock_); 340 base::AutoLock locker(lock_);
342 cancel_all_waiters_call_count_++; 341 cancel_all_waiters_call_count_++;
343 } 342 }
344 343
345 } // namespace test 344 } // namespace test
346 } // namespace system 345 } // namespace system
347 } // namespace mojo 346 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/system/core_impl.cc ('k') | mojo/system/embedder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698