Skip to content
This repository was archived by the owner on Nov 1, 2022. It is now read-only.

Conversation

@BranescuMihai
Copy link
Contributor

Method used for custom search engines to reconstruct the user template that was used when the engine was added.


Pull Request checklist

  • Quality: This PR builds and passes detekt/ktlint checks (A pre-push hook is recommended)
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry or does not need one
  • Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features

After merge

  • Milestone: Make sure issues closed by this pull request are added to the milestone of the version currently in development.
  • Breaking Changes: If this is a breaking change, please push a draft PR on Reference Browser to address the breaking issues.

Method used for custom search engines to reconstruct the user template
that was used when the engine was added
@BranescuMihai BranescuMihai changed the title For #6686 - Added template getter bugfix/#6686 - Added search engine template getter Apr 16, 2020
@codecov
Copy link

codecov bot commented Apr 16, 2020

Codecov Report

Merging #6688 into master will increase coverage by 0.28%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #6688      +/-   ##
============================================
+ Coverage     77.62%   77.90%   +0.28%     
+ Complexity     4685     4640      -45     
============================================
  Files           623      595      -28     
  Lines         22942    22181     -761     
  Branches       3395     3322      -73     
============================================
- Hits          17808    17281     -527     
+ Misses         3739     3534     -205     
+ Partials       1395     1366      -29     
Impacted Files Coverage Δ Complexity Δ
.../mozilla/components/browser/search/SearchEngine.kt 100.00% <100.00%> (ø) 15.00 <1.00> (+1.00)
...onents/support/sync/telemetry/BaseGleanSyncPing.kt 100.00% <0.00%> (ø) 11.00% <0.00%> (ø%)
...a/components/concept/engine/webextension/Action.kt
...mozilla/components/concept/engine/DataCleanable.kt
...a/mozilla/components/concept/engine/media/Media.kt
...oncept/engine/webextension/WebExtensionDelegate.kt
...mozilla/components/concept/engine/prompt/Choice.kt
...engine/manifest/parser/WebAppManifestIconParser.kt
...ents/concept/engine/content/blocking/TrackerLog.kt
...concept/engine/webnotifications/WebNotification.kt
... and 32 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8ddaba...0e98c32. Read the comment docs.

@psymoon psymoon self-requested a review April 20, 2020 17:45
@psymoon psymoon self-assigned this Apr 20, 2020
Copy link
Contributor

@psymoon psymoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BranescuMihai This is for CustomSearchEngine in fenix, right? We're in the process of upstreaming SearchEngine stuff in fenix (i.e. #6662).

@BranescuMihai
Copy link
Contributor Author

@BranescuMihai This is for CustomSearchEngine in fenix, right? We're in the process of upstreaming SearchEngine stuff in fenix (i.e. #6662).

@psymoon yep, it's for supporting the undo operation for custom engines. CustomSearchEngineStore specified in the uplifting task constructs the engine from a xml, which would have been already deleted by the time of that undo, so we need to reconstruct the search query from the in-memory object.

Another option would be to delay the deletion of the xml until the undo operation is no longer possible, but that could lead to an incomplete deletion in case the user closes the app.

@BranescuMihai BranescuMihai requested a review from psymoon May 8, 2020 08:36
@psymoon
Copy link
Contributor

psymoon commented May 8, 2020

bors r=psymoon

@bors
Copy link

bors bot commented May 8, 2020

Build succeeded:

@bors bors bot merged commit 9db12cb into mozilla-mobile:master May 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants