| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/sync_driver/generic_change_processor.h" | 5 #include "components/sync_driver/generic_change_processor.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 |
| 8 #include <algorithm> | 9 #include <algorithm> |
| 9 #include <string> | 10 #include <string> |
| 10 #include <utility> | 11 #include <utility> |
| 11 | 12 |
| 12 #include "base/location.h" | 13 #include "base/location.h" |
| 13 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 14 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 15 #include "base/threading/thread_task_runner_handle.h" | 16 #include "base/threading/thread_task_runner_handle.h" |
| 17 #include "components/sync/api/sync_change.h" |
| 18 #include "components/sync/api/sync_error.h" |
| 19 #include "components/sync/api/syncable_service.h" |
| 20 #include "components/sync/base/unrecoverable_error_handler.h" |
| 21 #include "components/sync/core/base_node.h" |
| 22 #include "components/sync/core/change_record.h" |
| 23 #include "components/sync/core/data_type_error_handler.h" |
| 24 #include "components/sync/core/read_node.h" |
| 25 #include "components/sync/core/read_transaction.h" |
| 26 #include "components/sync/core/write_node.h" |
| 27 #include "components/sync/core/write_transaction.h" |
| 28 #include "components/sync/syncable/entry.h" // TODO(tim): Bug 123674. |
| 16 #include "components/sync_driver/sync_api_component_factory.h" | 29 #include "components/sync_driver/sync_api_component_factory.h" |
| 17 #include "components/sync_driver/sync_client.h" | 30 #include "components/sync_driver/sync_client.h" |
| 18 #include "sync/api/sync_change.h" | |
| 19 #include "sync/api/sync_error.h" | |
| 20 #include "sync/api/syncable_service.h" | |
| 21 #include "sync/internal_api/public/base_node.h" | |
| 22 #include "sync/internal_api/public/change_record.h" | |
| 23 #include "sync/internal_api/public/data_type_error_handler.h" | |
| 24 #include "sync/internal_api/public/read_node.h" | |
| 25 #include "sync/internal_api/public/read_transaction.h" | |
| 26 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" | |
| 27 #include "sync/internal_api/public/write_node.h" | |
| 28 #include "sync/internal_api/public/write_transaction.h" | |
| 29 #include "sync/syncable/entry.h" // TODO(tim): Bug 123674. | |
| 30 | 31 |
| 31 namespace sync_driver { | 32 namespace sync_driver { |
| 32 | 33 |
| 33 namespace { | 34 namespace { |
| 34 | 35 |
| 35 const int kContextSizeLimit = 1024; // Datatype context size limit. | 36 const int kContextSizeLimit = 1024; // Datatype context size limit. |
| 36 | 37 |
| 37 void SetNodeSpecifics(const sync_pb::EntitySpecifics& entity_specifics, | 38 void SetNodeSpecifics(const sync_pb::EntitySpecifics& entity_specifics, |
| 38 syncer::WriteNode* write_node) { | 39 syncer::WriteNode* write_node) { |
| 39 if (syncer::GetModelTypeFromSpecifics(entity_specifics) == | 40 if (syncer::GetModelTypeFromSpecifics(entity_specifics) == |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 } | 696 } |
| 696 } | 697 } |
| 697 | 698 |
| 698 std::unique_ptr<syncer::AttachmentService> | 699 std::unique_ptr<syncer::AttachmentService> |
| 699 GenericChangeProcessor::GetAttachmentService() const { | 700 GenericChangeProcessor::GetAttachmentService() const { |
| 700 return std::unique_ptr<syncer::AttachmentService>( | 701 return std::unique_ptr<syncer::AttachmentService>( |
| 701 new syncer::AttachmentServiceProxy(attachment_service_proxy_)); | 702 new syncer::AttachmentServiceProxy(attachment_service_proxy_)); |
| 702 } | 703 } |
| 703 | 704 |
| 704 } // namespace sync_driver | 705 } // namespace sync_driver |
| OLD | NEW |