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/location.h" | 12 #include "base/location.h" |
13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
15 #include "components/sync/api/entity_change.h" | |
16 #include "components/sync/api/metadata_batch.h" | |
17 #include "components/sync/api/sync_error.h" | |
18 #include "components/sync/base/time.h" | 15 #include "components/sync/base/time.h" |
19 #include "components/sync/core/data_batch_impl.h" | 16 #include "components/sync/core/data_batch_impl.h" |
20 #include "components/sync/device_info/device_info_util.h" | 17 #include "components/sync/device_info/device_info_util.h" |
| 18 #include "components/sync/model/entity_change.h" |
| 19 #include "components/sync/model/metadata_batch.h" |
| 20 #include "components/sync/model/sync_error.h" |
21 #include "components/sync/protocol/model_type_state.pb.h" | 21 #include "components/sync/protocol/model_type_state.pb.h" |
22 #include "components/sync/protocol/sync.pb.h" | 22 #include "components/sync/protocol/sync.pb.h" |
23 | 23 |
24 namespace syncer { | 24 namespace syncer { |
25 | 25 |
26 using base::Time; | 26 using base::Time; |
27 using base::TimeDelta; | 27 using base::TimeDelta; |
28 using sync_pb::DeviceInfoSpecifics; | 28 using sync_pb::DeviceInfoSpecifics; |
29 using sync_pb::EntitySpecifics; | 29 using sync_pb::EntitySpecifics; |
30 using sync_pb::ModelTypeState; | 30 using sync_pb::ModelTypeState; |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 Time DeviceInfoService::GetLastUpdateTime( | 515 Time DeviceInfoService::GetLastUpdateTime( |
516 const DeviceInfoSpecifics& specifics) { | 516 const DeviceInfoSpecifics& specifics) { |
517 if (specifics.has_last_updated_timestamp()) { | 517 if (specifics.has_last_updated_timestamp()) { |
518 return ProtoTimeToTime(specifics.last_updated_timestamp()); | 518 return ProtoTimeToTime(specifics.last_updated_timestamp()); |
519 } else { | 519 } else { |
520 return Time(); | 520 return Time(); |
521 } | 521 } |
522 } | 522 } |
523 | 523 |
524 } // namespace syncer | 524 } // namespace syncer |
OLD | NEW |