Closed Bug 1239606 Opened 5 years ago Closed 5 years ago

Implement UserContextUI.jsm to avoid code duplication

Categories

(Firefox :: Preferences, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 46
Tracking Status
firefox46 --- fixed

People

(Reporter: baku, Assigned: baku)

References

Details

Attachments

(1 file)

Attached patch module.patchSplinter Review
Assignee: nobody → amarchesini
Attachment #8707788 - Flags: review?(paolo.mozmail)
Comment on attachment 8707788 [details] [diff] [review]
module.patch

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

Looks great!

Some really minor nits:

::: browser/modules/UserContextUI.jsm
@@ +1,3 @@
> +/* This Source Code Form is subject to the terms of the Mozilla Public
> + * License, v. 2.0. If a copy of the MPL was not distributed with this file,
> + * You can obtain one at http://mozilla.org/MPL/2.0/. */

You may have copied this from an existing incorrect header, the right one has the word "file" on the second line.

https://www.mozilla.org/en-US/MPL/headers/

@@ +9,5 @@
> +Cu.import("resource://gre/modules/XPCOMUtils.jsm");
> +Cu.import("resource://gre/modules/Services.jsm")
> +
> +XPCOMUtils.defineLazyGetter(this, "gBrowserBundle", function() {
> +  return Services.strings.createBundle('chrome://browser/locale/browser.properties');

Double quotes instead of single quotes.

@@ +13,5 @@
> +  return Services.strings.createBundle('chrome://browser/locale/browser.properties');
> +});
> +
> +this.UserContextUI = {
> +  getUserContextLabel: function(aUserContextId) {

New style with shortcut and no prefix:

getUserContextLabel(userContextId) {
  // ...
}
Attachment #8707788 - Flags: review?(paolo.mozmail) → review+
https://hg.mozilla.org/mozilla-central/rev/ac467630a2d6
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
Blocks: 1244887
[bugday-20160323]

Status: RESOLVED,FIXED -> UNVERIFIED

Comments:
STR: Not clear.
Developer specific testing

Component: 
Name			Firefox
Version			46.0b9
Build ID		20160322075646
Update Channel          beta
User Agent		Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
OS			Windows 7 SP1 x86_64

Expected Results: 
Developer specific testing

Actual Results: 
As expected
You need to log in before you can comment on or make changes to this bug.