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

Unified Diff: remoting/host/policy_hack/policy_watcher.h

Issue 886913002: Always run PolicyWatcher on UI thread in It2Me host. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/policy_hack/policy_watcher.h
diff --git a/remoting/host/policy_hack/policy_watcher.h b/remoting/host/policy_hack/policy_watcher.h
index 829eac71e085239f974a3e3739654b2680a1d991..0023d9de6dd9cbcc833f80664d1b96e3f0d2cc7f 100644
--- a/remoting/host/policy_hack/policy_watcher.h
+++ b/remoting/host/policy_hack/policy_watcher.h
@@ -76,10 +76,13 @@ class PolicyWatcher : public policy::PolicyService::Observer {
// process) or specify nullptr to internally construct and use a new
// PolicyService (on other OS-es).
//
- // When |policy_service| is null, then |task_runner| is used for reading the
- // policy from files / registry / preferences. PolicyUpdatedCallback and
- // PolicyErrorCallback will be called on the same |task_runner|.
- // |task_runner| should be of TYPE_IO type.
+ // |current_task_runner| refers to the task runner for the current thread. The
+ // PolicyWatcher must only be used on the same thread it's created and it call
Łukasz Anforowicz 2015/01/30 05:35:55 Non-native speaker here, but I think it should be
Łukasz Anforowicz 2015/01/30 17:16:00 RE: PolicyWatcher must only be used on the same th
Sergey Ulanov 2015/01/30 19:33:45 Yes, Thank you. Actually marked PolicyWatcher as N
Sergey Ulanov 2015/01/30 19:33:45 Done.
+ // all callbacks on this thread.
+ //
+ // When |policy_service| is null, then |io_task_runner| is used for reading
+ // the policy from files / registry / preferences. |io_task_runner| should be
+ // of TYPE_IO type.
//
// When |policy_service| is specified then |task_runner| argument is ignored
Łukasz Anforowicz 2015/01/30 05:35:55 Need to update the name of the parameter in the co
Sergey Ulanov 2015/01/30 19:33:45 Done.
// and 1) BrowserThread::UI is used for PolicyUpdatedCallback and
@@ -89,7 +92,8 @@ class PolicyWatcher : public policy::PolicyService::Observer {
// PolicyWatcher).
static scoped_ptr<PolicyWatcher> Create(
policy::PolicyService* policy_service,
- const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
+ const scoped_refptr<base::SingleThreadTaskRunner>& current_task_runner,
+ const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
private:
friend class PolicyWatcherTest;

Powered by Google App Engine
This is Rietveld 408576698