OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef COMPONENTS_SYNC_USER_EVENTS_GLOBAL_ID_MAPPER_H_ | |
6 #define COMPONENTS_SYNC_USER_EVENTS_GLOBAL_ID_MAPPER_H_ | |
7 | |
8 #include <stdint.h> | |
9 | |
10 #include "base/callback.h" | |
11 | |
12 namespace syncer { | |
13 | |
14 using GlobalIdChange = | |
15 base::RepeatingCallback<void(int64_t old_global_id, int64_t new_global_id)>; | |
16 | |
17 class GlobalIdMapper { | |
Patrick Noland
2017/06/28 22:44:37
Please add a comment explaining what this is class
skym
2017/07/05 19:14:28
Done.
| |
18 public: | |
19 // Register for information about changing | |
20 virtual void AddGlobalIdChangeObserver(GlobalIdChange callback) = 0; | |
21 | |
22 // Given a |global_id|, returns what the current |global_id| is for the given | |
23 // navigation, to the best of our ability. If we do not have such a mapping, | |
24 // which is quite possible, the input |global_id| is returned. | |
25 virtual int64_t GetLatestGlobalId(int64_t global_id) = 0; | |
Patrick Noland
2017/06/28 22:44:37
I think I understand what this is doing, but the c
skym
2017/07/05 19:14:28
Done the first and third requests, the class comme
| |
26 }; | |
27 | |
28 } // namespace syncer | |
29 | |
30 #endif // COMPONENTS_SYNC_USER_EVENTS_GLOBAL_ID_MAPPER_H_ | |
OLD | NEW |