| OLD | NEW |
| 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_fetcher_win.h" | 5 #include "net/proxy/dhcp_proxy_script_fetcher_win.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 | 279 |
| 280 std::vector<std::string> mock_adapter_names_; | 280 std::vector<std::string> mock_adapter_names_; |
| 281 | 281 |
| 282 private: | 282 private: |
| 283 ~MockAdapterQuery() override {} | 283 ~MockAdapterQuery() override {} |
| 284 }; | 284 }; |
| 285 | 285 |
| 286 MockDhcpProxyScriptFetcherWin(URLRequestContext* context) | 286 MockDhcpProxyScriptFetcherWin(URLRequestContext* context) |
| 287 : DhcpProxyScriptFetcherWin(context), | 287 : DhcpProxyScriptFetcherWin(context), |
| 288 num_fetchers_created_(0), | 288 num_fetchers_created_(0), |
| 289 worker_finished_event_(true, false) { | 289 worker_finished_event_( |
| 290 base::WaitableEvent::ResetPolicy::MANUAL, |
| 291 base::WaitableEvent::InitialState::NOT_SIGNALED) { |
| 290 ResetTestState(); | 292 ResetTestState(); |
| 291 } | 293 } |
| 292 | 294 |
| 293 ~MockDhcpProxyScriptFetcherWin() override { ResetTestState(); } | 295 ~MockDhcpProxyScriptFetcherWin() override { ResetTestState(); } |
| 294 | 296 |
| 295 using DhcpProxyScriptFetcherWin::GetTaskRunner; | 297 using DhcpProxyScriptFetcherWin::GetTaskRunner; |
| 296 | 298 |
| 297 // Adds a fetcher object to the queue of fetchers used by | 299 // Adds a fetcher object to the queue of fetchers used by |
| 298 // |ImplCreateAdapterFetcher()|, and its name to the list of adapters | 300 // |ImplCreateAdapterFetcher()|, and its name to the list of adapters |
| 299 // returned by ImplGetCandidateAdapterNames. | 301 // returned by ImplGetCandidateAdapterNames. |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 } | 641 } |
| 640 | 642 |
| 641 // Re-do the first test to make sure the last test that was run did | 643 // Re-do the first test to make sure the last test that was run did |
| 642 // not leave things in a bad state. | 644 // not leave things in a bad state. |
| 643 (*test_functions.begin())(&client); | 645 (*test_functions.begin())(&client); |
| 644 } | 646 } |
| 645 | 647 |
| 646 } // namespace | 648 } // namespace |
| 647 | 649 |
| 648 } // namespace net | 650 } // namespace net |
| OLD | NEW |