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

Unified Diff: remoting/host/chromoting_host.cc

Issue 2627433003: Remove ScopedVector from remoting/. (Closed)
Patch Set: rev Created 3 years, 11 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 | « remoting/host/chromoting_host.h ('k') | remoting/host/host_extension_session_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host.cc
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index 65727137b934e82d076909e164840c4a5f2e9171..238b618c91af91976ffed6dfaef2fc9e3f9c5994 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -125,7 +125,7 @@ void ChromotingHost::RemoveStatusObserver(HostStatusObserver* observer) {
}
void ChromotingHost::AddExtension(std::unique_ptr<HostExtension> extension) {
- extensions_.push_back(extension.release());
+ extensions_.push_back(std::move(extension));
}
void ChromotingHost::SetAuthenticatorFactory(
@@ -259,9 +259,12 @@ void ChromotingHost::OnIncomingSession(
DesktopEnvironmentOptions options = desktop_environment_options_;
// TODO(zijiehe): Apply HostSessionOptions to options.
// Create a ClientSession object.
+ std::vector<HostExtension*> extension_ptrs;
+ for (const auto& extension : extensions_)
+ extension_ptrs.push_back(extension.get());
clients_.push_back(base::MakeUnique<ClientSession>(
this, std::move(connection), desktop_environment_factory_, options,
- max_session_duration_, pairing_registry_, extensions_.get()));
+ max_session_duration_, pairing_registry_, extension_ptrs));
}
} // namespace remoting
« no previous file with comments | « remoting/host/chromoting_host.h ('k') | remoting/host/host_extension_session_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698