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 10, 2020
1 parent ea0f373 commit 1972a16
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 @@ -183,6 +183,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 @@ -659,6 +659,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 1972a16

Please sign in to comment.