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/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.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "net/base/net_errors.h" | 11 #include "net/base/net_errors.h" |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 | 14 |
15 MockProxyScriptFetcher::MockProxyScriptFetcher() | 15 MockProxyScriptFetcher::MockProxyScriptFetcher() |
16 : pending_request_text_(NULL), | 16 : pending_request_text_(NULL), |
17 waiting_for_fetch_(false) { | 17 waiting_for_fetch_(false) { |
18 } | 18 } |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 } | 60 } |
61 | 61 |
62 void MockProxyScriptFetcher::WaitUntilFetch() { | 62 void MockProxyScriptFetcher::WaitUntilFetch() { |
63 DCHECK(!has_pending_request()); | 63 DCHECK(!has_pending_request()); |
64 waiting_for_fetch_ = true; | 64 waiting_for_fetch_ = true; |
65 base::MessageLoop::current()->Run(); | 65 base::MessageLoop::current()->Run(); |
66 waiting_for_fetch_ = false; | 66 waiting_for_fetch_ = false; |
67 } | 67 } |
68 | 68 |
69 } // namespace net | 69 } // namespace net |
OLD | NEW |