| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/proxy/polling_proxy_config_service.h" | 5 #include "net/proxy/polling_proxy_config_service.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 // now chrome is constructing the ProxyConfigService on the | 138 // now chrome is constructing the ProxyConfigService on the |
| 139 // UI thread so we can't cache the IO thread for the purpose | 139 // UI thread so we can't cache the IO thread for the purpose |
| 140 // of DCHECKs until the first call is made. | 140 // of DCHECKs until the first call is made. |
| 141 if (!have_initialized_origin_runner_) { | 141 if (!have_initialized_origin_runner_) { |
| 142 origin_task_runner_ = base::ThreadTaskRunnerHandle::Get(); | 142 origin_task_runner_ = base::ThreadTaskRunnerHandle::Get(); |
| 143 have_initialized_origin_runner_ = true; | 143 have_initialized_origin_runner_ = true; |
| 144 } | 144 } |
| 145 } | 145 } |
| 146 | 146 |
| 147 GetConfigFunction get_config_func_; | 147 GetConfigFunction get_config_func_; |
| 148 ObserverList<Observer> observers_; | 148 base::ObserverList<Observer> observers_; |
| 149 ProxyConfig last_config_; | 149 ProxyConfig last_config_; |
| 150 base::TimeTicks last_poll_time_; | 150 base::TimeTicks last_poll_time_; |
| 151 base::TimeDelta poll_interval_; | 151 base::TimeDelta poll_interval_; |
| 152 | 152 |
| 153 base::Lock lock_; | 153 base::Lock lock_; |
| 154 scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner_; | 154 scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner_; |
| 155 | 155 |
| 156 bool have_initialized_origin_runner_; | 156 bool have_initialized_origin_runner_; |
| 157 bool has_config_; | 157 bool has_config_; |
| 158 bool poll_task_outstanding_; | 158 bool poll_task_outstanding_; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 184 | 184 |
| 185 PollingProxyConfigService::~PollingProxyConfigService() { | 185 PollingProxyConfigService::~PollingProxyConfigService() { |
| 186 core_->Orphan(); | 186 core_->Orphan(); |
| 187 } | 187 } |
| 188 | 188 |
| 189 void PollingProxyConfigService::CheckForChangesNow() { | 189 void PollingProxyConfigService::CheckForChangesNow() { |
| 190 core_->CheckForChangesNow(); | 190 core_->CheckForChangesNow(); |
| 191 } | 191 } |
| 192 | 192 |
| 193 } // namespace net | 193 } // namespace net |
| OLD | NEW |