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

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

Issue 2259823002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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 #include <utility> 8 #include <utility>
9 9
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 std::vector<std::pair<int, std::string>> GetErrors() { 88 std::vector<std::pair<int, std::string>> GetErrors() {
89 return errors_; 89 return errors_;
90 } 90 }
91 91
92 void RunOnError(const base::Closure& callback) { 92 void RunOnError(const base::Closure& callback) {
93 error_callback_ = callback; 93 error_callback_ = callback;
94 waiter_.WaitForEvent(EVENT_ERROR); 94 waiter_.WaitForEvent(EVENT_ERROR);
95 } 95 }
96 96
97 std::unique_ptr<ProxyResolverV8Tracing::Bindings> CreateBindings() { 97 std::unique_ptr<ProxyResolverV8Tracing::Bindings> CreateBindings() {
98 return base::WrapUnique(new ForwardingBindings(this)); 98 return base::MakeUnique<ForwardingBindings>(this);
99 } 99 }
100 100
101 private: 101 private:
102 class ForwardingBindings : public ProxyResolverV8Tracing::Bindings { 102 class ForwardingBindings : public ProxyResolverV8Tracing::Bindings {
103 public: 103 public:
104 explicit ForwardingBindings(MockBindings* bindings) : bindings_(bindings) {} 104 explicit ForwardingBindings(MockBindings* bindings) : bindings_(bindings) {}
105 105
106 // ProxyResolverV8Tracing::Bindings overrides. 106 // ProxyResolverV8Tracing::Bindings overrides.
107 void Alert(const base::string16& message) override { 107 void Alert(const base::string16& message) override {
108 DCHECK(thread_checker_.CalledOnValidThread()); 108 DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 proxy_uri.substr(0, proxy_uri.find(':') + 1)); 1035 proxy_uri.substr(0, proxy_uri.find(':') + 1));
1036 } else { 1036 } else {
1037 NOTREACHED(); 1037 NOTREACHED();
1038 } 1038 }
1039 } 1039 }
1040 } 1040 }
1041 1041
1042 } // namespace 1042 } // namespace
1043 1043
1044 } // namespace net 1044 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_resolver_factory_mojo_unittest.cc ('k') | net/proxy/proxy_script_fetcher_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698