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 16 matching lines...) Expand all Loading... |
27 #include "net/base/host_port_pair.h" | 27 #include "net/base/host_port_pair.h" |
28 #include "net/base/network_change_notifier.h" | 28 #include "net/base/network_change_notifier.h" |
29 #include "net/dns/host_resolver.h" | 29 #include "net/dns/host_resolver.h" |
30 #include "net/http/transport_security_state.h" | 30 #include "net/http/transport_security_state.h" |
31 #include "net/url_request/url_request_test_util.h" | 31 #include "net/url_request/url_request_test_util.h" |
32 #include "sync/internal_api/public/base/cancelation_signal.h" | 32 #include "sync/internal_api/public/base/cancelation_signal.h" |
33 #include "sync/internal_api/public/base/model_type.h" | 33 #include "sync/internal_api/public/base/model_type.h" |
34 #include "sync/internal_api/public/base_node.h" | 34 #include "sync/internal_api/public/base_node.h" |
35 #include "sync/internal_api/public/engine/passive_model_worker.h" | 35 #include "sync/internal_api/public/engine/passive_model_worker.h" |
36 #include "sync/internal_api/public/http_bridge.h" | 36 #include "sync/internal_api/public/http_bridge.h" |
| 37 #include "sync/internal_api/public/http_post_provider_factory.h" |
37 #include "sync/internal_api/public/internal_components_factory_impl.h" | 38 #include "sync/internal_api/public/internal_components_factory_impl.h" |
38 #include "sync/internal_api/public/read_node.h" | 39 #include "sync/internal_api/public/read_node.h" |
39 #include "sync/internal_api/public/sync_manager.h" | 40 #include "sync/internal_api/public/sync_manager.h" |
40 #include "sync/internal_api/public/sync_manager_factory.h" | 41 #include "sync/internal_api/public/sync_manager_factory.h" |
41 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" | 42 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" |
42 #include "sync/internal_api/public/util/weak_handle.h" | 43 #include "sync/internal_api/public/util/weak_handle.h" |
43 #include "sync/js/js_event_details.h" | 44 #include "sync/js/js_event_details.h" |
44 #include "sync/js/js_event_handler.h" | 45 #include "sync/js/js_event_handler.h" |
45 #include "sync/test/fake_encryptor.h" | 46 #include "sync/test/fake_encryptor.h" |
46 #include "sync/tools/invalidation_helper.h" | 47 #include "sync/tools/invalidation_helper.h" |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 // Used only by InitialProcessMetadata(), so it's okay to leave this as NULL. | 399 // Used only by InitialProcessMetadata(), so it's okay to leave this as NULL. |
399 const scoped_refptr<base::TaskRunner> blocking_task_runner = NULL; | 400 const scoped_refptr<base::TaskRunner> blocking_task_runner = NULL; |
400 const char kUserAgent[] = "sync_client"; | 401 const char kUserAgent[] = "sync_client"; |
401 // TODO(akalin): Replace this with just the context getter once | 402 // TODO(akalin): Replace this with just the context getter once |
402 // HttpPostProviderFactory is removed. | 403 // HttpPostProviderFactory is removed. |
403 CancelationSignal factory_cancelation_signal; | 404 CancelationSignal factory_cancelation_signal; |
404 scoped_ptr<HttpPostProviderFactory> post_factory( | 405 scoped_ptr<HttpPostProviderFactory> post_factory( |
405 new HttpBridgeFactory(context_getter.get(), | 406 new HttpBridgeFactory(context_getter.get(), |
406 base::Bind(&StubNetworkTimeUpdateCallback), | 407 base::Bind(&StubNetworkTimeUpdateCallback), |
407 &factory_cancelation_signal)); | 408 &factory_cancelation_signal)); |
408 post_factory->Init(kUserAgent); | 409 post_factory->Init(kUserAgent, BindToTrackerCallback()); |
409 // Used only when committing bookmarks, so it's okay to leave this | 410 // Used only when committing bookmarks, so it's okay to leave this |
410 // as NULL. | 411 // as NULL. |
411 ExtensionsActivity* extensions_activity = NULL; | 412 ExtensionsActivity* extensions_activity = NULL; |
412 LoggingChangeDelegate change_delegate; | 413 LoggingChangeDelegate change_delegate; |
413 const char kRestoredKeyForBootstrapping[] = ""; | 414 const char kRestoredKeyForBootstrapping[] = ""; |
414 const char kRestoredKeystoreKeyForBootstrapping[] = ""; | 415 const char kRestoredKeystoreKeyForBootstrapping[] = ""; |
415 NullEncryptor null_encryptor; | 416 NullEncryptor null_encryptor; |
416 InternalComponentsFactoryImpl::Switches factory_switches = { | 417 InternalComponentsFactoryImpl::Switches factory_switches = { |
417 InternalComponentsFactory::ENCRYPTION_KEYSTORE, | 418 InternalComponentsFactory::ENCRYPTION_KEYSTORE, |
418 InternalComponentsFactory::BACKOFF_NORMAL | 419 InternalComponentsFactory::BACKOFF_NORMAL |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 io_thread.Stop(); | 455 io_thread.Stop(); |
455 return 0; | 456 return 0; |
456 } | 457 } |
457 | 458 |
458 } // namespace | 459 } // namespace |
459 } // namespace syncer | 460 } // namespace syncer |
460 | 461 |
461 int main(int argc, char* argv[]) { | 462 int main(int argc, char* argv[]) { |
462 return syncer::SyncClientMain(argc, argv); | 463 return syncer::SyncClientMain(argc, argv); |
463 } | 464 } |
OLD | NEW |