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

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

Issue 1120203004: win: Ref-counted classes should have non-public destructors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
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/dhcp_proxy_script_adapter_fetcher_win.h" 5 #include "net/proxy/dhcp_proxy_script_adapter_fetcher_win.h"
6 6
7 #include "base/synchronization/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
8 #include "base/test/test_timeouts.h" 8 #include "base/test/test_timeouts.h"
9 #include "base/threading/sequenced_worker_pool.h" 9 #include "base/threading/sequenced_worker_pool.h"
10 #include "base/timer/elapsed_timer.h" 10 #include "base/timer/elapsed_timer.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 std::string ImplGetPacURLFromDhcp( 73 std::string ImplGetPacURLFromDhcp(
74 const std::string& adapter_name) override { 74 const std::string& adapter_name) override {
75 base::ElapsedTimer timer; 75 base::ElapsedTimer timer;
76 test_finished_event_.TimedWait(dhcp_delay_); 76 test_finished_event_.TimedWait(dhcp_delay_);
77 return configured_url_; 77 return configured_url_;
78 } 78 }
79 79
80 base::WaitableEvent test_finished_event_; 80 base::WaitableEvent test_finished_event_;
81 base::TimeDelta dhcp_delay_; 81 base::TimeDelta dhcp_delay_;
82 std::string configured_url_; 82 std::string configured_url_;
83
84 private:
85 ~DelayingDhcpQuery() {}
Ryan Sleevi 2015/05/02 01:28:26 no "override" ?
83 }; 86 };
84 87
85 DhcpQuery* ImplCreateDhcpQuery() override { 88 DhcpQuery* ImplCreateDhcpQuery() override {
86 dhcp_query_ = new DelayingDhcpQuery(); 89 dhcp_query_ = new DelayingDhcpQuery();
87 dhcp_query_->dhcp_delay_ = dhcp_delay_; 90 dhcp_query_->dhcp_delay_ = dhcp_delay_;
88 dhcp_query_->configured_url_ = configured_url_; 91 dhcp_query_->configured_url_ = configured_url_;
89 return dhcp_query_.get(); 92 return dhcp_query_.get();
90 } 93 }
91 94
92 // Use a shorter timeout so tests can finish more quickly. 95 // Use a shorter timeout so tests can finish more quickly.
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 EXPECT_EQ(BASE_URL, 330 EXPECT_EQ(BASE_URL,
328 DhcpProxyScriptAdapterFetcher::SanitizeDhcpApiString( 331 DhcpProxyScriptAdapterFetcher::SanitizeDhcpApiString(
329 BASE_URL "\0foo\0blat", kBaseUrlLen + 9)); 332 BASE_URL "\0foo\0blat", kBaseUrlLen + 9));
330 } 333 }
331 334
332 #undef BASE_URL 335 #undef BASE_URL
333 336
334 } // namespace 337 } // namespace
335 338
336 } // namespace net 339 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698