diff options
author | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-10 00:54:05 +0000 |
---|---|---|
committer | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-10 00:54:05 +0000 |
commit | 8c5d6c02192eaa543cda8f38232f4b03378998d9 (patch) | |
tree | 05d8cfe309f636ef95fe05b8a4502dbe13e4dfa7 /remoting/host/setup/host_starter.cc | |
parent | d5049719e512c22e922dee41d4f6bb96939c90cf (diff) | |
download | chromium_src-8c5d6c02192eaa543cda8f38232f4b03378998d9.zip chromium_src-8c5d6c02192eaa543cda8f38232f4b03378998d9.tar.gz chromium_src-8c5d6c02192eaa543cda8f38232f4b03378998d9.tar.bz2 |
Refactor the daemon controller so that the callbacks are called on the caller thread.
This CL switches DaemonController to the same model that is used by PairingRegistry. DaemonController becomes a ref-counted object responsible for dispatching calls between threads. Platform-specific logic is implemented in non thread-safe delegate class. Most of the delegate's methods are synchronous and are running on a backgorund thread.
BUG=173509
Review URL: https://chromiumcodereview.appspot.com/23606019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222162 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/setup/host_starter.cc')
-rw-r--r-- | remoting/host/setup/host_starter.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/remoting/host/setup/host_starter.cc b/remoting/host/setup/host_starter.cc index 6758f58..1fd3c17 100644 --- a/remoting/host/setup/host_starter.cc +++ b/remoting/host/setup/host_starter.cc @@ -20,10 +20,10 @@ namespace remoting { HostStarter::HostStarter( scoped_ptr<gaia::GaiaOAuthClient> oauth_client, scoped_ptr<remoting::ServiceClient> service_client, - scoped_ptr<remoting::DaemonController> daemon_controller) + scoped_refptr<remoting::DaemonController> daemon_controller) : oauth_client_(oauth_client.Pass()), service_client_(service_client.Pass()), - daemon_controller_(daemon_controller.Pass()), + daemon_controller_(daemon_controller), consent_to_data_collection_(false), unregistering_host_(false), weak_ptr_factory_(this), @@ -42,11 +42,11 @@ scoped_ptr<HostStarter> HostStarter::Create( scoped_ptr<remoting::ServiceClient> service_client( new remoting::ServiceClient( chromoting_hosts_url, url_request_context_getter)); - scoped_ptr<remoting::DaemonController> daemon_controller( + scoped_refptr<remoting::DaemonController> daemon_controller( remoting::DaemonController::Create()); return scoped_ptr<HostStarter>( new HostStarter(oauth_client.Pass(), service_client.Pass(), - daemon_controller.Pass())); + daemon_controller)); } void HostStarter::StartHost( |