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

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

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
Patch Set: Created 5 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_mac.h ('k') | net/ssl/ssl_config_service.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_service.h" 5 #include "net/proxy/proxy_service.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 void SetConfig(const ProxyConfig& config) { 149 void SetConfig(const ProxyConfig& config) {
150 availability_ = CONFIG_VALID; 150 availability_ = CONFIG_VALID;
151 config_ = config; 151 config_ = config;
152 FOR_EACH_OBSERVER(Observer, observers_, 152 FOR_EACH_OBSERVER(Observer, observers_,
153 OnProxyConfigChanged(config_, availability_)); 153 OnProxyConfigChanged(config_, availability_));
154 } 154 }
155 155
156 private: 156 private:
157 ConfigAvailability availability_; 157 ConfigAvailability availability_;
158 ProxyConfig config_; 158 ProxyConfig config_;
159 ObserverList<Observer, true> observers_; 159 base::ObserverList<Observer, true> observers_;
160 }; 160 };
161 161
162 // A test network delegate that exercises the OnResolveProxy callback. 162 // A test network delegate that exercises the OnResolveProxy callback.
163 class TestResolveProxyNetworkDelegate : public NetworkDelegateImpl { 163 class TestResolveProxyNetworkDelegate : public NetworkDelegateImpl {
164 public: 164 public:
165 TestResolveProxyNetworkDelegate() 165 TestResolveProxyNetworkDelegate()
166 : on_resolve_proxy_called_(false), 166 : on_resolve_proxy_called_(false),
167 add_proxy_(false), 167 add_proxy_(false),
168 remove_proxy_(false), 168 remove_proxy_(false),
169 proxy_service_(NULL) { 169 proxy_service_(NULL) {
(...skipping 3103 matching lines...) Expand 10 before | Expand all | Expand 10 after
3273 url, LOAD_NORMAL, &info, NULL, log.bound()); 3273 url, LOAD_NORMAL, &info, NULL, log.bound());
3274 EXPECT_TRUE(synchronous_success); 3274 EXPECT_TRUE(synchronous_success);
3275 EXPECT_FALSE(info.is_direct()); 3275 EXPECT_FALSE(info.is_direct());
3276 EXPECT_EQ("foopy1", info.proxy_server().host_port_pair().host()); 3276 EXPECT_EQ("foopy1", info.proxy_server().host_port_pair().host());
3277 3277
3278 // No request should have been queued. 3278 // No request should have been queued.
3279 EXPECT_EQ(0u, factory->pending_requests().size()); 3279 EXPECT_EQ(0u, factory->pending_requests().size());
3280 } 3280 }
3281 3281
3282 } // namespace net 3282 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_config_service_mac.h ('k') | net/ssl/ssl_config_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698