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

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

Issue 1238343002: Added ConnectionTimeObserver to calculate the times to authenticate and connect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed to ConnectionTimeObserver. Created 5 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_TEST_CONNECTION_TIME_OBSERVER_H_
6 #define REMOTING_TEST_CONNECTION_TIME_OBSERVER_H_
7
8 #include "remoting/test/remote_connection_observer.h"
9
10 namespace remoting {
11 namespace test {
12
13 // Observes and calculates the time between each state change of the chromoting
14 // connection process.
Sergey Ulanov 2015/07/20 23:04:04 And it also logs the calculated values. The purpos
tonychun 2015/07/23 03:31:04 Done.
15 class ConnectionTimeObserver
16 : public RemoteConnectionObserver {
17 public:
18 ConnectionTimeObserver();
19 ~ConnectionTimeObserver() override;
20
21 // RemoteConnectionObserver interface.
22 void ConnectionStateChanged(protocol::ConnectionToHost::State state,
23 protocol::ErrorCode error_code) override;
24
25 private:
26 // Saves the latest state the ChromotingClient is in.
27 protocol::ConnectionToHost::State current_state_;
28
29 // Used to find the time difference between subsequent calls to
30 // ConnectionStateChanged.
31 base::TimeTicks last_state_change_time_ticks;
Sergey Ulanov 2015/07/20 23:04:04 nit: call it last_state_change_time_ or last_state
Sergey Ulanov 2015/07/20 23:04:04 add _ at the end of the name
tonychun 2015/07/23 03:31:04 Done.
32
33 DISALLOW_COPY_AND_ASSIGN(ConnectionTimeObserver);
34 };
35
36 } // namespace test
37 } // namespace remoting
38
39 #endif // REMOTING_TEST_CONNECTION_TIME_OBSERVER_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/test/connection_time_observer.cc » ('j') | remoting/test/connection_time_observer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698