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

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

Issue 2053133002: Remove MessageLoop::current()->RunUntilIdle() in net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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_unittest.cc ('k') | net/proxy/proxy_service_unittest.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 <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "base/message_loop/message_loop.h"
12 #include "base/run_loop.h" 11 #include "base/run_loop.h"
13 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
14 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
15 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
16 #include "base/threading/thread_task_runner_handle.h" 15 #include "base/threading/thread_task_runner_handle.h"
17 #include "base/time/time.h" 16 #include "base/time/time.h"
18 #include "net/base/net_errors.h" 17 #include "net/base/net_errors.h"
19 #include "net/base/test_completion_callback.h" 18 #include "net/base/test_completion_callback.h"
20 #include "net/dns/mock_host_resolver.h" 19 #include "net/dns/mock_host_resolver.h"
21 #include "net/log/net_log.h" 20 #include "net/log/net_log.h"
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 // Scope so ProxyScriptDecider gets destroyed early. 779 // Scope so ProxyScriptDecider gets destroyed early.
781 { 780 {
782 ProxyScriptDecider decider(&fetcher, dhcp_fetcher.get(), NULL); 781 ProxyScriptDecider decider(&fetcher, dhcp_fetcher.get(), NULL);
783 decider.Start(config, base::TimeDelta(), true, callback.callback()); 782 decider.Start(config, base::TimeDelta(), true, callback.callback());
784 } 783 }
785 784
786 // Run the message loop to let the DHCP fetch complete and post the results 785 // Run the message loop to let the DHCP fetch complete and post the results
787 // back. Before the fix linked to above, this would try to invoke on 786 // back. Before the fix linked to above, this would try to invoke on
788 // the callback object provided by ProxyScriptDecider after it was 787 // the callback object provided by ProxyScriptDecider after it was
789 // no longer valid. 788 // no longer valid.
790 base::MessageLoop::current()->RunUntilIdle(); 789 base::RunLoop().RunUntilIdle();
791 } 790 }
792 791
793 } // namespace 792 } // namespace
794 } // namespace net 793 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_config_service_linux_unittest.cc ('k') | net/proxy/proxy_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698