Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: components/sync_sessions/lost_navigations_recorder.h

Issue 2401223002: [Sync] Renaming sync/api* to sync/model*. (Closed)
Patch Set: Missed a comment in a DEPS file, and rebasing. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "components/sessions/core/session_id.h" 12 #include "components/sessions/core/session_id.h"
13 #include "components/sync/api/local_change_observer.h" 13 #include "components/sync/model/local_change_observer.h"
14 #include "components/sync/api/sync_change.h" 14 #include "components/sync/model/sync_change.h"
15 #include "components/sync/protocol/session_specifics.pb.h" 15 #include "components/sync/protocol/session_specifics.pb.h"
16 16
17 namespace sync_sessions { 17 namespace sync_sessions {
18 18
19 // Recorder class that tracks the number of navigations written locally that 19 // Recorder class that tracks the number of navigations written locally that
20 // 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
21 // and reconciling these sets against what was ultimately synced. These 21 // and reconciling these sets against what was ultimately synced. These
22 // navigations ultimately feed chrome history, so losing them prevents them from 22 // navigations ultimately feed chrome history, so losing them prevents them from
23 // being reflected in the history page. 23 // being reflected in the history page.
24 class LostNavigationsRecorder : public syncer::LocalChangeObserver { 24 class LostNavigationsRecorder : public syncer::LocalChangeObserver {
(...skipping 24 matching lines...) Expand all
49 std::map<id_type, IdSet> recorded_navigation_ids_; 49 std::map<id_type, IdSet> recorded_navigation_ids_;
50 // 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.
51 std::map<id_type, IdSet> latest_navigation_ids_; 51 std::map<id_type, IdSet> latest_navigation_ids_;
52 // The maximum navigation_id recorded for each tab_id. 52 // The maximum navigation_id recorded for each tab_id.
53 std::map<id_type, id_type> max_recorded_for_tab_; 53 std::map<id_type, id_type> max_recorded_for_tab_;
54 DISALLOW_COPY_AND_ASSIGN(LostNavigationsRecorder); 54 DISALLOW_COPY_AND_ASSIGN(LostNavigationsRecorder);
55 }; 55 };
56 }; // namespace sync_sessions 56 }; // namespace sync_sessions
57 57
58 #endif // COMPONENTS_SYNC_SESSIONS_LOST_NAVIGATIONS_RECORDER_H_ 58 #endif // COMPONENTS_SYNC_SESSIONS_LOST_NAVIGATIONS_RECORDER_H_
OLDNEW
« no previous file with comments | « components/sync_sessions/favicon_cache_unittest.cc ('k') | components/sync_sessions/lost_navigations_recorder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698