| 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 23 matching lines...) Expand all Loading... |
| 34 #include "sync/internal_api/public/http_bridge.h" | 34 #include "sync/internal_api/public/http_bridge.h" |
| 35 #include "sync/internal_api/public/internal_components_factory_impl.h" | 35 #include "sync/internal_api/public/internal_components_factory_impl.h" |
| 36 #include "sync/internal_api/public/read_node.h" | 36 #include "sync/internal_api/public/read_node.h" |
| 37 #include "sync/internal_api/public/sync_manager.h" | 37 #include "sync/internal_api/public/sync_manager.h" |
| 38 #include "sync/internal_api/public/sync_manager_factory.h" | 38 #include "sync/internal_api/public/sync_manager_factory.h" |
| 39 #include "sync/internal_api/public/util/report_unrecoverable_error_function.h" | 39 #include "sync/internal_api/public/util/report_unrecoverable_error_function.h" |
| 40 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" | 40 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" |
| 41 #include "sync/internal_api/public/util/weak_handle.h" | 41 #include "sync/internal_api/public/util/weak_handle.h" |
| 42 #include "sync/js/js_event_details.h" | 42 #include "sync/js/js_event_details.h" |
| 43 #include "sync/js/js_event_handler.h" | 43 #include "sync/js/js_event_handler.h" |
| 44 #include "sync/notifier/invalidation_state_tracker.h" | |
| 45 #include "sync/notifier/non_blocking_invalidator.h" | 44 #include "sync/notifier/non_blocking_invalidator.h" |
| 46 #include "sync/test/fake_encryptor.h" | 45 #include "sync/test/fake_encryptor.h" |
| 47 #include "sync/tools/null_invalidation_state_tracker.h" | 46 #include "sync/tools/null_invalidation_state_tracker.h" |
| 48 | 47 |
| 49 #if defined(OS_MACOSX) | 48 #if defined(OS_MACOSX) |
| 50 #include "base/mac/scoped_nsautorelease_pool.h" | 49 #include "base/mac/scoped_nsautorelease_pool.h" |
| 51 #endif | 50 #endif |
| 52 | 51 |
| 53 // This is a simple utility that initializes a sync client and | 52 // This is a simple utility that initializes a sync client and |
| 54 // prints out any events. | 53 // prints out any events. |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 syncer::NonBlockingInvalidator::MakePushClientChannelCreator( | 272 syncer::NonBlockingInvalidator::MakePushClientChannelCreator( |
| 274 notifier_options); | 273 notifier_options); |
| 275 const char kClientInfo[] = "standalone_sync_client"; | 274 const char kClientInfo[] = "standalone_sync_client"; |
| 276 std::string invalidator_id = base::RandBytesAsString(8); | 275 std::string invalidator_id = base::RandBytesAsString(8); |
| 277 NullInvalidationStateTracker null_invalidation_state_tracker; | 276 NullInvalidationStateTracker null_invalidation_state_tracker; |
| 278 scoped_ptr<Invalidator> invalidator(new NonBlockingInvalidator( | 277 scoped_ptr<Invalidator> invalidator(new NonBlockingInvalidator( |
| 279 network_channel_creator, | 278 network_channel_creator, |
| 280 invalidator_id, | 279 invalidator_id, |
| 281 null_invalidation_state_tracker.GetSavedInvalidations(), | 280 null_invalidation_state_tracker.GetSavedInvalidations(), |
| 282 null_invalidation_state_tracker.GetBootstrapData(), | 281 null_invalidation_state_tracker.GetBootstrapData(), |
| 283 WeakHandle<InvalidationStateTracker>( | 282 &null_invalidation_state_tracker, |
| 284 null_invalidation_state_tracker.AsWeakPtr()), | |
| 285 kClientInfo, | 283 kClientInfo, |
| 286 notifier_options.request_context_getter)); | 284 notifier_options.request_context_getter)); |
| 287 | 285 |
| 288 // Set up database directory for the syncer. | 286 // Set up database directory for the syncer. |
| 289 base::ScopedTempDir database_dir; | 287 base::ScopedTempDir database_dir; |
| 290 CHECK(database_dir.CreateUniqueTempDir()); | 288 CHECK(database_dir.CreateUniqueTempDir()); |
| 291 | 289 |
| 292 // Developers often add types to ModelTypeSet::All() before the server | 290 // Developers often add types to ModelTypeSet::All() before the server |
| 293 // supports them. We need to be explicit about which types we want here. | 291 // supports them. We need to be explicit about which types we want here. |
| 294 ModelTypeSet model_types; | 292 ModelTypeSet model_types; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 io_thread.Stop(); | 390 io_thread.Stop(); |
| 393 return 0; | 391 return 0; |
| 394 } | 392 } |
| 395 | 393 |
| 396 } // namespace | 394 } // namespace |
| 397 } // namespace syncer | 395 } // namespace syncer |
| 398 | 396 |
| 399 int main(int argc, char* argv[]) { | 397 int main(int argc, char* argv[]) { |
| 400 return syncer::SyncClientMain(argc, argv); | 398 return syncer::SyncClientMain(argc, argv); |
| 401 } | 399 } |
| OLD | NEW |