This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into 12289
# Conflicts: # docs/changelog.md
- Loading branch information
Showing
36 changed files
with
631 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...nents/concept/base/src/main/java/mozilla/components/concept/base/crash/RustCrashReport.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
package mozilla.components.concept.base.crash | ||
|
||
/** | ||
* Crash report for rust errors | ||
* | ||
* We implement this on exception classes that correspond to Rust errors to | ||
* customize how the crash reports look. | ||
* | ||
* CrashReporting implementors should test if exceptions implement this | ||
* interface. If so, they should try to customize their crash reports to match. | ||
*/ | ||
interface RustCrashReport { | ||
val typeName: String | ||
val message: String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
...mpts/src/main/java/mozilla/components/feature/prompts/facts/AddressAutofillDialogFacts.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
package mozilla.components.feature.prompts.facts | ||
|
||
import mozilla.components.support.base.Component | ||
import mozilla.components.support.base.facts.Action | ||
import mozilla.components.support.base.facts.Fact | ||
import mozilla.components.support.base.facts.collect | ||
|
||
/** | ||
* Facts emitted for telemetry related to the Autofill prompt feature for addresses. | ||
*/ | ||
class AddressAutofillDialogFacts { | ||
/** | ||
* Specific types of telemetry items. | ||
*/ | ||
object Items { | ||
const val AUTOFILL_ADDRESS_FORM_DETECTED = "autofill_address_form_detected" | ||
const val AUTOFILL_ADDRESS_SUCCESS = "autofill_address_success" | ||
const val AUTOFILL_ADDRESS_PROMPT_SHOWN = "autofill_address_prompt_shown" | ||
const val AUTOFILL_ADDRESS_PROMPT_EXPANDED = "autofill_address_prompt_expanded" | ||
const val AUTOFILL_ADDRESS_PROMPT_DISMISSED = "autofill_address_prompt_dismissed" | ||
} | ||
} | ||
|
||
private fun emitAddressAutofillDialogFact( | ||
action: Action, | ||
item: String, | ||
value: String? = null, | ||
metadata: Map<String, Any>? = null | ||
) { | ||
Fact( | ||
Component.FEATURE_PROMPTS, | ||
action, | ||
item, | ||
value, | ||
metadata | ||
).collect() | ||
} | ||
|
||
internal fun emitSuccessfulAddressAutofillFormDetectedFact() { | ||
emitAddressAutofillDialogFact( | ||
Action.INTERACTION, | ||
AddressAutofillDialogFacts.Items.AUTOFILL_ADDRESS_FORM_DETECTED | ||
) | ||
} | ||
|
||
internal fun emitSuccessfulAddressAutofillSuccessFact() { | ||
emitAddressAutofillDialogFact( | ||
Action.INTERACTION, | ||
AddressAutofillDialogFacts.Items.AUTOFILL_ADDRESS_SUCCESS | ||
) | ||
} | ||
|
||
internal fun emitAddressAutofillShownFact() { | ||
emitAddressAutofillDialogFact( | ||
Action.INTERACTION, | ||
AddressAutofillDialogFacts.Items.AUTOFILL_ADDRESS_PROMPT_SHOWN | ||
) | ||
} | ||
|
||
internal fun emitAddressAutofillExpandedFact() { | ||
emitAddressAutofillDialogFact( | ||
Action.INTERACTION, | ||
AddressAutofillDialogFacts.Items.AUTOFILL_ADDRESS_PROMPT_EXPANDED | ||
) | ||
} | ||
|
||
internal fun emitAddressAutofillDismissedFact() { | ||
emitAddressAutofillDialogFact( | ||
Action.INTERACTION, | ||
AddressAutofillDialogFacts.Items.AUTOFILL_ADDRESS_PROMPT_DISMISSED | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.