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/sessions_page_revisit_observer.h" | 5 #include "components/sync_driver/revisit/sessions_page_revisit_observer.h" |
6 | 6 |
7 #include "base/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
8 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
9 #include "components/sessions/session_types.h" | 9 #include "components/sessions/core/session_types.h" |
10 #include "components/sync_driver/glue/synced_session.h" | 10 #include "components/sync_driver/glue/synced_session.h" |
11 #include "components/sync_driver/revisit/current_tab_matcher.h" | 11 #include "components/sync_driver/revisit/current_tab_matcher.h" |
12 #include "components/sync_driver/revisit/offset_tab_matcher.h" | 12 #include "components/sync_driver/revisit/offset_tab_matcher.h" |
13 #include "components/sync_driver/revisit/page_equality.h" | 13 #include "components/sync_driver/revisit/page_equality.h" |
14 | 14 |
15 namespace sync_driver { | 15 namespace sync_driver { |
16 | 16 |
17 SessionsPageRevisitObserver::SessionsPageRevisitObserver( | 17 SessionsPageRevisitObserver::SessionsPageRevisitObserver( |
18 scoped_ptr<ForeignSessionsProvider> provider) | 18 scoped_ptr<ForeignSessionsProvider> provider) |
19 : provider_(provider.Pass()) {} | 19 : provider_(provider.Pass()) {} |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 // emit even if there are no foreign sessions so that that counts all match. | 70 // emit even if there are no foreign sessions so that that counts all match. |
71 current_matcher.Emit(transition); | 71 current_matcher.Emit(transition); |
72 offset_matcher.Emit(transition); | 72 offset_matcher.Emit(transition); |
73 | 73 |
74 base::TimeDelta duration(base::TimeTicks::Now() - start); | 74 base::TimeDelta duration(base::TimeTicks::Now() - start); |
75 UMA_HISTOGRAM_TIMES("Sync.PageRevisitSessionDuration", duration); | 75 UMA_HISTOGRAM_TIMES("Sync.PageRevisitSessionDuration", duration); |
76 } | 76 } |
77 | 77 |
78 } // namespace sync_driver | 78 } // namespace sync_driver |
OLD | NEW |