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

Side by Side Diff: google_apis/gcm/tools/mcs_probe.cc

Issue 2256183002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « google_apis/gcm/engine/connection_factory_impl_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 // A standalone tool for testing MCS connections and the MCS client on their 5 // A standalone tool for testing MCS connections and the MCS client on their
6 // own. 6 // own.
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <cstddef> 10 #include <cstddef>
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 << " Message send status: " << status; 139 << " Message send status: " << status;
140 } 140 }
141 141
142 // Needed to use a real host resolver. 142 // Needed to use a real host resolver.
143 class MyTestURLRequestContext : public net::TestURLRequestContext { 143 class MyTestURLRequestContext : public net::TestURLRequestContext {
144 public: 144 public:
145 MyTestURLRequestContext() : TestURLRequestContext(true) { 145 MyTestURLRequestContext() : TestURLRequestContext(true) {
146 context_storage_.set_host_resolver( 146 context_storage_.set_host_resolver(
147 net::HostResolver::CreateDefaultResolver(NULL)); 147 net::HostResolver::CreateDefaultResolver(NULL));
148 context_storage_.set_transport_security_state( 148 context_storage_.set_transport_security_state(
149 base::WrapUnique(new net::TransportSecurityState())); 149 base::MakeUnique<net::TransportSecurityState>());
150 Init(); 150 Init();
151 } 151 }
152 152
153 ~MyTestURLRequestContext() override {} 153 ~MyTestURLRequestContext() override {}
154 }; 154 };
155 155
156 class MyTestURLRequestContextGetter : public net::TestURLRequestContextGetter { 156 class MyTestURLRequestContextGetter : public net::TestURLRequestContextGetter {
157 public: 157 public:
158 explicit MyTestURLRequestContextGetter( 158 explicit MyTestURLRequestContextGetter(
159 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) 159 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner)
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 516
517 return 0; 517 return 0;
518 } 518 }
519 519
520 } // namespace 520 } // namespace
521 } // namespace gcm 521 } // namespace gcm
522 522
523 int main(int argc, char* argv[]) { 523 int main(int argc, char* argv[]) {
524 return gcm::MCSProbeMain(argc, argv); 524 return gcm::MCSProbeMain(argc, argv);
525 } 525 }
OLDNEW
« no previous file with comments | « google_apis/gcm/engine/connection_factory_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698