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

Side by Side Diff: remoting/test/chromoting_test_fixture.h

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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
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 REMOTING_TEST_CHROMOTING_TEST_FIXTURE_H_ 5 #ifndef REMOTING_TEST_CHROMOTING_TEST_FIXTURE_H_
6 #define REMOTING_TEST_CHROMOTING_TEST_FIXTURE_H_ 6 #define REMOTING_TEST_CHROMOTING_TEST_FIXTURE_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/threading/thread_checker.h" 11 #include "base/threading/thread_checker.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 13
13 namespace base { 14 namespace base {
14 class RunLoop; 15 class RunLoop;
15 class Timer; 16 class Timer;
16 } 17 }
17 18
18 namespace remoting { 19 namespace remoting {
19 namespace test { 20 namespace test {
(...skipping 13 matching lines...) Expand all
33 34
34 // Client initiates a session with a host to establish a chromoting 35 // Client initiates a session with a host to establish a chromoting
35 // connection. Only has |timeout| seconds to connect to host. 36 // connection. Only has |timeout| seconds to connect to host.
36 bool ConnectToHost(const base::TimeDelta& timeout); 37 bool ConnectToHost(const base::TimeDelta& timeout);
37 38
38 // Ends a chromoting connection with the host. 39 // Ends a chromoting connection with the host.
39 void Disconnect(); 40 void Disconnect();
40 41
41 protected: 42 protected:
42 // Observes and saves the times when a chromoting client changes its state. 43 // Observes and saves the times when a chromoting client changes its state.
43 scoped_ptr<ConnectionTimeObserver> connection_time_observer_; 44 std::unique_ptr<ConnectionTimeObserver> connection_time_observer_;
44 45
45 private: 46 private:
46 // testing::Test overrides. 47 // testing::Test overrides.
47 void TearDown() override; 48 void TearDown() override;
48 49
49 // Creates |connection_time_observer_| to attach to |test_chromoting_client_|. 50 // Creates |connection_time_observer_| to attach to |test_chromoting_client_|.
50 void CreateObserver(); 51 void CreateObserver();
51 52
52 // Detaches |connection_time_observer_| and destroys it. 53 // Detaches |connection_time_observer_| and destroys it.
53 void DestroyObserver(); 54 void DestroyObserver();
54 55
55 // Creates and manages the connection to the remote host. 56 // Creates and manages the connection to the remote host.
56 scoped_ptr<TestChromotingClient> test_chromoting_client_; 57 std::unique_ptr<TestChromotingClient> test_chromoting_client_;
57 58
58 base::ThreadChecker thread_checker_; 59 base::ThreadChecker thread_checker_;
59 60
60 DISALLOW_COPY_AND_ASSIGN(ChromotingTestFixture); 61 DISALLOW_COPY_AND_ASSIGN(ChromotingTestFixture);
61 }; 62 };
62 63
63 } // namespace test 64 } // namespace test
64 } // namespace remoting 65 } // namespace remoting
65 66
66 #endif // REMOTING_TEST_CHROMOTING_TEST_FIXTURE_H_ 67 #endif // REMOTING_TEST_CHROMOTING_TEST_FIXTURE_H_
OLDNEW
« no previous file with comments | « remoting/test/chromoting_test_driver_environment_unittest.cc ('k') | remoting/test/codec_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698