Commit graph

16 commits

Author SHA1 Message Date
Rob Wu
7fa47a343f Bug 1570700 - Drop support for resource/chrome icons in search engines r=mkaply,daleharvey,mixedpuppy
All built-in engines have migrated from OpenSearch to WebExtensions.
WebExtensions do not support resource: or chrome:-URLs in their
`favicon_url` field, so the "resource:" and "chrome:" URLs can only be
used by external opensearch XML files. These should not rely on internal
resources from omni.ja, as the bug shows. So just drop support for
"chrome:" and "resource:"-URLs, as we don't need them any more.

Current OpenSearch engines that relied on chrome/resource:-URLs can
either replace the URL with a data:-URL, or migrate to WebExtensions.

Differential Revision: https://phabricator.services.mozilla.com/D40345

--HG--
extra : moz-landing-system : lando
2019-08-07 16:38:54 +00:00
Victor Porof
1f830c96da Bug 1561435 - Format browser/components/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D36042

--HG--
extra : source : d3afcafdce650a6f36cebbc126ee93b17f13cf52
2019-07-05 09:53:32 +02:00
Mike de Boer
481ae95c00 Bug 1524593 - nsISearchService (aka nsIBrowserSearchService, previously) refactor to be mostly an asynchronous, in preparation of WebExtension engines. r=daleharvey
This is a rollup of all the patches that have landed on the cedar project branch:

891252fdd0
Bug 1492475 - Part 1: Migrate most, if not all nsSearchService consumers to use async APIs. r=florian

79b2eb2367
Bug 1492475 - Part 2: Move nsIBrowserSearchService.idl to toolkit/components/search/nsISearchService.idl and update references. r=florian

a947d3cdf0
Bug 1492475 - Part 3: The search service init() method should simply return a Promise. r=florian

c1e172dfac
Bug 1492475 - Part 4: Remove the synchronous initialization flow. r=florian

cd41189eac
Bug 1492475 - Part 5: Since async initialization of the search service now is implicit behavior, remove the distinctive verbiage used internally. r=florian

2ae7189dfa
Bug 1492475 - Part 6: Update the cache build task to work with an actual Promise and re-initialize only once at the same time - all to fix race conditions here. r=florian

c8ee92973f
Bug 1492475 - Part 7: Make the region fetch not block the init flow, to ensure it's as fast as possible. r=florian

c44e674e16
Bug 1492475 - Part 8: Introduce an init flag, which can only be used privately, that allows to explicitly skip waiting for the region check process to complete. r=florian

6c79eaf1d3
Bug 1492475 - Part 9: Update unit tests to stop using 'currentEngine', in favor of 'defaultEngine'. r=Standard8

21b3aa17ee
Bug 1492475 - Part 10: Update unit tests to be fully aware of the new, async signatures of the search service API and remove sync init flow tests. r=mkaply,florian

ce5ba69019
Bug 1492475 - Part 11: Repair incorrect usage of the `identifier` property of nsISearchEngine instances. r=florian

fd177a7994
Bug 1518543 - Fix up the Android (Fennec) nsISearchService shim to work with the new asynchronous API. r=florian

3653d8ee22
Bug 1523708 - Change the search service interaction in the show-heartbeat action to use the new async API. r=florian

Differential Revision: https://phabricator.services.mozilla.com/D18355

--HG--
rename : netwerk/base/nsIBrowserSearchService.idl => toolkit/components/search/nsISearchService.idl
extra : moz-landing-system : lando
2019-02-02 11:27:21 +00:00
Drew Willcoxon
9fbda91757 Bug 1504370 - Update SEARCH_COUNTS telemetry for private browsing mode r=mkaply
* If a search is performed in a private window and the new pref `browser.engagement.search_counts.pbm` is true, then do not record `SEARCH_COUNTS` telemetry. Note that the the pref must be true. If it's false or doesn't exist, then we record telemetry even in pbm like we normally do currently. (We record `SEARCH_COUNTS` telemetry in two places: (1) In BrowserUsageTelemetry.jsm, and (2) "in-content" telemetry directly in the search service. So skip both of those places.)
* Also skip the other ancillary telemetry recorded by `BrowserUsageTelemetry._recordSearch`: a keyed scalar and a telemetry event.
* I made some modifications to the search service to let me test the "in-content" telemetry keys

Differential Revision: https://phabricator.services.mozilla.com/D10851

--HG--
extra : moz-landing-system : lando
2018-11-06 17:58:07 +00:00
Siddhant085
6ab6938f8c Bug 1493483 - Use nsIBrowserSearchService::defaultEngine instead of currentEngine (in production code) r=Standard8
nsIBrowserSearchService::currentEngine and nsIBrowserSearchService::defaultEngine are the same thing.
The use of defaultEngine makes more sense and thus we are phasing out the use of currentEngine and replace it with defaultEngine.

Differential Revision: https://phabricator.services.mozilla.com/D7972

--HG--
extra : moz-landing-system : lando
2018-10-27 16:52:02 +00:00
Csoregi Natalia
523d3ae4fe Backed out changeset c35bab726b03 (bug 1493483) for multiple browser-chrome failures e.g browser_extension_controlled.js. CLOSED TREE 2018-10-09 23:26:24 +03:00
Siddhant085
5e4fc9f261 Bug 1493483 - Use nsIBrowserSearchService::defaultEngine instead of currentEngine (in production code) r=Standard8
nsIBrowserSearchService::currentEngine and nsIBrowserSearchService::defaultEngine are the same thing.
The use of defaultEngine makes more sense and thus we are phasing out the use of currentEngine and replace it with defaultEngine.

Differential Revision: https://phabricator.services.mozilla.com/D7972

--HG--
extra : moz-landing-system : lando
2018-10-09 18:40:08 +00:00
Michael Kaply
44622e08e5 Bug 1492233 - Add telemetry for search from webextension. r=mikedeboer
Differential Revision: https://phabricator.services.mozilla.com/D6262

--HG--
extra : moz-landing-system : lando
2018-09-21 20:08:28 +00:00
Arshad Kazmi
806adb937f Bug 1487854 - Use getVisibleEngines in browser.search.get r=robwu, aswan
Reviewers: robwu, aswan

Reviewed By: robwu, aswan

Bug #: 1487854

Differential Revision: https://phabricator.services.mozilla.com/D5749

--HG--
extra : rebase_source : 3414382a44acb4f75b7c86032378cd6d8a5b88f8
extra : histedit_source : 15b5ca8f71fa3fec0306aab9297c0917f37774cb
2018-09-16 02:07:22 +03:00
Rob Wu
36516a10a8 Bug 1475842 - Change parameter format in browser.search API r=rpl
Changes to browser.search.search API:
- Change the positional parameters to an object parameter.
- Rename "engineName" to "engine", and make this an optional parameter.
- Rename "searchTerms" to "query".

Changes to browser.search.search implementation:
- Simplify gBrowser getter. None of the "!gBrowser" conditionals are
  necessary, as demonstrated by the new options page+sidebar tests
  (which passed even after  removing the `if (!gBrowser ...)` blocks).
  Use windowTracker.topWindow for consistency with our other code.

Test changes:
- Remove unneeded name / "TEST_ID" in tests
- Use SEARCH_TERM constant in more places.
- New test: Using API from options page.
- New test: Using API from sidebar.
- New test: Using API without explicit "engine" parameter.

Differential Revision: https://phabricator.services.mozilla.com/D3417

--HG--
extra : moz-landing-system : lando
2018-08-21 14:43:46 +00:00
Michael Kaply
879bad8101 Bug 1475347 - Cleanup search API - use camelCase and promise. r=aswan
MozReview-Commit-ID: 2HJYk8irppL

--HG--
extra : rebase_source : ec482d31e2930e5aeb7460f980d25a9dd2eacd29
2018-07-12 15:55:25 -05:00
Michael Kaply
81556be6b8 Bug 1352598 - Add WebExtension API for access to search. r=aswan
MozReview-Commit-ID: 4pV2DGMcV7G

--HG--
extra : rebase_source : 650606638e580daa0c7f3b49e8fd085b039705bc
2018-06-18 10:39:12 -05:00
Brindusan Cristian
d2386dc6a2 Backed out changeset f5bfc9971285 (bug 1352598) for browser chrome failures on browser_ext_search.js. CLOSED TREE 2018-07-03 23:02:59 +03:00
Michael Kaply
cd47b3077c Bug 1352598 - Add WebExtension API for access to search. r=aswan
MozReview-Commit-ID: 4pV2DGMcV7G

--HG--
extra : rebase_source : 811187b96b19d433249404791bbbfdff47bceebe
2018-06-18 10:39:12 -05:00
Ciure Andrei
442f7cad49 Backed out 1 changesets (bug 1352598) for frequent bc failures browser_ext_search.js CLOSED TREE
Backed out changeset 879fbe1b07f4 (bug 1352598)
2018-07-02 22:12:57 +03:00
Michael Kaply
49742b1fa3 Bug 1352598 - Add WebExtension API for access to search. r=aswan
MozReview-Commit-ID: 4pV2DGMcV7G

--HG--
extra : rebase_source : 811187b96b19d433249404791bbbfdff47bceebe
2018-06-18 10:39:12 -05:00