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

Unified Diff: remoting/host/chromoting_host.h

Issue 2420183002: Don't use barcodes in ProtocolPerfTests (Closed)
Patch Set: Update ChromotingHost::OnSessionAuthenticated() to fix test crash Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/host/chromoting_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host.h
diff --git a/remoting/host/chromoting_host.h b/remoting/host/chromoting_host.h
index 5186988f0b9eda0052080b9df28fe84248b003e5..01a6d1715d8b0dc371e9523d62c023413129d971 100644
--- a/remoting/host/chromoting_host.h
+++ b/remoting/host/chromoting_host.h
@@ -5,9 +5,9 @@
#ifndef REMOTING_HOST_CHROMOTING_HOST_H_
#define REMOTING_HOST_CHROMOTING_HOST_H_
-#include <list>
#include <memory>
#include <string>
+#include <vector>
#include "base/macros.h"
#include "base/memory/ref_counted.h"
@@ -66,6 +66,8 @@ class ChromotingHost : public base::NonThreadSafe,
public ClientSession::EventHandler,
public HostStatusMonitor {
public:
+ typedef std::vector<std::unique_ptr<ClientSession>> ClientSessions;
+
// |desktop_environment_factory| must outlive this object.
ChromotingHost(
DesktopEnvironmentFactory* desktop_environment_factory,
@@ -133,6 +135,8 @@ class ChromotingHost : public base::NonThreadSafe,
pairing_registry_ = pairing_registry;
}
+ const ClientSessions& client_sessions_for_tests() { return clients_; }
+
base::WeakPtr<ChromotingHost> AsWeakPtr() {
return weak_factory_.GetWeakPtr();
}
@@ -140,7 +144,6 @@ class ChromotingHost : public base::NonThreadSafe,
private:
friend class ChromotingHostTest;
- typedef std::list<ClientSession*> ClientList;
typedef ScopedVector<HostExtension> HostExtensionList;
// Immediately disconnects all active clients. Host-internal components may
@@ -162,7 +165,7 @@ class ChromotingHost : public base::NonThreadSafe,
base::ObserverList<HostStatusObserver> status_observers_;
// The connections to remote clients.
- ClientList clients_;
+ ClientSessions clients_;
// True if the host has been started.
bool started_;
« no previous file with comments | « no previous file | remoting/host/chromoting_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698