diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-22 19:49:21 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-22 19:49:21 +0000 |
commit | 71a0c6be93d9303fcdcf7a6f7f99201a0fa41618 (patch) | |
tree | 3dcc118a2e8296be5230f373e4939c73f69d6821 /remoting/client | |
parent | e101fc3da10d9ac1ab490ae13adbd5d25e74eb9a (diff) | |
download | chromium_src-71a0c6be93d9303fcdcf7a6f7f99201a0fa41618.zip chromium_src-71a0c6be93d9303fcdcf7a6f7f99201a0fa41618.tar.gz chromium_src-71a0c6be93d9303fcdcf7a6f7f99201a0fa41618.tar.bz2 |
Changes needed to roll libjingle r141 to chrome.
1. Setting ice username and password for P2PTransportChannel.
2. Updating XMPP Auth cookie with Auth Token
Review URL: https://chromiumcodereview.appspot.com/10382003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138334 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client')
-rw-r--r-- | remoting/client/plugin/pepper_port_allocator.cc | 27 | ||||
-rw-r--r-- | remoting/client/plugin/pepper_port_allocator.h | 7 |
2 files changed, 19 insertions, 15 deletions
diff --git a/remoting/client/plugin/pepper_port_allocator.cc b/remoting/client/plugin/pepper_port_allocator.cc index e632d57..ae0a3a5 100644 --- a/remoting/client/plugin/pepper_port_allocator.cc +++ b/remoting/client/plugin/pepper_port_allocator.cc @@ -32,8 +32,9 @@ class PepperPortAllocatorSession public: PepperPortAllocatorSession( 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_token, @@ -73,15 +74,16 @@ class PepperPortAllocatorSession PepperPortAllocatorSession::PepperPortAllocatorSession( 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_token, const pp::InstanceHandle& instance) - : cricket::HttpPortAllocatorSessionBase( - allocator, channel_name, component, stun_hosts, - relay_hosts, relay_token, ""), + : HttpPortAllocatorSessionBase( + allocator, component, ice_username_fragment, ice_password, + stun_hosts, relay_hosts, relay_token, ""), instance_(instance), stun_address_resolver_(instance_), stun_port_(0), @@ -204,7 +206,7 @@ void PepperPortAllocatorSession::SendSessionRequest( std::stringstream headers; headers << "X-Talk-Google-Relay-Auth: " << relay_token() << "\n\r"; headers << "X-Google-Relay-Auth: " << relay_token() << "\n\r"; - headers << "X-StreamType: " << channel_name() << "\n\r"; + headers << "X-Stream-Type: " << "chromoting" << "\n\r"; request_info.SetHeaders(headers.str()); int result = relay_url_loader_->Open(request_info, pp::CompletionCallback( @@ -328,12 +330,13 @@ PepperPortAllocator::PepperPortAllocator( PepperPortAllocator::~PepperPortAllocator() { } -cricket::PortAllocatorSession* PepperPortAllocator::CreateSession( - const std::string& channel_name, - int component) { - return new PepperPortAllocatorSession( - this, channel_name, component, stun_hosts(), - relay_hosts(), relay_token(), instance_); +cricket::PortAllocatorSession* PepperPortAllocator::CreateSessionInternal( + int component, + const std::string& ice_username_fragment, + const std::string& ice_password) { + return new PepperPortAllocatorSession( + this, component, ice_username_fragment, ice_password, + stun_hosts(), relay_hosts(), relay_token(), instance_); } } // namespace remoting diff --git a/remoting/client/plugin/pepper_port_allocator.h b/remoting/client/plugin/pepper_port_allocator.h index c9a5dbd..914adde 100644 --- a/remoting/client/plugin/pepper_port_allocator.h +++ b/remoting/client/plugin/pepper_port_allocator.h @@ -28,9 +28,10 @@ class PepperPortAllocator : public cricket::HttpPortAllocatorBase { virtual ~PepperPortAllocator(); // cricket::HttpPortAllocatorBase overrides. - virtual cricket::PortAllocatorSession* CreateSession( - const std::string& channel_name, - int component) OVERRIDE; + virtual cricket::PortAllocatorSession* CreateSessionInternal( + int component, + const std::string& ice_username_fragment, + const std::string& ice_password) OVERRIDE; private: PepperPortAllocator( |