diff options
author | sergeyu <sergeyu@chromium.org> | 2016-02-11 15:47:01 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-11 23:48:38 +0000 |
commit | c3c43e8732254dedcbd313629f8c9eba93dff6fa (patch) | |
tree | dec7b5fa7233c9063fa651e7dbebe1242b303826 /remoting/host | |
parent | cb092cd91ca95112508d2b86af2b8199e1b90e77 (diff) | |
download | chromium_src-c3c43e8732254dedcbd313629f8c9eba93dff6fa.zip chromium_src-c3c43e8732254dedcbd313629f8c9eba93dff6fa.tar.gz chromium_src-c3c43e8732254dedcbd313629f8c9eba93dff6fa.tar.bz2 |
Use UrlRequest in PortAllocator.
PepperPortAllocator and ChromiumPortAllocator were different only in
how they were sending HTTP requests to allocate relay session. They were
using pp::URLLoader and net::URLFetcher respectively, but otherwise
contained largely the same logic. Now URL request logic is abstracted
with remoting::UrlRequest interface and so a single PortAllocator
implementation can be used in all cases.
BUG=577954
Review URL: https://codereview.chromium.org/1681393006
Cr-Commit-Position: refs/heads/master@{#375042}
Diffstat (limited to 'remoting/host')
-rw-r--r-- | remoting/host/it2me/it2me_host.cc | 6 | ||||
-rw-r--r-- | remoting/host/remoting_me2me_host.cc | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/remoting/host/it2me/it2me_host.cc b/remoting/host/it2me/it2me_host.cc index 4012f55..3fc19d0 100644 --- a/remoting/host/it2me/it2me_host.cc +++ b/remoting/host/it2me/it2me_host.cc @@ -16,6 +16,7 @@ #include "net/url_request/url_request_context_getter.h" #include "policy/policy_constants.h" #include "remoting/base/auto_thread.h" +#include "remoting/base/chromium_url_request.h" #include "remoting/base/logging.h" #include "remoting/base/rsa_key_pair.h" #include "remoting/host/chromoting_host.h" @@ -27,7 +28,7 @@ #include "remoting/host/it2me_desktop_environment.h" #include "remoting/host/policy_watcher.h" #include "remoting/host/register_support_host_request.h" -#include "remoting/protocol/chromium_port_allocator.h" +#include "remoting/protocol/chromium_port_allocator_factory.h" #include "remoting/protocol/ice_transport.h" #include "remoting/protocol/it2me_host_authenticator_factory.h" #include "remoting/protocol/jingle_session_manager.h" @@ -238,7 +239,8 @@ void It2MeHost::FinishConnect() { scoped_refptr<protocol::TransportContext> transport_context = new protocol::TransportContext( signal_strategy_.get(), - make_scoped_ptr(new protocol::ChromiumPortAllocatorFactory( + make_scoped_ptr(new protocol::ChromiumPortAllocatorFactory()), + make_scoped_ptr(new ChromiumUrlRequestFactory( host_context_->url_request_context_getter())), network_settings, protocol::TransportRole::SERVER); diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc index 7dbebc5..b664dd2 100644 --- a/remoting/host/remoting_me2me_host.cc +++ b/remoting/host/remoting_me2me_host.cc @@ -38,6 +38,7 @@ #include "policy/policy_constants.h" #include "remoting/base/auto_thread_task_runner.h" #include "remoting/base/breakpad.h" +#include "remoting/base/chromium_url_request.h" #include "remoting/base/constants.h" #include "remoting/base/logging.h" #include "remoting/base/rsa_key_pair.h" @@ -80,7 +81,7 @@ #include "remoting/host/video_frame_recorder_host_extension.h" #include "remoting/protocol/authenticator.h" #include "remoting/protocol/channel_authenticator.h" -#include "remoting/protocol/chromium_port_allocator.h" +#include "remoting/protocol/chromium_port_allocator_factory.h" #include "remoting/protocol/jingle_session_manager.h" #include "remoting/protocol/me2me_host_authenticator_factory.h" #include "remoting/protocol/network_settings.h" @@ -1522,7 +1523,8 @@ void HostProcess::StartHost() { scoped_refptr<protocol::TransportContext> transport_context = new protocol::TransportContext( signal_strategy_.get(), - make_scoped_ptr(new protocol::ChromiumPortAllocatorFactory( + make_scoped_ptr(new protocol::ChromiumPortAllocatorFactory()), + make_scoped_ptr(new ChromiumUrlRequestFactory( context_->url_request_context_getter())), network_settings, protocol::TransportRole::SERVER); |