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

Side by Side Diff: sync/tools/sync_listen_notifications.cc

Issue 1290243007: Shift URLRequestContextStorage over to taking scoped_ptrs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Paul_BuilderGrab
Patch Set: Sync'd to revision p349162. Created 5 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
« no previous file with comments | « sync/tools/sync_client.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 (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 <cstddef> 5 #include <cstddef>
6 #include <cstdio> 6 #include <cstdio>
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 DISALLOW_COPY_AND_ASSIGN(NotificationPrinter); 74 DISALLOW_COPY_AND_ASSIGN(NotificationPrinter);
75 }; 75 };
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 new net::TransportSecurityState()); 84 make_scoped_ptr(new 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 io_thread.Stop(); 210 io_thread.Stop();
211 return 0; 211 return 0;
212 } 212 }
213 213
214 } // namespace 214 } // namespace
215 } // namespace syncer 215 } // namespace syncer
216 216
217 int main(int argc, char* argv[]) { 217 int main(int argc, char* argv[]) {
218 return syncer::SyncListenNotificationsMain(argc, argv); 218 return syncer::SyncListenNotificationsMain(argc, argv);
219 } 219 }
OLDNEW
« no previous file with comments | « sync/tools/sync_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698