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

Side by Side Diff: components/sync/tools/sync_client.cc

Issue 2256733004: 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, 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <cstdio> 8 #include <cstdio>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 "xmpp-allow-insecure-connection"; 74 "xmpp-allow-insecure-connection";
75 const char kSyncServiceURL[] = "https://clients4.google.com/chrome-sync/dev"; 75 const char kSyncServiceURL[] = "https://clients4.google.com/chrome-sync/dev";
76 76
77 // Needed to use a real host resolver. 77 // Needed to use a real host resolver.
78 class MyTestURLRequestContext : public net::TestURLRequestContext { 78 class MyTestURLRequestContext : public net::TestURLRequestContext {
79 public: 79 public:
80 MyTestURLRequestContext() : TestURLRequestContext(true) { 80 MyTestURLRequestContext() : TestURLRequestContext(true) {
81 context_storage_.set_host_resolver( 81 context_storage_.set_host_resolver(
82 net::HostResolver::CreateDefaultResolver(NULL)); 82 net::HostResolver::CreateDefaultResolver(NULL));
83 context_storage_.set_transport_security_state( 83 context_storage_.set_transport_security_state(
84 base::WrapUnique(new net::TransportSecurityState())); 84 base::MakeUnique<net::TransportSecurityState>());
85 Init(); 85 Init();
86 } 86 }
87 87
88 ~MyTestURLRequestContext() override {} 88 ~MyTestURLRequestContext() override {}
89 }; 89 };
90 90
91 class MyTestURLRequestContextGetter : public net::TestURLRequestContextGetter { 91 class MyTestURLRequestContextGetter : public net::TestURLRequestContextGetter {
92 public: 92 public:
93 explicit MyTestURLRequestContextGetter( 93 explicit MyTestURLRequestContextGetter(
94 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) 94 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner)
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 io_thread.Stop(); 451 io_thread.Stop();
452 return 0; 452 return 0;
453 } 453 }
454 454
455 } // namespace 455 } // namespace
456 } // namespace syncer 456 } // namespace syncer
457 457
458 int main(int argc, char* argv[]) { 458 int main(int argc, char* argv[]) {
459 return syncer::SyncClientMain(argc, argv); 459 return syncer::SyncClientMain(argc, argv);
460 } 460 }
OLDNEW
« no previous file with comments | « components/sync/protocol/proto_value_conversions.cc ('k') | components/sync/tools/sync_listen_notifications.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698