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

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

Issue 1398973003: Don't use base::MessageLoop::{Quit,QuitClosure} in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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) 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
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
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
OLDNEW
« no previous file with comments | « net/proxy/mock_proxy_script_fetcher.cc ('k') | net/proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698