Closed Bug 848852 Opened 12 years ago Closed 12 years ago

Document handler for FHR documents

Categories

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

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: gps, Assigned: gps)

Details

Attachments

(2 files)

The plan is to refactor payload saving and uploading out of policy.jsm and healthreporter.jsm and into a standalone "document handler" entity. There will presumably be a separate implementation for desktop and android. This bug will focus on the desktop version. My plan is to land a standalone/backwards-compatible DesktopDocumentHandler type first then refactor existing code to use it later.
Here is what I've got so far. I still need to implement retry logic and more tests. I may also jiggle some of the property names now that we aren't within the policy's namespace. Looking for a high-level "does this API for a document handler look sane" feedback pass - not a code review!
Assignee: nobody → gps
Status: NEW → ASSIGNED
Attachment #722339 - Flags: feedback?(rnewman)
Attachment #722339 - Flags: feedback?(rnewman) → feedback+
Eventually this will be used to ensure in-flight requests are aborted explicitly by the document handler rather than by Necko shutting down. (I'm not even sure what Necko does to in-flight requests during shutdown.)
Attachment #723678 - Flags: review?(rnewman)
Comment on attachment 723678 [details] [diff] [review] Part 1: Attach BagheeraRequest to Bagheera client promises, v1 Review of attachment 723678 [details] [diff] [review]: ----------------------------------------------------------------- This strikes me as slightly fragile -- promises are meant to be chained, but that chaining would hide the request. But I confess to not having a better solution, unless we want to go down the road of adding a 'cancel' operation to Promise.
Attachment #723678 - Flags: review?(rnewman) → review+
Fun fact: Promise.defer() takes a "proto" argument which defines the prototype used on the created promise instance. I also considered just exposing .abort on the promise but figured "why not expose the entire thing, just in case." This whole thing is definitely an advanced API and shouldn't be used under normal circumstances.
Priority: -- → P4
Component: Metrics and Firefox Health Report → Client: Desktop
Product: Mozilla Services → Firefox Health Report
No longer blocks: 828654
The impetus behind this was FHR on Android back when we thought the existing XPCOM service would do more. Things have changed and this is no longer needed.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Product: Firefox Health Report → Firefox Health Report Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: