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_wrapper.h" | 5 #include "net/proxy/proxy_resolver_v8_tracing_wrapper.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 RequestHandle* out_req, | 767 RequestHandle* out_req, |
768 const BoundNetLog& net_log) override { | 768 const BoundNetLog& net_log) override { |
769 EXPECT_FALSE(callback.is_null()); | 769 EXPECT_FALSE(callback.is_null()); |
770 EXPECT_TRUE(out_req); | 770 EXPECT_TRUE(out_req); |
771 | 771 |
772 if (!action_.is_null()) | 772 if (!action_.is_null()) |
773 action_.Run(); | 773 action_.Run(); |
774 | 774 |
775 // Indicate to the caller that a request was received. | 775 // Indicate to the caller that a request was received. |
776 EXPECT_TRUE(waiting_for_resolve_); | 776 EXPECT_TRUE(waiting_for_resolve_); |
777 base::MessageLoop::current()->Quit(); | 777 base::MessageLoop::current()->QuitWhenIdle(); |
778 | 778 |
779 // This line is intentionally after action_.Run(), since one of the | 779 // This line is intentionally after action_.Run(), since one of the |
780 // tests does a cancellation inside of Resolve(), and it is more | 780 // tests does a cancellation inside of Resolve(), and it is more |
781 // interesting if *out_req hasn't been written yet at that point. | 781 // interesting if *out_req hasn't been written yet at that point. |
782 *out_req = reinterpret_cast<RequestHandle*>(1); // Magic value. | 782 *out_req = reinterpret_cast<RequestHandle*>(1); // Magic value. |
783 | 783 |
784 // Return ERR_IO_PENDING as this request will NEVER be completed. | 784 // Return ERR_IO_PENDING as this request will NEVER be completed. |
785 // Expectation is for the caller to later cancel the request. | 785 // Expectation is for the caller to later cancel the request. |
786 return ERR_IO_PENDING; | 786 return ERR_IO_PENDING; |
787 } | 787 } |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1125 proxy_uri.substr(0, proxy_uri.find(':') + 1)); | 1125 proxy_uri.substr(0, proxy_uri.find(':') + 1)); |
1126 } else { | 1126 } else { |
1127 NOTREACHED(); | 1127 NOTREACHED(); |
1128 } | 1128 } |
1129 } | 1129 } |
1130 } | 1130 } |
1131 | 1131 |
1132 } // namespace | 1132 } // namespace |
1133 | 1133 |
1134 } // namespace net | 1134 } // namespace net |
OLD | NEW |