Bug 875924 - Initialize the NewTabUtils thumbnail expiration filter [r=sfoster]

This commit is contained in:
Matt Brubeck 2013-09-25 13:41:29 -07:00
parent 5a3c6a793e
commit 5c2f923778
4 changed files with 5 additions and 11 deletions

View File

@ -8,10 +8,6 @@
* singleton to provide data-level functionality to the views
*/
let TopSites = {
_initialized: false,
Site: Site,
prepareCache: function(aForce){
// front to the NewTabUtils' links cache
// -ensure NewTabUtils.links links are pre-cached
@ -151,6 +147,7 @@ let TopSites = {
this._sitesDirty.clear();
this.update();
},
_linkFromNode: function _linkFromNode(aNode) {
return {
url: aNode.getAttribute("value"),

View File

@ -16,6 +16,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "Downloads",
XPCOMUtils.defineLazyModuleGetter(this, "FormHistory",
"resource://gre/modules/FormHistory.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PageThumbs",
"resource://gre/modules/PageThumbs.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",
"resource://gre/modules/PluralForm.jsm");

View File

@ -4,7 +4,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
Cu.import("resource://gre/modules/PageThumbs.jsm");
Cu.import("resource://gre/modules/devtools/dbg-server.jsm")
/**
@ -108,6 +107,7 @@ var BrowserUI = {
PanelUI.init();
FlyoutPanelsUI.init();
PageThumbs.init();
NewTabUtils.init();
SettingsCharm.init();
NavButtonSlider.init();

View File

@ -21,7 +21,6 @@ function TopSitesView(aGrid, aMaxSites) {
getService(Ci.nsINavHistoryService);
history.addObserver(this, false);
PageThumbs.addExpirationFilter(this);
Services.obs.addObserver(this, "Metro:RefreshTopsiteThumbnail", false);
NewTabUtils.allPages.register(this);
@ -40,7 +39,6 @@ TopSitesView.prototype = Util.extend(Object.create(View.prototype), {
destruct: function destruct() {
Services.obs.removeObserver(this, "Metro:RefreshTopsiteThumbnail");
PageThumbs.removeExpirationFilter(this);
NewTabUtils.allPages.unregister(this);
if (StartUI.chromeWin) {
StartUI.chromeWin.removeEventListener('MozAppbarDismissing', this, false);
@ -216,10 +214,6 @@ TopSitesView.prototype = Util.extend(Object.create(View.prototype), {
}
},
filterForThumbnailExpiration: function filterForThumbnailExpiration(aCallback) {
aCallback([item.getAttribute("value") for (item of this._set.children)]);
},
isFirstRun: function isFirstRun() {
return prefs.getBoolPref("browser.firstrun.show.localepicker");
},