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_driver/device_info_service.h" | 5 #include "components/sync/driver/device_info_service.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <memory> | 8 #include <memory> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 #include <utility> | 11 #include <utility> |
12 | 12 |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
17 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
18 #include "components/sync/api/data_batch.h" | 18 #include "components/sync/api/data_batch.h" |
19 #include "components/sync/api/entity_data.h" | 19 #include "components/sync/api/entity_data.h" |
20 #include "components/sync/api/fake_model_type_change_processor.h" | 20 #include "components/sync/api/fake_model_type_change_processor.h" |
21 #include "components/sync/api/metadata_batch.h" | 21 #include "components/sync/api/metadata_batch.h" |
22 #include "components/sync/api/model_type_store.h" | 22 #include "components/sync/api/model_type_store.h" |
23 #include "components/sync/base/time.h" | 23 #include "components/sync/base/time.h" |
24 #include "components/sync/core/test/data_type_error_handler_mock.h" | 24 #include "components/sync/core/test/data_type_error_handler_mock.h" |
25 #include "components/sync/core/test/model_type_store_test_util.h" | 25 #include "components/sync/core/test/model_type_store_test_util.h" |
| 26 #include "components/sync/driver/local_device_info_provider_mock.h" |
26 #include "components/sync/protocol/data_type_state.pb.h" | 27 #include "components/sync/protocol/data_type_state.pb.h" |
27 #include "components/sync_driver/local_device_info_provider_mock.h" | |
28 #include "testing/gtest/include/gtest/gtest.h" | 28 #include "testing/gtest/include/gtest/gtest.h" |
29 | 29 |
30 namespace sync_driver_v2 { | 30 namespace sync_driver_v2 { |
31 | 31 |
32 using base::Time; | 32 using base::Time; |
33 using base::TimeDelta; | 33 using base::TimeDelta; |
34 using syncer::SyncError; | 34 using syncer::SyncError; |
35 using syncer_v2::DataBatch; | 35 using syncer_v2::DataBatch; |
36 using syncer_v2::EntityChange; | 36 using syncer_v2::EntityChange; |
37 using syncer_v2::EntityChangeList; | 37 using syncer_v2::EntityChangeList; |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 specifics.set_cache_guid("non-local"); | 771 specifics.set_cache_guid("non-local"); |
772 PushBackEntityChangeAdd(specifics, &change_list); | 772 PushBackEntityChangeAdd(specifics, &change_list); |
773 service()->ApplySyncChanges(service()->CreateMetadataChangeList(), | 773 service()->ApplySyncChanges(service()->CreateMetadataChangeList(), |
774 change_list); | 774 change_list); |
775 EXPECT_EQ(1, service()->CountActiveDevices()); | 775 EXPECT_EQ(1, service()->CountActiveDevices()); |
776 } | 776 } |
777 | 777 |
778 } // namespace | 778 } // namespace |
779 | 779 |
780 } // namespace sync_driver_v2 | 780 } // namespace sync_driver_v2 |
OLD | NEW |