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

Side by Side Diff: sync/tools/sync_client.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 p347022. 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
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 "xmpp-allow-insecure-connection"; 67 "xmpp-allow-insecure-connection";
68 const char kSyncServiceURL[] = "https://clients4.google.com/chrome-sync/dev"; 68 const char kSyncServiceURL[] = "https://clients4.google.com/chrome-sync/dev";
69 69
70 // Needed to use a real host resolver. 70 // Needed to use a real host resolver.
71 class MyTestURLRequestContext : public net::TestURLRequestContext { 71 class MyTestURLRequestContext : public net::TestURLRequestContext {
72 public: 72 public:
73 MyTestURLRequestContext() : TestURLRequestContext(true) { 73 MyTestURLRequestContext() : TestURLRequestContext(true) {
74 context_storage_.set_host_resolver( 74 context_storage_.set_host_resolver(
75 net::HostResolver::CreateDefaultResolver(NULL)); 75 net::HostResolver::CreateDefaultResolver(NULL));
76 context_storage_.set_transport_security_state( 76 context_storage_.set_transport_security_state(
77 new net::TransportSecurityState()); 77 make_scoped_ptr(new net::TransportSecurityState()));
78 Init(); 78 Init();
79 } 79 }
80 80
81 ~MyTestURLRequestContext() override {} 81 ~MyTestURLRequestContext() override {}
82 }; 82 };
83 83
84 class MyTestURLRequestContextGetter : public net::TestURLRequestContextGetter { 84 class MyTestURLRequestContextGetter : public net::TestURLRequestContextGetter {
85 public: 85 public:
86 explicit MyTestURLRequestContextGetter( 86 explicit MyTestURLRequestContextGetter(
87 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) 87 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner)
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 io_thread.Stop(); 454 io_thread.Stop();
455 return 0; 455 return 0;
456 } 456 }
457 457
458 } // namespace 458 } // namespace
459 } // namespace syncer 459 } // namespace syncer
460 460
461 int main(int argc, char* argv[]) { 461 int main(int argc, char* argv[]) {
462 return syncer::SyncClientMain(argc, argv); 462 return syncer::SyncClientMain(argc, argv);
463 } 463 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698