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

Side by Side Diff: net/proxy/proxy_config_service_linux.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 unified diff | Download patch
« no previous file with comments | « net/proxy/proxy_config_service_linux.h ('k') | net/proxy/proxy_config_service_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/proxy_config_service_linux.h" 5 #include "net/proxy/proxy_config_service_linux.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #if defined(USE_GCONF) 8 #if defined(USE_GCONF)
9 #include <gconf/gconf-client.h> 9 #include <gconf/gconf-client.h>
10 #endif // defined(USE_GCONF) 10 #endif // defined(USE_GCONF)
(...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after
1563 } 1563 }
1564 1564
1565 ProxyConfigServiceLinux::Delegate::Delegate( 1565 ProxyConfigServiceLinux::Delegate::Delegate(
1566 std::unique_ptr<base::Environment> env_var_getter, 1566 std::unique_ptr<base::Environment> env_var_getter,
1567 SettingGetter* setting_getter) 1567 SettingGetter* setting_getter)
1568 : env_var_getter_(std::move(env_var_getter)), 1568 : env_var_getter_(std::move(env_var_getter)),
1569 setting_getter_(setting_getter) {} 1569 setting_getter_(setting_getter) {}
1570 1570
1571 void ProxyConfigServiceLinux::Delegate::SetUpAndFetchInitialConfig( 1571 void ProxyConfigServiceLinux::Delegate::SetUpAndFetchInitialConfig(
1572 const scoped_refptr<base::SingleThreadTaskRunner>& glib_task_runner, 1572 const scoped_refptr<base::SingleThreadTaskRunner>& glib_task_runner,
1573 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) { 1573 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner) {
1574 // We should be running on the default glib main loop thread right 1574 // We should be running on the default glib main loop thread right
1575 // now. gconf can only be accessed from this thread. 1575 // now. gconf can only be accessed from this thread.
1576 DCHECK(glib_task_runner->RunsTasksInCurrentSequence()); 1576 DCHECK(glib_task_runner->RunsTasksInCurrentSequence());
1577 glib_task_runner_ = glib_task_runner; 1577 glib_task_runner_ = glib_task_runner;
1578 io_task_runner_ = io_task_runner; 1578 io_task_runner_ = io_task_runner;
1579 1579
1580 // If we are passed a NULL |io_task_runner|, then don't set up proxy 1580 // If we are passed a NULL |io_task_runner|, then don't set up proxy
1581 // setting change notifications. This should not be the usual case but is 1581 // setting change notifications. This should not be the usual case but is
1582 // intended to/ simplify test setups. 1582 // intended to/ simplify test setups.
1583 if (!io_task_runner_.get()) 1583 if (!io_task_runner_.get())
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 void ProxyConfigServiceLinux::RemoveObserver(Observer* observer) { 1773 void ProxyConfigServiceLinux::RemoveObserver(Observer* observer) {
1774 delegate_->RemoveObserver(observer); 1774 delegate_->RemoveObserver(observer);
1775 } 1775 }
1776 1776
1777 ProxyConfigService::ConfigAvailability 1777 ProxyConfigService::ConfigAvailability
1778 ProxyConfigServiceLinux::GetLatestProxyConfig(ProxyConfig* config) { 1778 ProxyConfigServiceLinux::GetLatestProxyConfig(ProxyConfig* config) {
1779 return delegate_->GetLatestProxyConfig(config); 1779 return delegate_->GetLatestProxyConfig(config);
1780 } 1780 }
1781 1781
1782 } // namespace net 1782 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_config_service_linux.h ('k') | net/proxy/proxy_config_service_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698