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

Side by Side Diff: remoting/host/host_port_allocator.cc

Issue 15782010: Update remoting/ and jingle/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/host_port_allocator.h" 5 #include "remoting/host/host_port_allocator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 cricket::BasicPortAllocatorSession::ConfigReady(config); 90 cricket::BasicPortAllocatorSession::ConfigReady(config);
91 } 91 }
92 92
93 void HostPortAllocatorSession::SendSessionRequest(const std::string& host, 93 void HostPortAllocatorSession::SendSessionRequest(const std::string& host,
94 int port) { 94 int port) {
95 GURL url("https://" + host + ":" + base::IntToString(port) + 95 GURL url("https://" + host + ":" + base::IntToString(port) +
96 GetSessionRequestUrl() + "&sn=1"); 96 GetSessionRequestUrl() + "&sn=1");
97 scoped_ptr<net::URLFetcher> url_fetcher( 97 scoped_ptr<net::URLFetcher> url_fetcher(
98 net::URLFetcher::Create(url, net::URLFetcher::GET, this)); 98 net::URLFetcher::Create(url, net::URLFetcher::GET, this));
99 url_fetcher->SetRequestContext(url_context_); 99 url_fetcher->SetRequestContext(url_context_.get());
100 url_fetcher->AddExtraRequestHeader( 100 url_fetcher->AddExtraRequestHeader("X-Talk-Google-Relay-Auth: " +
101 "X-Talk-Google-Relay-Auth: " + relay_token()); 101 relay_token());
102 url_fetcher->AddExtraRequestHeader("X-Google-Relay-Auth: " + relay_token()); 102 url_fetcher->AddExtraRequestHeader("X-Google-Relay-Auth: " + relay_token());
103 url_fetcher->AddExtraRequestHeader("X-Stream-Type: chromoting"); 103 url_fetcher->AddExtraRequestHeader("X-Stream-Type: chromoting");
104 url_fetcher->Start(); 104 url_fetcher->Start();
105 url_fetchers_.insert(url_fetcher.release()); 105 url_fetchers_.insert(url_fetcher.release());
106 } 106 }
107 107
108 void HostPortAllocatorSession::OnURLFetchComplete( 108 void HostPortAllocatorSession::OnURLFetchComplete(
109 const net::URLFetcher* source) { 109 const net::URLFetcher* source) {
110 int response_code = source->GetResponseCode(); 110 int response_code = source->GetResponseCode();
111 std::string response; 111 std::string response;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 const std::string& content_name, 176 const std::string& content_name,
177 int component, 177 int component,
178 const std::string& ice_username_fragment, 178 const std::string& ice_username_fragment,
179 const std::string& ice_password) { 179 const std::string& ice_password) {
180 return new HostPortAllocatorSession( 180 return new HostPortAllocatorSession(
181 this, content_name, component, ice_username_fragment, ice_password, 181 this, content_name, component, ice_username_fragment, ice_password,
182 stun_hosts(), relay_hosts(), relay_token(), url_context_); 182 stun_hosts(), relay_hosts(), relay_token(), url_context_);
183 } 183 }
184 184
185 } // namespace remoting 185 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/heartbeat_sender_unittest.cc ('k') | remoting/host/ipc_desktop_environment_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698