summaryrefslogtreecommitdiffstats
path: root/remoting/host/host_port_allocator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/host/host_port_allocator.cc')
-rw-r--r--remoting/host/host_port_allocator.cc22
1 files changed, 13 insertions, 9 deletions
diff --git a/remoting/host/host_port_allocator.cc b/remoting/host/host_port_allocator.cc
index 2ec59e7..ad3a685 100644
--- a/remoting/host/host_port_allocator.cc
+++ b/remoting/host/host_port_allocator.cc
@@ -22,8 +22,9 @@ class HostPortAllocatorSession
public:
HostPortAllocatorSession(
cricket::HttpPortAllocatorBase* allocator,
- const std::string& channel_name,
int component,
+ const std::string& ice_username_fragment,
+ const std::string& ice_password,
const std::vector<talk_base::SocketAddress>& stun_hosts,
const std::vector<std::string>& relay_hosts,
const std::string& relay,
@@ -48,14 +49,16 @@ class HostPortAllocatorSession
HostPortAllocatorSession::HostPortAllocatorSession(
cricket::HttpPortAllocatorBase* allocator,
- const std::string& channel_name,
int component,
+ const std::string& ice_username_fragment,
+ const std::string& ice_password,
const std::vector<talk_base::SocketAddress>& stun_hosts,
const std::vector<std::string>& relay_hosts,
const std::string& relay,
const scoped_refptr<net::URLRequestContextGetter>& url_context)
: HttpPortAllocatorSessionBase(
- allocator, channel_name, component, stun_hosts, relay_hosts, relay, ""),
+ allocator, component, ice_username_fragment, ice_password,
+ stun_hosts, relay_hosts, relay, ""),
url_context_(url_context) {
}
@@ -87,7 +90,7 @@ void HostPortAllocatorSession::SendSessionRequest(const std::string& host,
url_fetcher->SetRequestContext(url_context_);
url_fetcher->SetHeader("X-Talk-Google-Relay-Auth", relay_token());
url_fetcher->SetHeader("X-Google-Relay-Auth", relay_token());
- url_fetcher->SetHeader("X-Stream-Type", channel_name());
+ url_fetcher->SetHeader("X-Stream-Type", "chromoting");
url_fetcher->Start(base::Bind(&HostPortAllocatorSession::OnSessionRequestDone,
base::Unretained(this), url_fetcher.get()));
url_fetchers_.insert(url_fetcher.release());
@@ -154,12 +157,13 @@ HostPortAllocator::HostPortAllocator(
HostPortAllocator::~HostPortAllocator() {
}
-cricket::PortAllocatorSession* HostPortAllocator::CreateSession(
- const std::string& channel_name,
- int component) {
+cricket::PortAllocatorSession* HostPortAllocator::CreateSessionInternal(
+ int component,
+ const std::string& ice_username_fragment,
+ const std::string& ice_password) {
return new HostPortAllocatorSession(
- this, channel_name, component, stun_hosts(),
- relay_hosts(), relay_token(), url_context_);
+ this, component, ice_username_fragment, ice_password,
+ stun_hosts(), relay_hosts(), relay_token(), url_context_);
}
} // namespace remoting