OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_driver/revisit/current_tab_matcher.h" | 5 #include "components/sync_driver/revisit/current_tab_matcher.h" |
6 | 6 |
7 #include "base/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "components/sessions/serialized_navigation_entry.h" | 9 #include "components/sessions/core/serialized_navigation_entry.h" |
10 | 10 |
11 namespace sync_driver { | 11 namespace sync_driver { |
12 | 12 |
13 CurrentTabMatcher::CurrentTabMatcher(const PageEquality& page_equality) | 13 CurrentTabMatcher::CurrentTabMatcher(const PageEquality& page_equality) |
14 : page_equality_(page_equality) {} | 14 : page_equality_(page_equality) {} |
15 | 15 |
16 void CurrentTabMatcher::Check(const sessions::SessionTab* tab) { | 16 void CurrentTabMatcher::Check(const sessions::SessionTab* tab) { |
17 if (tab->navigations.empty()) { | 17 if (tab->navigations.empty()) { |
18 return; | 18 return; |
19 } | 19 } |
(...skipping 17 matching lines...) Expand all Loading... |
37 base::TimeDelta age(base::Time::Now() - most_recent_match_->timestamp); | 37 base::TimeDelta age(base::Time::Now() - most_recent_match_->timestamp); |
38 UMA_HISTOGRAM_CUSTOM_TIMES("Sync.PageRevisitTabMatchAge", age, | 38 UMA_HISTOGRAM_CUSTOM_TIMES("Sync.PageRevisitTabMatchAge", age, |
39 base::TimeDelta::FromSeconds(1), | 39 base::TimeDelta::FromSeconds(1), |
40 base::TimeDelta::FromDays(14), 100); | 40 base::TimeDelta::FromDays(14), 100); |
41 UMA_HISTOGRAM_ENUMERATION("Sync.PageRevisitTabMatchTransition", transition, | 41 UMA_HISTOGRAM_ENUMERATION("Sync.PageRevisitTabMatchTransition", transition, |
42 PageVisitObserver::kTransitionTypeLast); | 42 PageVisitObserver::kTransitionTypeLast); |
43 } | 43 } |
44 } | 44 } |
45 | 45 |
46 } // namespace sync_driver | 46 } // namespace sync_driver |
OLD | NEW |