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

Side by Side Diff: remoting/test/connection_time_observer_unittest.cc

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
« no previous file with comments | « remoting/test/codec_perftest.cc ('k') | remoting/test/cyclic_frame_generator.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 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 #include "remoting/test/connection_time_observer.h" 5 #include "remoting/test/connection_time_observer.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 11 matching lines...) Expand all
22 ~ConnectionTimeObserverTest() override; 22 ~ConnectionTimeObserverTest() override;
23 23
24 protected: 24 protected:
25 // Test interface. 25 // Test interface.
26 void SetUp() override; 26 void SetUp() override;
27 27
28 // A map of fake times to calculate TimeDelta between two states. 28 // A map of fake times to calculate TimeDelta between two states.
29 std::map<protocol::ConnectionToHost::State, base::TimeTicks> test_map_; 29 std::map<protocol::ConnectionToHost::State, base::TimeTicks> test_map_;
30 30
31 // Observes and saves the times when the chromoting connection state changes. 31 // Observes and saves the times when the chromoting connection state changes.
32 scoped_ptr<ConnectionTimeObserver> connection_time_observer_; 32 std::unique_ptr<ConnectionTimeObserver> connection_time_observer_;
33 33
34 private: 34 private:
35 DISALLOW_COPY_AND_ASSIGN(ConnectionTimeObserverTest); 35 DISALLOW_COPY_AND_ASSIGN(ConnectionTimeObserverTest);
36 }; 36 };
37 37
38 ConnectionTimeObserverTest::ConnectionTimeObserverTest() { 38 ConnectionTimeObserverTest::ConnectionTimeObserverTest() {
39 } 39 }
40 40
41 ConnectionTimeObserverTest::~ConnectionTimeObserverTest() { 41 ConnectionTimeObserverTest::~ConnectionTimeObserverTest() {
42 } 42 }
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 connection_time_observer_->ConnectionStateChanged( 168 connection_time_observer_->ConnectionStateChanged(
169 protocol::ConnectionToHost::State::CONNECTED, protocol::ErrorCode::OK); 169 protocol::ConnectionToHost::State::CONNECTED, protocol::ErrorCode::OK);
170 170
171 EXPECT_EQ(connection_time_observer_->GetStateTransitionTime( 171 EXPECT_EQ(connection_time_observer_->GetStateTransitionTime(
172 protocol::ConnectionToHost::State::INITIALIZING, 172 protocol::ConnectionToHost::State::INITIALIZING,
173 protocol::ConnectionToHost::State::CONNECTED), first_time_delta); 173 protocol::ConnectionToHost::State::CONNECTED), first_time_delta);
174 } 174 }
175 175
176 } // namespace test 176 } // namespace test
177 } // namespace remoting 177 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/test/codec_perftest.cc ('k') | remoting/test/cyclic_frame_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698