Chromium Code Reviews| Index: net/proxy/polling_proxy_config_service.cc |
| diff --git a/net/proxy/polling_proxy_config_service.cc b/net/proxy/polling_proxy_config_service.cc |
| index defe507eab01492eb4684d2573986102f43c4f13..af6fc9cb630988cc126c6964e1be0c49f12a6360 100644 |
| --- a/net/proxy/polling_proxy_config_service.cc |
| +++ b/net/proxy/polling_proxy_config_service.cc |
| @@ -11,8 +11,8 @@ |
| #include "base/observer_list.h" |
| #include "base/single_thread_task_runner.h" |
| #include "base/synchronization/lock.h" |
| +#include "base/task_scheduler/post_task.h" |
| #include "base/threading/thread_task_runner_handle.h" |
| -#include "base/threading/worker_pool.h" |
| #include "net/proxy/proxy_config.h" |
| namespace net { |
| @@ -90,17 +90,17 @@ class PollingProxyConfigService::Core |
| last_poll_time_ = base::TimeTicks::Now(); |
| poll_task_outstanding_ = true; |
| poll_task_queued_ = false; |
| - base::WorkerPool::PostTask( |
| - FROM_HERE, |
| - base::Bind(&Core::PollOnWorkerThread, this, get_config_func_), |
| - true); |
| + base::PostTaskWithTraits( |
| + FROM_HERE, base::TaskTraits().MayBlock().WithShutdownBehavior( |
|
xunjieli
2017/02/10 16:53:32
Why does this have a "MayBlock()" ?
fdoray
2017/02/13 15:56:04
I assumed that this was blocking since it was done
eroman
2017/02/13 23:14:52
Correct. The windows implementation may do file i/
|
| + base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN), |
| + base::Bind(&Core::PollAsync, this, get_config_func_)); |
| } |
| private: |
| friend class base::RefCountedThreadSafe<Core>; |
| ~Core() {} |
| - void PollOnWorkerThread(GetConfigFunction func) { |
| + void PollAsync(GetConfigFunction func) { |
| ProxyConfig config; |
| func(&config); |