| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/proxy_resolver_v8_tracing.h" | 5 #include "net/proxy/proxy_resolver_v8_tracing.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 num_cancelled_requests_++; | 714 num_cancelled_requests_++; |
| 715 } | 715 } |
| 716 | 716 |
| 717 void SetAction(const base::Callback<void(void)>& action) { | 717 void SetAction(const base::Callback<void(void)>& action) { |
| 718 action_ = action; | 718 action_ = action; |
| 719 } | 719 } |
| 720 | 720 |
| 721 // Waits until Resolve() has been called. | 721 // Waits until Resolve() has been called. |
| 722 void WaitUntilRequestIsReceived() { | 722 void WaitUntilRequestIsReceived() { |
| 723 waiting_for_resolve_ = true; | 723 waiting_for_resolve_ = true; |
| 724 base::MessageLoop::current()->Run(); | 724 base::RunLoop().Run(); |
| 725 DCHECK(waiting_for_resolve_); | 725 DCHECK(waiting_for_resolve_); |
| 726 waiting_for_resolve_ = false; | 726 waiting_for_resolve_ = false; |
| 727 } | 727 } |
| 728 | 728 |
| 729 int num_cancelled_requests() const { | 729 int num_cancelled_requests() const { |
| 730 return num_cancelled_requests_; | 730 return num_cancelled_requests_; |
| 731 } | 731 } |
| 732 | 732 |
| 733 private: | 733 private: |
| 734 int num_cancelled_requests_; | 734 int num_cancelled_requests_; |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1016 proxy_uri.substr(0, proxy_uri.find(':') + 1)); | 1016 proxy_uri.substr(0, proxy_uri.find(':') + 1)); |
| 1017 } else { | 1017 } else { |
| 1018 NOTREACHED(); | 1018 NOTREACHED(); |
| 1019 } | 1019 } |
| 1020 } | 1020 } |
| 1021 } | 1021 } |
| 1022 | 1022 |
| 1023 } // namespace | 1023 } // namespace |
| 1024 | 1024 |
| 1025 } // namespace net | 1025 } // namespace net |
| OLD | NEW |