Skip to content

Commit

Permalink
For mozilla-mobile#15366: Add recently closed tabs metrics.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarare committed Dec 15, 2020
1 parent d0f2209 commit 2f360eb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ sealed class Event {

object TabSettingsOpened : Event()

object RecentlyClosedTabsOpened : Event()

// Interaction events with extras

data class TopSiteSwipeCarousel(val page: Int) : Event() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,10 @@ private val Event.wrapper: EventWrapper<*>?
{ ProgressiveWebApp.backgroundKeys.valueOf(it) }
)

is Event.RecentlyClosedTabsOpened -> EventWrapper<NoExtraKeys>(
{ Events.recentlyClosedTabsOpened.record(it) }
)

Event.MasterPasswordMigrationDisplayed -> EventWrapper<NoExtraKeys>(
{ MasterPassword.displayed.record(it) }
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ class DefaultTabTrayController(
override fun handleRecentlyClosedClicked() {
val directions = TabTrayDialogFragmentDirections.actionGlobalRecentlyClosed()
navController.navigate(directions)
metrics.track(Event.RecentlyClosedTabsOpened)
}

override fun handleGoToTabsSettingClicked() {
Expand Down

0 comments on commit 2f360eb

Please sign in to comment.