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

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

Issue 2090613002: Remove calls to deprecated MessageLoop methods 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
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/mock_proxy_script_fetcher.h" 5 #include "net/proxy/mock_proxy_script_fetcher.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h"
9 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
10 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
11 #include "net/base/net_errors.h" 12 #include "net/base/net_errors.h"
12 13
13 namespace net { 14 namespace net {
14 15
15 MockProxyScriptFetcher::MockProxyScriptFetcher() 16 MockProxyScriptFetcher::MockProxyScriptFetcher()
16 : pending_request_text_(NULL), 17 : pending_request_text_(NULL),
17 waiting_for_fetch_(false) { 18 waiting_for_fetch_(false) {
18 } 19 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 return pending_request_url_; 56 return pending_request_url_;
56 } 57 }
57 58
58 bool MockProxyScriptFetcher::has_pending_request() const { 59 bool MockProxyScriptFetcher::has_pending_request() const {
59 return !pending_request_callback_.is_null(); 60 return !pending_request_callback_.is_null();
60 } 61 }
61 62
62 void MockProxyScriptFetcher::WaitUntilFetch() { 63 void MockProxyScriptFetcher::WaitUntilFetch() {
63 DCHECK(!has_pending_request()); 64 DCHECK(!has_pending_request());
64 waiting_for_fetch_ = true; 65 waiting_for_fetch_ = true;
65 base::MessageLoop::current()->Run(); 66 base::RunLoop().Run();
66 waiting_for_fetch_ = false; 67 waiting_for_fetch_ = false;
67 } 68 }
68 69
69 } // namespace net 70 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_unittest.cc ('k') | net/proxy/proxy_resolver_v8_tracing_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698