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

Side by Side Diff: remoting/host/host_status_service.h

Issue 11362267: Add status service for remoting host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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_HOST_HOST_STATUS_SERVICE_H_
6 #define REMOTING_HOST_HOST_STATUS_SERVICE_H_
7
8 #include <string>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "remoting/host/websocket_listener.h"
12
13 namespace base {
14 class DictionaryValue;
15 } // namespace remoting
16
17 namespace remoting {
18
19 class HostStatusService {
alexeypa (please no reviews) 2012/11/15 19:45:56 nit: Add a comment explaining what is this class f
Sergey Ulanov 2012/11/16 00:52:10 Done.
20 public:
21 HostStatusService();
22 ~HostStatusService();
23
24 void SetState(bool started, const std::string& host_id);
alexeypa (please no reviews) 2012/11/15 19:45:56 nit: Add a comment explaining what this method doe
Wez 2012/11/15 23:34:59 nit: I think it's cleaner to have two separate set
Sergey Ulanov 2012/11/16 00:52:10 Done.
Sergey Ulanov 2012/11/16 00:52:10 Done.
25
26 private:
27 class Connection;
Wez 2012/11/15 23:34:59 We seem to be re-inventing the socket-server wheel
Sergey Ulanov 2012/11/16 00:52:10 I'm not sure what you mean. We need to allow multi
28 friend class Connection;
29
30 bool IsAllowedOrigin(const std::string& origin);
alexeypa (please no reviews) 2012/11/15 19:45:56 nit: Add a comment explaining what this method doe
Sergey Ulanov 2012/11/16 00:52:10 Added, but I think the name of the method is descr
Wez 2012/11/20 05:55:53 What I meant was a comment like "Returns true if |
Sergey Ulanov 2012/11/22 00:29:35 Done.
31
32 // Callback for WebsocketListener.
33 void OnNewConnection(scoped_ptr<WebsocketConnection> connection);
34
35 // Called from Connection instances.
36 void OnConnectionClosed(Connection* connection);
37 scoped_ptr<base::DictionaryValue> GetStatusMessage();
alexeypa (please no reviews) 2012/11/15 19:45:56 nit: Add a comment explaining what this method doe
Wez 2012/11/15 23:34:59 And similarly the comments for OnFoo should descri
Sergey Ulanov 2012/11/16 00:52:10 Done.
Sergey Ulanov 2012/11/16 00:52:10 Done.
38
39 WebsocketListener websocket_listener_;
alexeypa (please no reviews) 2012/11/15 19:45:56 nit: Add comments explaining what these member var
Sergey Ulanov 2012/11/16 00:52:10 The purpose of |websocket_listener_| and |connecti
40 std::string host_name_;
Wez 2012/11/15 23:34:59 nit: Add a comment explaining what this is used fo
Sergey Ulanov 2012/11/16 00:52:10 Done. Renamed to service_host_name_
41 std::set<Connection*> connections_;
42
43 bool started_;
44 std::string host_id_;
Wez 2012/11/15 23:34:59 nit: Add a comment e.g. "State values to provide t
Sergey Ulanov 2012/11/16 00:52:10 Done.
45
46 DISALLOW_COPY_AND_ASSIGN(HostStatusService);
47 };
48
49 } // namespace remoting
50
51 #endif // REMOTING_HOST_HOST_STATUS_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/host_status_service.cc » ('j') | remoting/host/host_status_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698