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 <cstdio> | 5 #include <cstdio> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "base/message_loop.h" | 16 #include "base/message_loop.h" |
17 #include "base/threading/thread.h" | 17 #include "base/threading/thread.h" |
18 #include "jingle/notifier/base/notification_method.h" | 18 #include "jingle/notifier/base/notification_method.h" |
19 #include "jingle/notifier/base/notifier_options.h" | 19 #include "jingle/notifier/base/notifier_options.h" |
20 #include "net/base/host_port_pair.h" | 20 #include "net/base/host_port_pair.h" |
21 #include "net/base/host_resolver.h" | 21 #include "net/base/host_resolver.h" |
22 #include "net/base/network_change_notifier.h" | 22 #include "net/base/network_change_notifier.h" |
| 23 #include "net/base/transport_security_state.h" |
23 #include "net/url_request/url_request_test_util.h" | 24 #include "net/url_request/url_request_test_util.h" |
24 #include "sync/internal_api/public/base/model_type.h" | 25 #include "sync/internal_api/public/base/model_type.h" |
25 #include "sync/internal_api/public/base/model_type_payload_map.h" | 26 #include "sync/internal_api/public/base/model_type_payload_map.h" |
26 #include "sync/notifier/invalidation_state_tracker.h" | 27 #include "sync/notifier/invalidation_state_tracker.h" |
27 #include "sync/notifier/invalidation_util.h" | 28 #include "sync/notifier/invalidation_util.h" |
28 #include "sync/notifier/sync_notifier.h" | 29 #include "sync/notifier/sync_notifier.h" |
29 #include "sync/notifier/sync_notifier_factory.h" | 30 #include "sync/notifier/sync_notifier_factory.h" |
30 #include "sync/notifier/sync_notifier_observer.h" | 31 #include "sync/notifier/sync_notifier_observer.h" |
31 | 32 |
32 #if defined(OS_MACOSX) | 33 #if defined(OS_MACOSX) |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 112 |
112 // Needed to use a real host resolver. | 113 // Needed to use a real host resolver. |
113 class MyTestURLRequestContext : public TestURLRequestContext { | 114 class MyTestURLRequestContext : public TestURLRequestContext { |
114 public: | 115 public: |
115 MyTestURLRequestContext() : TestURLRequestContext(true) { | 116 MyTestURLRequestContext() : TestURLRequestContext(true) { |
116 context_storage_.set_host_resolver( | 117 context_storage_.set_host_resolver( |
117 net::CreateSystemHostResolver( | 118 net::CreateSystemHostResolver( |
118 net::HostResolver::kDefaultParallelism, | 119 net::HostResolver::kDefaultParallelism, |
119 net::HostResolver::kDefaultRetryAttempts, | 120 net::HostResolver::kDefaultRetryAttempts, |
120 NULL)); | 121 NULL)); |
| 122 context_storage_.set_transport_security_state( |
| 123 new net::TransportSecurityState()); |
121 Init(); | 124 Init(); |
122 } | 125 } |
123 | 126 |
124 virtual ~MyTestURLRequestContext() {} | 127 virtual ~MyTestURLRequestContext() {} |
125 }; | 128 }; |
126 | 129 |
127 class MyTestURLRequestContextGetter : public TestURLRequestContextGetter { | 130 class MyTestURLRequestContextGetter : public TestURLRequestContextGetter { |
128 public: | 131 public: |
129 explicit MyTestURLRequestContextGetter( | 132 explicit MyTestURLRequestContextGetter( |
130 const scoped_refptr<base::MessageLoopProxy>& io_message_loop_proxy) | 133 const scoped_refptr<base::MessageLoopProxy>& io_message_loop_proxy) |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 io_thread.Stop(); | 252 io_thread.Stop(); |
250 return 0; | 253 return 0; |
251 } | 254 } |
252 | 255 |
253 } // namespace | 256 } // namespace |
254 } // namespace syncer | 257 } // namespace syncer |
255 | 258 |
256 int main(int argc, char* argv[]) { | 259 int main(int argc, char* argv[]) { |
257 return syncer::SyncListenNotificationsMain(argc, argv); | 260 return syncer::SyncListenNotificationsMain(argc, argv); |
258 } | 261 } |
OLD | NEW |