| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/device_info/device_info_service.h" | 5 #include "components/sync/device_info/device_info_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
| 13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
| 14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
| 15 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
| 16 #include "components/sync/base/time.h" | 16 #include "components/sync/base/time.h" |
| 17 #include "components/sync/core/test/model_type_store_test_util.h" | |
| 18 #include "components/sync/device_info/local_device_info_provider_mock.h" | 17 #include "components/sync/device_info/local_device_info_provider_mock.h" |
| 19 #include "components/sync/model/data_batch.h" | 18 #include "components/sync/model/data_batch.h" |
| 20 #include "components/sync/model/data_type_error_handler_mock.h" | 19 #include "components/sync/model/data_type_error_handler_mock.h" |
| 21 #include "components/sync/model/entity_data.h" | 20 #include "components/sync/model/entity_data.h" |
| 22 #include "components/sync/model/fake_model_type_change_processor.h" | 21 #include "components/sync/model/fake_model_type_change_processor.h" |
| 23 #include "components/sync/model/metadata_batch.h" | 22 #include "components/sync/model/metadata_batch.h" |
| 23 #include "components/sync/model/model_type_store_test_util.h" |
| 24 #include "components/sync/protocol/model_type_state.pb.h" | 24 #include "components/sync/protocol/model_type_state.pb.h" |
| 25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
| 26 | 26 |
| 27 namespace syncer { | 27 namespace syncer { |
| 28 | 28 |
| 29 using base::Time; | 29 using base::Time; |
| 30 using base::TimeDelta; | 30 using base::TimeDelta; |
| 31 using sync_pb::DeviceInfoSpecifics; | 31 using sync_pb::DeviceInfoSpecifics; |
| 32 using sync_pb::EntitySpecifics; | 32 using sync_pb::EntitySpecifics; |
| 33 using sync_pb::ModelTypeState; | 33 using sync_pb::ModelTypeState; |
| (...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 specifics.set_cache_guid("non-local"); | 727 specifics.set_cache_guid("non-local"); |
| 728 PushBackEntityChangeAdd(specifics, &change_list); | 728 PushBackEntityChangeAdd(specifics, &change_list); |
| 729 service()->ApplySyncChanges(service()->CreateMetadataChangeList(), | 729 service()->ApplySyncChanges(service()->CreateMetadataChangeList(), |
| 730 change_list); | 730 change_list); |
| 731 EXPECT_EQ(2, service()->CountActiveDevices()); | 731 EXPECT_EQ(2, service()->CountActiveDevices()); |
| 732 } | 732 } |
| 733 | 733 |
| 734 } // namespace | 734 } // namespace |
| 735 | 735 |
| 736 } // namespace syncer | 736 } // namespace syncer |
| OLD | NEW |