Closed Bug 1369285 Opened 3 years ago Closed 3 years ago

Default sync device name no longer includes the host name

Categories

(Firefox :: Sync, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 55
Tracking Status
firefox55 --- fixed

People

(Reporter: markh, Assigned: markh)

References

Details

Attachments

(1 file)

The default name for a sync device used to be "${username}'s ${channel} on ${deviceName}" - now it's "${username}'s ${channel} on ${userAgentString}" - eg, for me it is now "skip's Nightly on Windows NT 6.1; WOW64"

Bug 1361601 removed system-info.getProperty("host"), which is how we got the host name. It appears we can still get it via Cc["@mozilla.org/network/dns-service;1"].getService(Ci.nsIDNSService).myHostName
Comment on attachment 8873321 [details]
Bug 1369285 - update how we build the default sync device name.

https://reviewboard.mozilla.org/r/144784/#review148848

Looks good w/ nits addressed (and nice catch on the issue!)

::: services/sync/tests/unit/head_helpers.js:493
(Diff revision 2)
>    });
>  }
>  // Avoid an issue where `client.name2` containing unicode characters causes
>  // a number of tests to fail, due to them assuming that we do not need to utf-8
>  // encode or decode data sent through the mocked server (see bug 1268912).
> +Utils._orig_getDefaultDeviceName = Utils.getDefaultDeviceName; // stash away the old.

Nit: can you explain in this comment that we're stashing it away so that it can be used in the device name test?

::: services/sync/tests/unit/test_utils_misc.js:3
(Diff revision 2)
> +_("Misc tests for utils.js");
> +
> +add_test(function() {

Nit: This test is missing a name.
Attachment #8873321 - Flags: review?(tchiovoloni) → review+
Assignee: nobody → markh
Pushed by mhammond@skippinet.com.au:
https://hg.mozilla.org/integration/autoland/rev/a720da302ea4
update how we build the default sync device name. r=tcsc
https://hg.mozilla.org/mozilla-central/rev/a720da302ea4
Status: NEW → RESOLVED
Closed: 3 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Depends on: 1391488
You need to log in before you can comment on or make changes to this bug.