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 | 8 |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 RequestHandle* out_req, | 681 RequestHandle* out_req, |
682 const BoundNetLog& net_log) override { | 682 const BoundNetLog& net_log) override { |
683 EXPECT_FALSE(callback.is_null()); | 683 EXPECT_FALSE(callback.is_null()); |
684 EXPECT_TRUE(out_req); | 684 EXPECT_TRUE(out_req); |
685 | 685 |
686 if (!action_.is_null()) | 686 if (!action_.is_null()) |
687 action_.Run(); | 687 action_.Run(); |
688 | 688 |
689 // Indicate to the caller that a request was received. | 689 // Indicate to the caller that a request was received. |
690 EXPECT_TRUE(waiting_for_resolve_); | 690 EXPECT_TRUE(waiting_for_resolve_); |
691 base::MessageLoop::current()->Quit(); | 691 base::MessageLoop::current()->QuitWhenIdle(); |
692 | 692 |
693 // This line is intentionally after action_.Run(), since one of the | 693 // This line is intentionally after action_.Run(), since one of the |
694 // tests does a cancellation inside of Resolve(), and it is more | 694 // tests does a cancellation inside of Resolve(), and it is more |
695 // interesting if *out_req hasn't been written yet at that point. | 695 // interesting if *out_req hasn't been written yet at that point. |
696 *out_req = reinterpret_cast<RequestHandle*>(1); // Magic value. | 696 *out_req = reinterpret_cast<RequestHandle*>(1); // Magic value. |
697 | 697 |
698 // Return ERR_IO_PENDING as this request will NEVER be completed. | 698 // Return ERR_IO_PENDING as this request will NEVER be completed. |
699 // Expectation is for the caller to later cancel the request. | 699 // Expectation is for the caller to later cancel the request. |
700 return ERR_IO_PENDING; | 700 return ERR_IO_PENDING; |
701 } | 701 } |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 proxy_uri.substr(0, proxy_uri.find(':') + 1)); | 1014 proxy_uri.substr(0, proxy_uri.find(':') + 1)); |
1015 } else { | 1015 } else { |
1016 NOTREACHED(); | 1016 NOTREACHED(); |
1017 } | 1017 } |
1018 } | 1018 } |
1019 } | 1019 } |
1020 | 1020 |
1021 } // namespace | 1021 } // namespace |
1022 | 1022 |
1023 } // namespace net | 1023 } // namespace net |
OLD | NEW |