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