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/base64.h" | 10 #include "base/base64.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/debug/stack_trace.h" | 13 #include "base/debug/stack_trace.h" |
14 #include "base/json/json_writer.h" | 14 #include "base/json/json_writer.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
19 #include "base/message_loop.h" | 19 #include "base/message_loop.h" |
20 #include "base/scoped_temp_dir.h" | 20 #include "base/scoped_temp_dir.h" |
21 #include "base/task_runner.h" | 21 #include "base/task_runner.h" |
22 #include "base/threading/thread.h" | 22 #include "base/threading/thread.h" |
23 #include "jingle/notifier/base/notification_method.h" | 23 #include "jingle/notifier/base/notification_method.h" |
24 #include "jingle/notifier/base/notifier_options.h" | 24 #include "jingle/notifier/base/notifier_options.h" |
25 #include "net/base/host_port_pair.h" | 25 #include "net/base/host_port_pair.h" |
26 #include "net/base/host_resolver.h" | 26 #include "net/base/host_resolver.h" |
27 #include "net/base/network_change_notifier.h" | 27 #include "net/base/network_change_notifier.h" |
| 28 #include "net/base/transport_security_state.h" |
28 #include "net/url_request/url_request_test_util.h" | 29 #include "net/url_request/url_request_test_util.h" |
29 #include "sync/internal_api/public/base/model_type.h" | 30 #include "sync/internal_api/public/base/model_type.h" |
30 #include "sync/internal_api/public/base_node.h" | 31 #include "sync/internal_api/public/base_node.h" |
31 #include "sync/internal_api/public/engine/passive_model_worker.h" | 32 #include "sync/internal_api/public/engine/passive_model_worker.h" |
32 #include "sync/internal_api/public/http_bridge.h" | 33 #include "sync/internal_api/public/http_bridge.h" |
33 #include "sync/internal_api/public/internal_components_factory_impl.h" | 34 #include "sync/internal_api/public/internal_components_factory_impl.h" |
34 #include "sync/internal_api/public/read_node.h" | 35 #include "sync/internal_api/public/read_node.h" |
35 #include "sync/internal_api/public/sync_manager.h" | 36 #include "sync/internal_api/public/sync_manager.h" |
36 #include "sync/internal_api/public/sync_manager_factory.h" | 37 #include "sync/internal_api/public/sync_manager_factory.h" |
37 #include "sync/internal_api/public/util/report_unrecoverable_error_function.h" | 38 #include "sync/internal_api/public/util/report_unrecoverable_error_function.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 96 |
96 // Needed to use a real host resolver. | 97 // Needed to use a real host resolver. |
97 class MyTestURLRequestContext : public TestURLRequestContext { | 98 class MyTestURLRequestContext : public TestURLRequestContext { |
98 public: | 99 public: |
99 MyTestURLRequestContext() : TestURLRequestContext(true) { | 100 MyTestURLRequestContext() : TestURLRequestContext(true) { |
100 context_storage_.set_host_resolver( | 101 context_storage_.set_host_resolver( |
101 net::CreateSystemHostResolver( | 102 net::CreateSystemHostResolver( |
102 net::HostResolver::kDefaultParallelism, | 103 net::HostResolver::kDefaultParallelism, |
103 net::HostResolver::kDefaultRetryAttempts, | 104 net::HostResolver::kDefaultRetryAttempts, |
104 NULL)); | 105 NULL)); |
| 106 context_storage_.set_transport_security_state( |
| 107 new net::TransportSecurityState()); |
105 Init(); | 108 Init(); |
106 } | 109 } |
107 | 110 |
108 virtual ~MyTestURLRequestContext() {} | 111 virtual ~MyTestURLRequestContext() {} |
109 }; | 112 }; |
110 | 113 |
111 class MyTestURLRequestContextGetter : public TestURLRequestContextGetter { | 114 class MyTestURLRequestContextGetter : public TestURLRequestContextGetter { |
112 public: | 115 public: |
113 explicit MyTestURLRequestContextGetter( | 116 explicit MyTestURLRequestContextGetter( |
114 const scoped_refptr<base::MessageLoopProxy>& io_message_loop_proxy) | 117 const scoped_refptr<base::MessageLoopProxy>& io_message_loop_proxy) |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 io_thread.Stop(); | 383 io_thread.Stop(); |
381 return 0; | 384 return 0; |
382 } | 385 } |
383 | 386 |
384 } // namespace | 387 } // namespace |
385 } // namespace syncer | 388 } // namespace syncer |
386 | 389 |
387 int main(int argc, char* argv[]) { | 390 int main(int argc, char* argv[]) { |
388 return syncer::SyncClientMain(argc, argv); | 391 return syncer::SyncClientMain(argc, argv); |
389 } | 392 } |
OLD | NEW |