Closed Bug 1044737 Opened 7 years ago Closed 7 years ago

Pass timestamp instead in nsINetworkStatsCallback::networkStatsAvailable

Categories

(Firefox OS Graveyard :: RIL, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: vicamo, Assigned: vicamo)

References

Details

Attachments

(3 files, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #1043830 +++
Find also in NetworkUtils::getNetworkInterfaceStats, but we never pass such command to NetworkWorker or so since bug 948743.
1) We don't depend on NetdWorker for this command anymore. /proc is always available so we don't have to check |this.shutdown| in this case.
2) Refactor the code a little bit.
Assignee: nobody → vyang
Attachment #8463240 - Flags: review?(vchang)
Remove anything only referenced by NetworkUtils::getNetworkInterfaceStats. These should had been removed before bug 864931 was ever landed.

This patch also removes redundant fields from WebIDL dictionary NetworkCommandOptions and NetworkResultOptions.
Attachment #8463243 - Flags: review?(vchang)
Attachment #8463243 - Flags: review?(bobbyholley)
The interface no longer passes Date object but we still have to construct it back in NetworkStatsService.jsm because it's required by |NetworkStatsDB.normalizeDate|. Further removal of these Date objects maybe addressed in bug 1043830.
Attachment #8463245 - Flags: review?(vchang)
Comment on attachment 8463243 [details] [diff] [review]
part 2/3: remove unused bits related to 'getNetworkInterfaceStats'

Review of attachment 8463243 [details] [diff] [review]:
-----------------------------------------------------------------

rs=me on the webidl change.
Attachment #8463243 - Flags: review?(bobbyholley) → review+
Fix typo in XPIDL file.
Attachment #8463240 - Attachment is obsolete: true
Attachment #8463240 - Flags: review?(vchang)
Attachment #8463833 - Flags: review?(vchang)
Attachment #8463243 - Flags: review?(vchang) → review+
Attachment #8463245 - Flags: review?(vchang) → review+
Comment on attachment 8463833 [details] [diff] [review]
part 1/3: don't use Date in nsINetworkStatsCallback::networkStatsAvailable : v2

Review of attachment 8463833 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good.
Attachment #8463833 - Flags: review?(vchang) → review+
Blocks: 1043830
You need to log in before you can comment on or make changes to this bug.