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

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

Issue 136343004: Mojo: Add a "GetType()" to Dispatchers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | « no previous file | mojo/system/data_pipe_consumer_dispatcher.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 12 matching lines...) Expand all
23 // MockDispatcher -------------------------------------------------------------- 23 // MockDispatcher --------------------------------------------------------------
24 24
25 class MockDispatcher : public Dispatcher { 25 class MockDispatcher : public Dispatcher {
26 public: 26 public:
27 explicit MockDispatcher(CoreTestBase::MockHandleInfo* info) 27 explicit MockDispatcher(CoreTestBase::MockHandleInfo* info)
28 : info_(info) { 28 : info_(info) {
29 CHECK(info_); 29 CHECK(info_);
30 info_->IncrementCtorCallCount(); 30 info_->IncrementCtorCallCount();
31 } 31 }
32 32
33 virtual Type GetType() OVERRIDE {
34 return kTypeUnknown;
35 }
36
33 private: 37 private:
34 friend class base::RefCountedThreadSafe<MockDispatcher>; 38 friend class base::RefCountedThreadSafe<MockDispatcher>;
35 virtual ~MockDispatcher() { 39 virtual ~MockDispatcher() {
36 info_->IncrementDtorCallCount(); 40 info_->IncrementDtorCallCount();
37 } 41 }
38 42
39 // |Dispatcher| implementation/overrides: 43 // |Dispatcher| implementation/overrides:
40 virtual MojoResult CloseImplNoLock() OVERRIDE { 44 virtual MojoResult CloseImplNoLock() OVERRIDE {
41 info_->IncrementCloseCallCount(); 45 info_->IncrementCloseCallCount();
42 lock().AssertAcquired(); 46 lock().AssertAcquired();
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 } 341 }
338 342
339 void CoreTestBase_MockHandleInfo::IncrementCancelAllWaitersCallCount() { 343 void CoreTestBase_MockHandleInfo::IncrementCancelAllWaitersCallCount() {
340 base::AutoLock locker(lock_); 344 base::AutoLock locker(lock_);
341 cancel_all_waiters_call_count_++; 345 cancel_all_waiters_call_count_++;
342 } 346 }
343 347
344 } // namespace test 348 } // namespace test
345 } // namespace system 349 } // namespace system
346 } // namespace mojo 350 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | mojo/system/data_pipe_consumer_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698