OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/protocol/chromium_port_allocator.h" | 5 #include "remoting/protocol/chromium_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/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "net/http/http_status_code.h" | 10 #include "net/http/http_status_code.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 ChromiumPortAllocatorSession( | 27 ChromiumPortAllocatorSession( |
28 cricket::HttpPortAllocatorBase* allocator, | 28 cricket::HttpPortAllocatorBase* allocator, |
29 const std::string& content_name, | 29 const std::string& content_name, |
30 int component, | 30 int component, |
31 const std::string& ice_username_fragment, | 31 const std::string& ice_username_fragment, |
32 const std::string& ice_password, | 32 const std::string& ice_password, |
33 const std::vector<rtc::SocketAddress>& stun_hosts, | 33 const std::vector<rtc::SocketAddress>& stun_hosts, |
34 const std::vector<std::string>& relay_hosts, | 34 const std::vector<std::string>& relay_hosts, |
35 const std::string& relay, | 35 const std::string& relay, |
36 const scoped_refptr<net::URLRequestContextGetter>& url_context); | 36 const scoped_refptr<net::URLRequestContextGetter>& url_context); |
37 virtual ~ChromiumPortAllocatorSession(); | 37 ~ChromiumPortAllocatorSession() override; |
38 | 38 |
39 // cricket::HttpPortAllocatorBase overrides. | 39 // cricket::HttpPortAllocatorBase overrides. |
40 virtual void ConfigReady(cricket::PortConfiguration* config) override; | 40 void ConfigReady(cricket::PortConfiguration* config) override; |
41 virtual void SendSessionRequest(const std::string& host, int port) override; | 41 void SendSessionRequest(const std::string& host, int port) override; |
42 | 42 |
43 // net::URLFetcherDelegate interface. | 43 // net::URLFetcherDelegate interface. |
44 virtual void OnURLFetchComplete(const net::URLFetcher* url_fetcher) override; | 44 void OnURLFetchComplete(const net::URLFetcher* url_fetcher) override; |
45 | 45 |
46 private: | 46 private: |
47 scoped_refptr<net::URLRequestContextGetter> url_context_; | 47 scoped_refptr<net::URLRequestContextGetter> url_context_; |
48 std::set<const net::URLFetcher*> url_fetchers_; | 48 std::set<const net::URLFetcher*> url_fetchers_; |
49 | 49 |
50 DISALLOW_COPY_AND_ASSIGN(ChromiumPortAllocatorSession); | 50 DISALLOW_COPY_AND_ASSIGN(ChromiumPortAllocatorSession); |
51 }; | 51 }; |
52 | 52 |
53 ChromiumPortAllocatorSession::ChromiumPortAllocatorSession( | 53 ChromiumPortAllocatorSession::ChromiumPortAllocatorSession( |
54 cricket::HttpPortAllocatorBase* allocator, | 54 cricket::HttpPortAllocatorBase* allocator, |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 int component, | 181 int component, |
182 const std::string& ice_username_fragment, | 182 const std::string& ice_username_fragment, |
183 const std::string& ice_password) { | 183 const std::string& ice_password) { |
184 return new ChromiumPortAllocatorSession( | 184 return new ChromiumPortAllocatorSession( |
185 this, content_name, component, ice_username_fragment, ice_password, | 185 this, content_name, component, ice_username_fragment, ice_password, |
186 stun_hosts(), relay_hosts(), relay_token(), url_context_); | 186 stun_hosts(), relay_hosts(), relay_token(), url_context_); |
187 } | 187 } |
188 | 188 |
189 } // namespace protocol | 189 } // namespace protocol |
190 } // namespace remoting | 190 } // namespace remoting |
OLD | NEW |