Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
Bug 1877847 - Remove Suggest error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
bendk committed Feb 2, 2024
1 parent e1e6e86 commit 68b2516
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 109 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ import java.io.File
* @param crashReporter An optional [CrashReporting] instance for reporting unexpected caught
* exceptions.
*/
class FxSuggestStorage(
context: Context,
private val crashReporter: CrashReporting? = null,
) {
class FxSuggestStorage(context: Context) {
// Lazily initializes the store on first use. `cacheDir` and using the `File` constructor
// does I/O, so `store.value` should only be accessed from the read or write scope.
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
Expand Down Expand Up @@ -99,7 +96,6 @@ class FxSuggestStorage(
return try {
operation()
} catch (e: SuggestApiException) {
crashReporter?.submitCaughtException(e)
logger.warn("Ignoring exception from `$name`", e)
default
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class Components(private val context: Context) {
)
}

val fxSuggest by lazyMonitored { FxSuggest(context, analytics.crashReporter) }
val fxSuggest by lazyMonitored { FxSuggest(context) }
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package org.mozilla.fenix.components

import android.content.Context
import mozilla.components.concept.base.crash.CrashReporting
import mozilla.components.feature.fxsuggest.FxSuggestIngestionScheduler
import mozilla.components.feature.fxsuggest.FxSuggestStorage
import org.mozilla.fenix.perf.lazyMonitored
Expand All @@ -14,12 +13,10 @@ import org.mozilla.fenix.perf.lazyMonitored
* Component group for Firefox Suggest.
*
* @param context The Android application context.
* @param crashReporter An optional [CrashReporting] instance for reporting unexpected caught
* exceptions.
*/
class FxSuggest(context: Context, crashReporter: CrashReporting? = null) {
class FxSuggest(context: Context) {
val storage by lazyMonitored {
FxSuggestStorage(context, crashReporter)
FxSuggestStorage(context)
}

val ingestionScheduler by lazyMonitored {
Expand Down

0 comments on commit 68b2516

Please sign in to comment.