mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 12:37:37 +00:00
Bug 975228 - Create logic to merge frecency-pages and Tiles (Tile equiv 1000 frecency) [r=adw]
Use DirectoryLinksProvider for Firefox and make PlacesProvider match in expected Links format. Make sure there's at least 2 of each type so Telemetry doesn't know for sure which links were used.
This commit is contained in:
parent
5af27d6f35
commit
b05d4792a0
@ -2,8 +2,11 @@
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
const PREF_NEWTAB_ENABLED = "browser.newtabpage.enabled";
|
||||
const PREF_NEWTAB_DIRECTORYSOURCE = "browser.newtabpage.directorySource";
|
||||
|
||||
Services.prefs.setBoolPref(PREF_NEWTAB_ENABLED, true);
|
||||
// start with no directory links by default
|
||||
Services.prefs.setCharPref(PREF_NEWTAB_DIRECTORYSOURCE, "data:application/json,{}");
|
||||
|
||||
let tmp = {};
|
||||
Cu.import("resource://gre/modules/Promise.jsm", tmp);
|
||||
@ -26,6 +29,7 @@ registerCleanupFunction(function () {
|
||||
gWindow.gBrowser.removeTab(gWindow.gBrowser.tabs[1]);
|
||||
|
||||
Services.prefs.clearUserPref(PREF_NEWTAB_ENABLED);
|
||||
Services.prefs.clearUserPref(PREF_NEWTAB_DIRECTORYSOURCE);
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -22,6 +22,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "AddonManager",
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "ContentClick",
|
||||
"resource:///modules/ContentClick.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "DirectoryLinksProvider",
|
||||
"resource://gre/modules/DirectoryLinksProvider.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
|
||||
"resource://gre/modules/NetUtil.jsm");
|
||||
|
||||
@ -475,6 +478,8 @@ BrowserGlue.prototype = {
|
||||
WebappManager.init();
|
||||
PageThumbs.init();
|
||||
NewTabUtils.init();
|
||||
DirectoryLinksProvider.init();
|
||||
NewTabUtils.links.addProvider(DirectoryLinksProvider);
|
||||
BrowserNewTabPreloader.init();
|
||||
#ifdef NIGHTLY_BUILD
|
||||
if (Services.prefs.getBoolPref("dom.identity.enabled")) {
|
||||
|
File diff suppressed because one or more lines are too long
@ -577,6 +577,9 @@ let PlacesProvider = {
|
||||
title: title,
|
||||
frecency: frecency,
|
||||
lastVisitDate: lastVisitDate,
|
||||
bgColor: "transparent",
|
||||
type: "history",
|
||||
imageURISpec: null,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user