| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef COMPONENTS_SYNC_SESSIONS_LOST_NAVIGATIONS_RECORDER_H_ | 5 #ifndef COMPONENTS_SYNC_SESSIONS_LOST_NAVIGATIONS_RECORDER_H_ |
| 6 #define COMPONENTS_SYNC_SESSIONS_LOST_NAVIGATIONS_RECORDER_H_ | 6 #define COMPONENTS_SYNC_SESSIONS_LOST_NAVIGATIONS_RECORDER_H_ |
| 7 | 7 |
| 8 #include <map> |
| 9 #include <set> |
| 10 |
| 8 #include "base/macros.h" | 11 #include "base/macros.h" |
| 9 #include "components/sessions/core/session_id.h" | 12 #include "components/sessions/core/session_id.h" |
| 10 #include "components/sync/api/local_change_observer.h" | 13 #include "components/sync/api/local_change_observer.h" |
| 11 #include "components/sync/api/sync_change.h" | 14 #include "components/sync/api/sync_change.h" |
| 12 #include "components/sync/protocol/session_specifics.pb.h" | 15 #include "components/sync/protocol/session_specifics.pb.h" |
| 13 | 16 |
| 14 namespace sync_sessions { | 17 namespace sync_sessions { |
| 15 | 18 |
| 16 // Recorder class that tracks the number of navigations written locally that | 19 // Recorder class that tracks the number of navigations written locally that |
| 17 // aren't synced. This is done by recording set of locally observed navigations | 20 // aren't synced. This is done by recording set of locally observed navigations |
| (...skipping 28 matching lines...) Expand all Loading... |
| 46 std::map<id_type, IdSet> recorded_navigation_ids_; | 49 std::map<id_type, IdSet> recorded_navigation_ids_; |
| 47 // The set of navigation ids most recently recorded for each tab_id. | 50 // The set of navigation ids most recently recorded for each tab_id. |
| 48 std::map<id_type, IdSet> latest_navigation_ids_; | 51 std::map<id_type, IdSet> latest_navigation_ids_; |
| 49 // The maximum navigation_id recorded for each tab_id. | 52 // The maximum navigation_id recorded for each tab_id. |
| 50 std::map<id_type, id_type> max_recorded_for_tab_; | 53 std::map<id_type, id_type> max_recorded_for_tab_; |
| 51 DISALLOW_COPY_AND_ASSIGN(LostNavigationsRecorder); | 54 DISALLOW_COPY_AND_ASSIGN(LostNavigationsRecorder); |
| 52 }; | 55 }; |
| 53 }; // namespace sync_sessions | 56 }; // namespace sync_sessions |
| 54 | 57 |
| 55 #endif // COMPONENTS_SYNC_SESSIONS_LOST_NAVIGATIONS_RECORDER_H_ | 58 #endif // COMPONENTS_SYNC_SESSIONS_LOST_NAVIGATIONS_RECORDER_H_ |
| OLD | NEW |