Index: remoting/host/host_extension_session_manager.h |
diff --git a/remoting/host/host_extension_session_manager.h b/remoting/host/host_extension_session_manager.h |
index 6925b8dfcde1adbc15ac581c4aa3ff93921f4004..8c037b3d9a94827c1501d1e6ca08b7b8cdbf95fb 100644 |
--- a/remoting/host/host_extension_session_manager.h |
+++ b/remoting/host/host_extension_session_manager.h |
@@ -5,11 +5,11 @@ |
#ifndef REMOTING_HOST_HOST_EXTENSION_SESSION_MANAGER_H_ |
#define REMOTING_HOST_HOST_EXTENSION_SESSION_MANAGER_H_ |
+#include <memory> |
#include <string> |
#include <vector> |
#include "base/macros.h" |
-#include "base/memory/scoped_vector.h" |
namespace remoting { |
@@ -27,7 +27,7 @@ class ExtensionMessage; |
// set of capabilities negotiated between client and host. |
class HostExtensionSessionManager { |
public: |
- typedef std::vector<HostExtension*> HostExtensions; |
+ using HostExtensions = std::vector<std::unique_ptr<HostExtension>>; |
// Creates an extension manager for the specified |extensions|. |
HostExtensionSessionManager(const HostExtensions& extensions, |
@@ -48,7 +48,8 @@ class HostExtensionSessionManager { |
bool OnExtensionMessage(const protocol::ExtensionMessage& message); |
private: |
- typedef ScopedVector<HostExtensionSession> HostExtensionSessions; |
+ using HostExtensionSessions = |
+ std::vector<std::unique_ptr<HostExtensionSession>>; |
// Passed to HostExtensionSessions to allow them to send messages, |
// disconnect the session, etc. |
@@ -57,7 +58,7 @@ class HostExtensionSessionManager { |
// The HostExtensions to instantiate for the session, if it reaches the |
// authenticated state. |
- HostExtensions extensions_; |
+ const HostExtensions& extensions_; |
Sergey Ulanov
2017/01/10 21:24:54
It's better to make this a pointer (and pass a poi
Avi (use Gerrit)
2017/01/10 23:57:29
Switching to vector of raw pointers; it works bett
|
// The instantiated HostExtensionSessions, used to handle extension messages. |
HostExtensionSessions extension_sessions_; |