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

Side by Side Diff: mojo/edk/system/dispatcher_unittest.cc

Issue 1423713009: EDK: Move ref counting classes to mojo/edk/util. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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/edk/system/dispatcher.cc ('k') | mojo/edk/system/endpoint_relayer.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/edk/system/dispatcher.h" 5 #include "mojo/edk/system/dispatcher.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "mojo/edk/embedder/platform_shared_buffer.h" 11 #include "mojo/edk/embedder/platform_shared_buffer.h"
12 #include "mojo/edk/system/memory.h" 12 #include "mojo/edk/system/memory.h"
13 #include "mojo/edk/system/ref_ptr.h"
14 #include "mojo/edk/system/test/simple_test_thread.h" 13 #include "mojo/edk/system/test/simple_test_thread.h"
15 #include "mojo/edk/system/waitable_event.h" 14 #include "mojo/edk/system/waitable_event.h"
16 #include "mojo/edk/system/waiter.h" 15 #include "mojo/edk/system/waiter.h"
17 #include "mojo/edk/util/make_unique.h" 16 #include "mojo/edk/util/make_unique.h"
17 #include "mojo/edk/util/ref_ptr.h"
18 #include "mojo/public/cpp/system/macros.h" 18 #include "mojo/public/cpp/system/macros.h"
19 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
20 20
21 using mojo::util::MakeRefCounted;
22 using mojo::util::RefPtr;
23
21 namespace mojo { 24 namespace mojo {
22 namespace system { 25 namespace system {
23 namespace { 26 namespace {
24 27
25 // Trivial subclass that makes the constructor public. 28 // Trivial subclass that makes the constructor public.
26 class TrivialDispatcher final : public Dispatcher { 29 class TrivialDispatcher final : public Dispatcher {
27 public: 30 public:
28 // Note: Use |MakeRefCounted<TrivialDispatcher>()|. 31 // Note: Use |MakeRefCounted<TrivialDispatcher>()|.
29 32
30 Type GetType() const override { return Type::UNKNOWN; } 33 Type GetType() const override { return Type::UNKNOWN; }
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 event.Signal(); 305 event.Signal();
303 } // Joins all the threads. 306 } // Joins all the threads.
304 307
305 EXPECT_EQ(MOJO_RESULT_OK, d->Close()); 308 EXPECT_EQ(MOJO_RESULT_OK, d->Close());
306 } 309 }
307 } 310 }
308 311
309 } // namespace 312 } // namespace
310 } // namespace system 313 } // namespace system
311 } // namespace mojo 314 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/dispatcher.cc ('k') | mojo/edk/system/endpoint_relayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698