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

Unified Diff: net/proxy/proxy_config_service_mac.cc

Issue 2957433002: Use SequencedTaskRunner rather than SingledThreadedTaskRunner for passing io_task_runner (Closed)
Patch Set: undo change to glib_task_runner (keep it SingleThreadBlaBla) Created 3 years, 6 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
« no previous file with comments | « net/proxy/proxy_config_service_mac.h ('k') | net/proxy/proxy_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_config_service_mac.cc
diff --git a/net/proxy/proxy_config_service_mac.cc b/net/proxy/proxy_config_service_mac.cc
index 1f208267098367a390a5ffd6d743041ecf67be69..c69cd7e056502de70ca5b89721dc25d4204cd077 100644
--- a/net/proxy/proxy_config_service_mac.cc
+++ b/net/proxy/proxy_config_service_mac.cc
@@ -198,7 +198,7 @@ void ProxyConfigServiceMac::Forwarder::OnNetworkConfigChange(
}
ProxyConfigServiceMac::ProxyConfigServiceMac(
- const scoped_refptr<base::SingleThreadTaskRunner>& io_thread_task_runner)
+ const scoped_refptr<base::SequencedTaskRunner>& io_thread_task_runner)
: forwarder_(this),
has_fetched_config_(false),
helper_(new Helper(this)),
@@ -208,7 +208,7 @@ ProxyConfigServiceMac::ProxyConfigServiceMac(
}
ProxyConfigServiceMac::~ProxyConfigServiceMac() {
- DCHECK(io_thread_task_runner_->BelongsToCurrentThread());
+ DCHECK(io_thread_task_runner_->RunsTasksInCurrentSequence());
// Delete the config_watcher_ to ensure the notifier thread finishes before
// this object is destroyed.
config_watcher_.reset();
@@ -216,18 +216,18 @@ ProxyConfigServiceMac::~ProxyConfigServiceMac() {
}
void ProxyConfigServiceMac::AddObserver(Observer* observer) {
- DCHECK(io_thread_task_runner_->BelongsToCurrentThread());
+ DCHECK(io_thread_task_runner_->RunsTasksInCurrentSequence());
observers_.AddObserver(observer);
}
void ProxyConfigServiceMac::RemoveObserver(Observer* observer) {
- DCHECK(io_thread_task_runner_->BelongsToCurrentThread());
+ DCHECK(io_thread_task_runner_->RunsTasksInCurrentSequence());
observers_.RemoveObserver(observer);
}
ProxyConfigService::ConfigAvailability
ProxyConfigServiceMac::GetLatestProxyConfig(ProxyConfig* config) {
- DCHECK(io_thread_task_runner_->BelongsToCurrentThread());
+ DCHECK(io_thread_task_runner_->RunsTasksInCurrentSequence());
// Lazy-initialize by fetching the proxy setting from this thread.
if (!has_fetched_config_) {
@@ -270,7 +270,7 @@ void ProxyConfigServiceMac::OnNetworkConfigChange(CFArrayRef changed_keys) {
void ProxyConfigServiceMac::OnProxyConfigChanged(
const ProxyConfig& new_config) {
- DCHECK(io_thread_task_runner_->BelongsToCurrentThread());
+ DCHECK(io_thread_task_runner_->RunsTasksInCurrentSequence());
// Keep track of the last value we have seen.
has_fetched_config_ = true;
« no previous file with comments | « net/proxy/proxy_config_service_mac.h ('k') | net/proxy/proxy_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698