Use lazy module getter for osfile.jsm
Payload body should be formed using JSON.stringify.
Use localProfileDir instead of profileDir.
s/Source/URL in some variables for clarity.
Remove 'DirectoryLinksProvider' from the test function names for clarity.
Clear prefs on cleanDirectoryLinksProvider().
readJsonFile() returns a data object not a fileObject.
Malformed URI and unknown host tests should wait for _fetchAndCacheLinks() to finish running.
Factor out _linksURL check into setupDirectoryLinksProvider().
Use XMLHttpRequest instead of NetUtil.asyncFetch().
No need for 'Connection' header.
(into bug986521) Bug 993901 - Implement logic to decide when to fetch remotely hosted links
Introduce browser.newtabpage.directory prefix for directory preferences.
Implement directory download and timestamping.
Force directory download on directory source URL preference change.
Attempt directory download on newtab load if sponsored links are shown.
Download directory on init.
Move calling observers into _fetchDirectoryContent in DirectoryLinksProvider
Typos, style and clarificaton fixes
Do timecheck right after fetch to avoid file reading delays