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

Side by Side Diff: net/proxy/proxy_config_service_linux.cc

Issue 2423713002: Remove usage of FOR_EACH_OBSERVER macro in net (Closed)
Patch Set: Created 4 years, 2 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_android.cc ('k') | net/proxy/proxy_config_service_mac.cc » ('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 1711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 } else { 1722 } else {
1723 VLOG(1) << "Detected no-op change to proxy settings. Doing nothing."; 1723 VLOG(1) << "Detected no-op change to proxy settings. Doing nothing.";
1724 } 1724 }
1725 } 1725 }
1726 1726
1727 void ProxyConfigServiceLinux::Delegate::SetNewProxyConfig( 1727 void ProxyConfigServiceLinux::Delegate::SetNewProxyConfig(
1728 const ProxyConfig& new_config) { 1728 const ProxyConfig& new_config) {
1729 DCHECK(io_task_runner_->BelongsToCurrentThread()); 1729 DCHECK(io_task_runner_->BelongsToCurrentThread());
1730 VLOG(1) << "Proxy configuration changed"; 1730 VLOG(1) << "Proxy configuration changed";
1731 cached_config_ = new_config; 1731 cached_config_ = new_config;
1732 FOR_EACH_OBSERVER( 1732 for (auto& observer : observers_)
1733 Observer, observers_, 1733 observer.OnProxyConfigChanged(new_config, ProxyConfigService::CONFIG_VALID);
1734 OnProxyConfigChanged(new_config, ProxyConfigService::CONFIG_VALID));
1735 } 1734 }
1736 1735
1737 void ProxyConfigServiceLinux::Delegate::PostDestroyTask() { 1736 void ProxyConfigServiceLinux::Delegate::PostDestroyTask() {
1738 if (!setting_getter_) 1737 if (!setting_getter_)
1739 return; 1738 return;
1740 1739
1741 scoped_refptr<base::SingleThreadTaskRunner> shutdown_loop = 1740 scoped_refptr<base::SingleThreadTaskRunner> shutdown_loop =
1742 setting_getter_->GetNotificationTaskRunner(); 1741 setting_getter_->GetNotificationTaskRunner();
1743 if (!shutdown_loop.get() || shutdown_loop->BelongsToCurrentThread()) { 1742 if (!shutdown_loop.get() || shutdown_loop->BelongsToCurrentThread()) {
1744 // Already on the right thread, call directly. 1743 // Already on the right thread, call directly.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1782 void ProxyConfigServiceLinux::RemoveObserver(Observer* observer) { 1781 void ProxyConfigServiceLinux::RemoveObserver(Observer* observer) {
1783 delegate_->RemoveObserver(observer); 1782 delegate_->RemoveObserver(observer);
1784 } 1783 }
1785 1784
1786 ProxyConfigService::ConfigAvailability 1785 ProxyConfigService::ConfigAvailability
1787 ProxyConfigServiceLinux::GetLatestProxyConfig(ProxyConfig* config) { 1786 ProxyConfigServiceLinux::GetLatestProxyConfig(ProxyConfig* config) {
1788 return delegate_->GetLatestProxyConfig(config); 1787 return delegate_->GetLatestProxyConfig(config);
1789 } 1788 }
1790 1789
1791 } // namespace net 1790 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_config_service_android.cc ('k') | net/proxy/proxy_config_service_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698