Chromium Code Reviews| 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; |