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

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

Issue 611733002: Mojo: Convert OVERRIDE -> override in mojo/{embedder,system}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « mojo/system/simple_dispatcher.h ('k') | mojo/system/waiter_test_utils.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 // NOTE(vtl): Some of these tests are inherently flaky (e.g., if run on a 5 // NOTE(vtl): Some of these tests are inherently flaky (e.g., if run on a
6 // heavily-loaded system). Sorry. |test::EpsilonTimeout()| may be increased to 6 // heavily-loaded system). Sorry. |test::EpsilonTimeout()| may be increased to
7 // increase tolerance and reduce observed flakiness (though doing so reduces the 7 // increase tolerance and reduce observed flakiness (though doing so reduces the
8 // meaningfulness of the test). 8 // meaningfulness of the test).
9 9
10 #include "mojo/system/simple_dispatcher.h" 10 #include "mojo/system/simple_dispatcher.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 CHECK_EQ(new_satisfiable_signals & state_.satisfied_signals, 53 CHECK_EQ(new_satisfiable_signals & state_.satisfied_signals,
54 state_.satisfied_signals); 54 state_.satisfied_signals);
55 55
56 if (new_satisfiable_signals == state_.satisfiable_signals) 56 if (new_satisfiable_signals == state_.satisfiable_signals)
57 return; 57 return;
58 58
59 state_.satisfiable_signals = new_satisfiable_signals; 59 state_.satisfiable_signals = new_satisfiable_signals;
60 HandleSignalsStateChangedNoLock(); 60 HandleSignalsStateChangedNoLock();
61 } 61 }
62 62
63 virtual Type GetType() const OVERRIDE { return kTypeUnknown; } 63 virtual Type GetType() const override { return kTypeUnknown; }
64 64
65 private: 65 private:
66 friend class base::RefCountedThreadSafe<MockSimpleDispatcher>; 66 friend class base::RefCountedThreadSafe<MockSimpleDispatcher>;
67 virtual ~MockSimpleDispatcher() {} 67 virtual ~MockSimpleDispatcher() {}
68 68
69 virtual scoped_refptr<Dispatcher> 69 virtual scoped_refptr<Dispatcher>
70 CreateEquivalentDispatcherAndCloseImplNoLock() OVERRIDE { 70 CreateEquivalentDispatcherAndCloseImplNoLock() override {
71 scoped_refptr<MockSimpleDispatcher> rv(new MockSimpleDispatcher()); 71 scoped_refptr<MockSimpleDispatcher> rv(new MockSimpleDispatcher());
72 rv->state_ = state_; 72 rv->state_ = state_;
73 return scoped_refptr<Dispatcher>(rv.get()); 73 return scoped_refptr<Dispatcher>(rv.get());
74 } 74 }
75 75
76 // |Dispatcher| override: 76 // |Dispatcher| override:
77 virtual HandleSignalsState GetHandleSignalsStateImplNoLock() const OVERRIDE { 77 virtual HandleSignalsState GetHandleSignalsStateImplNoLock() const override {
78 lock().AssertAcquired(); 78 lock().AssertAcquired();
79 return state_; 79 return state_;
80 } 80 }
81 81
82 // Protected by |lock()|: 82 // Protected by |lock()|:
83 HandleSignalsState state_; 83 HandleSignalsState state_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(MockSimpleDispatcher); 85 DISALLOW_COPY_AND_ASSIGN(MockSimpleDispatcher);
86 }; 86 };
87 87
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 // Since we closed before joining, we can't say much about what each thread 660 // Since we closed before joining, we can't say much about what each thread
661 // saw as the state. 661 // saw as the state.
662 } 662 }
663 } 663 }
664 664
665 // TODO(vtl): Stress test? 665 // TODO(vtl): Stress test?
666 666
667 } // namespace 667 } // namespace
668 } // namespace system 668 } // namespace system
669 } // namespace mojo 669 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/system/simple_dispatcher.h ('k') | mojo/system/waiter_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698