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 "components/sync_sessions/sync_sessions_metrics.h" | 5 #include "components/sync_sessions/sync_sessions_metrics.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/metrics/histogram_macros.h" | 11 #include "base/metrics/histogram_macros.h" |
12 #include "base/metrics/user_metrics.h" | |
13 #include "base/time/time.h" | 12 #include "base/time/time.h" |
14 #include "components/sessions/core/session_types.h" | 13 #include "components/sessions/core/session_types.h" |
15 #include "components/sync_sessions/sessions_sync_manager.h" | 14 #include "components/sync_sessions/sessions_sync_manager.h" |
16 #include "components/sync_sessions/synced_session.h" | 15 #include "components/sync_sessions/synced_session.h" |
17 | 16 |
18 namespace sync_sessions { | 17 namespace sync_sessions { |
19 | 18 |
20 // static | 19 // static |
21 void SyncSessionsMetrics::RecordYoungestForeignTabAgeOnNTP( | 20 void SyncSessionsMetrics::RecordYoungestForeignTabAgeOnNTP( |
22 SessionsSyncManager* sessions_sync_manager) { | 21 SessionsSyncManager* sessions_sync_manager) { |
(...skipping 30 matching lines...) Expand all Loading... |
53 for (const auto& key_value : session->windows) { | 52 for (const auto& key_value : session->windows) { |
54 for (const auto& tab : key_value.second->tabs) { | 53 for (const auto& tab : key_value.second->tabs) { |
55 best = std::max(best, tab->timestamp); | 54 best = std::max(best, tab->timestamp); |
56 } | 55 } |
57 } | 56 } |
58 } | 57 } |
59 return best; | 58 return best; |
60 } | 59 } |
61 | 60 |
62 } // namespace sync_sessions | 61 } // namespace sync_sessions |
OLD | NEW |