diff options
author | kelvinp <kelvinp@chromium.org> | 2014-10-30 14:46:16 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-30 21:46:48 +0000 |
commit | 561074cfd46c253dcdc456fdc63693aff4d1be32 (patch) | |
tree | a943021c67127b2abfbd5bcc73c4f93e143e9514 /remoting/host/policy_hack/policy_watcher.cc | |
parent | d5587416cd28f2449ec86fa2f23e0f1de04878cc (diff) | |
download | chromium_src-561074cfd46c253dcdc456fdc63693aff4d1be32.zip chromium_src-561074cfd46c253dcdc456fdc63693aff4d1be32.tar.gz chromium_src-561074cfd46c253dcdc456fdc63693aff4d1be32.tar.bz2 |
Remote assistance on Chrome OS Part IV - It2MeHost
This CL links the it2me host to the Chrome binary on ChromeOS
behind a flag.
The following changes are made to the it2me host so that it can be run in the browser process.
1. Initializes SSL server sockets and specific CPU media features on ChromeOS startup.
2. Fixes a crash in it2me shutdown by making It2meHost owns the ChromotingHostContext.
3. Replace the blocking shutdown wait on PolicyWatcher with a callback.
Implements policy_watcher on ChromeOS using policy services.
4. Re-use existing threads, url request context getters and policy service on ChromeOS.
5. Fixed a incorrect DCHECK regarding the color format of the frames captured on ChromeOS.
BUG=334087
Committed: https://crrev.com/54dde6f02d121ff745e66b57205583087ff720ec
Cr-Commit-Position: refs/heads/master@{#302034}
Review URL: https://codereview.chromium.org/639233002
Cr-Commit-Position: refs/heads/master@{#302162}
Diffstat (limited to 'remoting/host/policy_hack/policy_watcher.cc')
-rw-r--r-- | remoting/host/policy_hack/policy_watcher.cc | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/remoting/host/policy_hack/policy_watcher.cc b/remoting/host/policy_hack/policy_watcher.cc index e603cf5..8e30c24 100644 --- a/remoting/host/policy_hack/policy_watcher.cc +++ b/remoting/host/policy_hack/policy_watcher.cc @@ -12,7 +12,6 @@ #include "base/location.h" #include "base/memory/weak_ptr.h" #include "base/single_thread_task_runner.h" -#include "base/synchronization/waitable_event.h" #include "base/time/time.h" #include "base/values.h" #include "remoting/host/dns_blackhole_checker.h" @@ -165,19 +164,17 @@ void PolicyWatcher::StartWatching(const PolicyCallback& policy_callback) { StartWatchingInternal(); } -void PolicyWatcher::StopWatching(base::WaitableEvent* done) { - if (!OnPolicyWatcherThread()) { - task_runner_->PostTask(FROM_HERE, - base::Bind(&PolicyWatcher::StopWatching, - base::Unretained(this), done)); - return; - } +void PolicyWatcher::StopWatching(const base::Closure& stopped_callback) { + task_runner_->PostTaskAndReply( + FROM_HERE, base::Bind(&PolicyWatcher::StopWatchingOnPolicyWatcherThread, + base::Unretained(this)), + stopped_callback); +} +void PolicyWatcher::StopWatchingOnPolicyWatcherThread() { StopWatchingInternal(); weak_factory_.InvalidateWeakPtrs(); policy_callback_.Reset(); - - done->Signal(); } void PolicyWatcher::ScheduleFallbackReloadTask() { |