Closed
Bug 721165
Opened 12 years ago
Closed 12 years ago
Extract repeated code for retrieving CHANNEL information from Blocklist and Telemetry to a javascript module
Categories
(Toolkit :: General, defect)
Toolkit
General
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: mreid, Assigned: andreshm)
References
Details
(Whiteboard: [mentor=gavin][lang=js])
Attachments
(1 file)
20.74 KB,
patch
|
Details | Diff | Splinter Review |
There is duplicate code in toolkit/mozapps/extensions/nsBlocklistService.js toolkit/components/telemetry/TelemetryPing.js toolkit/components/urlformatter/nsURLFormatter.js for "getUpdateChannel()" function and possibly elsewhere. See bug 720785 for further discussion.
Updated•12 years ago
|
Component: Telemetry → General
QA Contact: telemetry → general
Updated•12 years ago
|
Whiteboard: [mentor=gavin][lang=js]
Assignee | ||
Comment 2•12 years ago
|
||
Attachment #659758 -
Flags: review?(gavin.sharp)
Updated•12 years ago
|
Attachment #659758 -
Flags: review?(gavin.sharp) → review?(adw)
Comment 3•12 years ago
|
||
Comment on attachment 659758 [details] [diff] [review] Patch v1 Review of attachment 659758 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/content/UpdateChannel.jsm @@ +13,5 @@ > + * Read the update channel from defaults only. We do this to ensure that > + * the channel is tightly coupled with the application and does not apply > + * to other instances of the application that may use the same profile. > + */ > + get: function UpdateChannel_get() { Please choose a more descriptive name for this method, like getDefaultUpdateChannel or getDefaultChannel.
Attachment #659758 -
Flags: review?(adw) → review+
Comment 4•12 years ago
|
||
(In reply to Drew Willcoxon :adw from comment #3) > > + get: function UpdateChannel_get() { > > Please choose a more descriptive name for this method, like > getDefaultUpdateChannel or getDefaultChannel. Isn't UpdateChannel.getDefaultUpdateChannel() redundant? UpdateChannel.get() seems pretty clear self-explanatory.
Assignee | ||
Comment 5•12 years ago
|
||
I agree that is clear UpdateChannel.get(), but if in the future there can be more getters then maybe we can use UpdateChannel.getDefault()? Pushed to try: https://tbpl.mozilla.org/?tree=Try&rev=17d15b1c5f74
Assignee | ||
Comment 6•12 years ago
|
||
All green :) https://tbpl.mozilla.org/?tree=Try&rev=17d15b1c5f74
Comment 7•12 years ago
|
||
I don't think there will be a need for future additional getters, this module is very simple.
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 8•12 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/6205f156d432
Status: NEW → ASSIGNED
Keywords: checkin-needed
Whiteboard: [mentor=gavin][lang=js] → [mentor=gavin][lang=js][fixed-in-fx-team]
Version: 12 Branch → Trunk
Updated•12 years ago
|
Attachment #659758 -
Flags: review+
Comment 9•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6205f156d432
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [mentor=gavin][lang=js][fixed-in-fx-team] → [mentor=gavin][lang=js]
Target Milestone: --- → mozilla18
You need to log in
before you can comment on or make changes to this bug.
Description
•