Closed Bug 828540 Opened 9 years ago Closed 9 years ago

Firefox Health Report provider to record search counts

Categories

(Firefox Health Report Graveyard :: Client: Desktop, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 21

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(2 files, 2 obsolete files)

There are a set of P2 probes for Firefox Health Report to record search counts.

Essentially, for every search performed, we need to record the origin of the search and the search engine it was made to. We only count searches for search engines where Mozilla has a formal relationship. That list current being {Google, Bing, Yahoo, Amazon.com}. Search to other search engines should be counted under an "other" bucket.

We need to record whether the search was initiated from {search bar, about:home, url bar, context menu}.

Gavin pointed me to bug 587780. If we could hook onto this, it seems it would make the implementation much less hacky.
Attached patch Greg's WIP. v1 (obsolete) — Splinter Review
Depends on: 840177
Attached patch SearchesProvider, v1 (obsolete) — Splinter Review
Pretty basic.

Note that no buffering API is provided in the provider itself (yet).
Assignee: nobody → gps
Attachment #711052 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #713032 - Flags: review?(rnewman)
Attachment #713032 - Attachment is obsolete: true
Attachment #713032 - Flags: review?(rnewman)
Attachment #713045 - Flags: review?(rnewman)
I'm too lazy to create a new bug for this. It will be needed for search call sites to obtain a reference to the provider so they can call recordSearch().
Attachment #713046 - Flags: review?(rnewman)
Attachment #713045 - Flags: review?(rnewman) → review+
Blocks: 840177
No longer depends on: 840177
Attachment #713046 - Flags: review?(rnewman) → review+
https://hg.mozilla.org/mozilla-central/rev/168ec5716059
https://hg.mozilla.org/mozilla-central/rev/e663ebce39a6
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Comment on attachment 713045 [details] [diff] [review]
SearchesProvider, v2

>diff --git a/services/healthreport/providers.jsm b/services/healthreport/providers.jsm

>+  PARTNER_ENGINES: [
>+    "amazon.com",
>+    "bing",
>+    "google",
>+    "yahoo",

It's probably a good idea to put a reference to this hardcoded list in http://mxr.mozilla.org/mozilla-central/source/browser/locales/en-US/searchplugins/list.txt (and vice-versa?).
The hardcoded list also doesn't take into account that in other locales the search engine names for engine for which we do have a partnership don't necessarily match those in en-US. But there may no longer be any such cases, so perhaps that doesn't matter in practice anymore.
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #8)
> The hardcoded list also doesn't take into account that in other locales the
> search engine names for engine for which we do have a partnership don't
> necessarily match those in en-US. But there may no longer be any such cases,
> so perhaps that doesn't matter in practice anymore.

This could be problematic.

We may need to code a locale-independent search engine "id" into the XML files and nsISearchEngine. I'll file a follow-up bug to investigate the impact of non en-US locales on nsISearchEngine.name.
Blocks: 841554
Component: Metrics and Firefox Health Report → Client: Desktop
Flags: in-testsuite+
Product: Mozilla Services → Firefox Health Report
Target Milestone: mozilla21 → Firefox 21
Product: Firefox Health Report → Firefox Health Report Graveyard
You need to log in before you can comment on or make changes to this bug.