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/device_info/device_info_sync_service.h" | 5 #include "components/sync/device_info/device_info_sync_service.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | |
9 | |
10 #include <string> | |
11 | 8 |
12 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
13 #include "components/sync/api/sync_change.h" | |
14 #include "components/sync/api/sync_change_processor.h" | |
15 #include "components/sync/api/sync_change_processor_wrapper_for_test.h" | 10 #include "components/sync/api/sync_change_processor_wrapper_for_test.h" |
16 #include "components/sync/api/sync_error_factory_mock.h" | 11 #include "components/sync/api/sync_error_factory_mock.h" |
17 #include "components/sync/base/time.h" | 12 #include "components/sync/base/time.h" |
18 #include "components/sync/core/attachments/attachment_service_proxy_for_test.h" | 13 #include "components/sync/core/attachments/attachment_service_proxy_for_test.h" |
19 #include "components/sync/device_info/device_info_util.h" | 14 #include "components/sync/device_info/device_info_util.h" |
20 #include "components/sync/device_info/local_device_info_provider_mock.h" | 15 #include "components/sync/device_info/local_device_info_provider_mock.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
22 | 17 |
23 using base::Time; | 18 using base::Time; |
24 using base::TimeDelta; | 19 using base::TimeDelta; |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 sync_pb::EntitySpecifics entity; | 548 sync_pb::EntitySpecifics entity; |
554 sync_pb::DeviceInfoSpecifics& specifics = *entity.mutable_device_info(); | 549 sync_pb::DeviceInfoSpecifics& specifics = *entity.mutable_device_info(); |
555 specifics.set_cache_guid("stale"); | 550 specifics.set_cache_guid("stale"); |
556 StoreSyncData("stale", SyncData::CreateLocalData("stale", "stale", entity)); | 551 StoreSyncData("stale", SyncData::CreateLocalData("stale", "stale", entity)); |
557 EXPECT_EQ(0, CountActiveDevices(Time() + DeviceInfoUtil::kActiveThreshold)); | 552 EXPECT_EQ(0, CountActiveDevices(Time() + DeviceInfoUtil::kActiveThreshold)); |
558 } | 553 } |
559 | 554 |
560 } // namespace | 555 } // namespace |
561 | 556 |
562 } // namespace syncer | 557 } // namespace syncer |
OLD | NEW |