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

Side by Side Diff: mojo/edk/system/channel_test_base.h

Issue 1350503005: EDK: Some more scoped_ptr -> std::unique_ptr conversions. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 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/edk/system/channel.cc ('k') | mojo/edk/system/channel_test_base.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef MOJO_EDK_SYSTEM_CHANNEL_TEST_BASE_H_ 5 #ifndef MOJO_EDK_SYSTEM_CHANNEL_TEST_BASE_H_
6 #define MOJO_EDK_SYSTEM_CHANNEL_TEST_BASE_H_ 6 #define MOJO_EDK_SYSTEM_CHANNEL_TEST_BASE_H_
7 7
8 #include <memory>
9
8 #include "base/bind.h" 10 #include "base/bind.h"
9 #include "base/location.h" 11 #include "base/location.h"
10 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "mojo/edk/embedder/simple_platform_support.h" 13 #include "mojo/edk/embedder/simple_platform_support.h"
13 #include "mojo/edk/system/channel.h" 14 #include "mojo/edk/system/channel.h"
14 #include "mojo/edk/test/test_io_thread.h" 15 #include "mojo/edk/test/test_io_thread.h"
15 #include "mojo/public/cpp/system/macros.h" 16 #include "mojo/public/cpp/system/macros.h"
16 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
17 18
18 namespace mojo { 19 namespace mojo {
19 namespace system { 20 namespace system {
20 21
21 class RawChannel; 22 class RawChannel;
(...skipping 25 matching lines...) Expand all
47 48
48 mojo::test::TestIOThread* io_thread() { return &io_thread_; } 49 mojo::test::TestIOThread* io_thread() { return &io_thread_; }
49 Channel* channel(unsigned i) { return channels_[i].get(); } 50 Channel* channel(unsigned i) { return channels_[i].get(); }
50 scoped_refptr<Channel>* mutable_channel(unsigned i) { return &channels_[i]; } 51 scoped_refptr<Channel>* mutable_channel(unsigned i) { return &channels_[i]; }
51 52
52 private: 53 private:
53 void SetUpOnIOThread(); 54 void SetUpOnIOThread();
54 55
55 embedder::SimplePlatformSupport platform_support_; 56 embedder::SimplePlatformSupport platform_support_;
56 mojo::test::TestIOThread io_thread_; 57 mojo::test::TestIOThread io_thread_;
57 scoped_ptr<RawChannel> raw_channels_[2]; 58 std::unique_ptr<RawChannel> raw_channels_[2];
58 scoped_refptr<Channel> channels_[2]; 59 scoped_refptr<Channel> channels_[2];
59 60
60 MOJO_DISALLOW_COPY_AND_ASSIGN(ChannelTestBase); 61 MOJO_DISALLOW_COPY_AND_ASSIGN(ChannelTestBase);
61 }; 62 };
62 63
63 } // namespace test 64 } // namespace test
64 } // namespace system 65 } // namespace system
65 } // namespace mojo 66 } // namespace mojo
66 67
67 #endif // MOJO_EDK_SYSTEM_CHANNEL_TEST_BASE_H_ 68 #endif // MOJO_EDK_SYSTEM_CHANNEL_TEST_BASE_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/channel.cc ('k') | mojo/edk/system/channel_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698