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 #include "base/metrics/histogram_macros.h" | 5 #include "base/metrics/histogram_macros.h" |
6 #include "base/stl_util.h" | 6 #include "base/stl_util.h" |
7 #include "components/sync/api/sync_change.h" | |
8 #include "components/sync/syncable/entry.h" | 7 #include "components/sync/syncable/entry.h" |
9 #include "components/sync_sessions/lost_navigations_recorder.h" | 8 #include "components/sync_sessions/lost_navigations_recorder.h" |
10 | 9 |
11 namespace sync_sessions { | 10 namespace sync_sessions { |
12 | 11 |
13 LostNavigationsRecorder::LostNavigationsRecorder() | 12 LostNavigationsRecorder::LostNavigationsRecorder() |
14 : recorder_state_(RECORDER_STATE_NOT_SYNCING) {} | 13 : recorder_state_(RECORDER_STATE_NOT_SYNCING) {} |
15 | 14 |
16 LostNavigationsRecorder::~LostNavigationsRecorder() {} | 15 LostNavigationsRecorder::~LostNavigationsRecorder() {} |
17 | 16 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 126 |
128 // The set of lost navigations is anything we recorded as new that's not | 127 // The set of lost navigations is anything we recorded as new that's not |
129 // present in latest. | 128 // present in latest. |
130 IdSet lost_navs = base::STLSetDifference<IdSet>(recorded, latest); | 129 IdSet lost_navs = base::STLSetDifference<IdSet>(recorded, latest); |
131 int quantity_lost = lost_navs.size(); | 130 int quantity_lost = lost_navs.size(); |
132 UMA_HISTOGRAM_COUNTS("Sync.LostNavigationCount", quantity_lost); | 131 UMA_HISTOGRAM_COUNTS("Sync.LostNavigationCount", quantity_lost); |
133 recorded.clear(); | 132 recorded.clear(); |
134 } | 133 } |
135 } | 134 } |
136 } // namespace sync_sessions | 135 } // namespace sync_sessions |
OLD | NEW |