Bug 894391 - Remove deprecated PageThumbs.getFileForURL from PageThumbs.jsm r=mkaply

Differential Revision: https://phabricator.services.mozilla.com/D61235

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Martin McNickle 2020-01-31 12:42:26 +00:00
parent 773c572e19
commit 002bd9b703
2 changed files with 0 additions and 24 deletions

View File

@ -30,9 +30,7 @@ XPCOMUtils.defineLazyGlobalGetters(this, ["FileReader"]);
XPCOMUtils.defineLazyModuleGetters(this, {
Services: "resource://gre/modules/Services.jsm",
FileUtils: "resource://gre/modules/FileUtils.jsm",
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
Deprecated: "resource://gre/modules/Deprecated.jsm",
AsyncShutdown: "resource://gre/modules/AsyncShutdown.jsm",
PageThumbUtils: "resource://gre/modules/PageThumbUtils.jsm",
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
@ -688,16 +686,6 @@ var PageThumbsStorage = {
}
};
},
// Deprecated, please do not use
getFileForURL: function Storage_getFileForURL_DEPRECATED(aURL) {
Deprecated.warning(
"PageThumbs.getFileForURL is deprecated. Please use PageThumbs.getFilePathForURL and OS.File",
"https://developer.mozilla.org/docs/JavaScript_OS.File"
);
// Note: Once this method has been removed, we can get rid of the dependency towards FileUtils
return new FileUtils.File(PageThumbsStorageService.getFilePathForURL(aURL));
},
};
var PageThumbsStorageMigrator = {

View File

@ -73,18 +73,6 @@ function* runTests() {
"no-overwrite-plz",
"existing thumbnail was not overwritten"
);
// Sanity check: ensure that, until it is removed, deprecated
// function |getFileForURL| points to the same path as
// |getFilePathForURL|.
if ("getFileForURL" in PageThumbsStorage) {
file = PageThumbsStorage.getFileForURL(URL);
is(
file.path,
PageThumbsStorageService.getFilePathForURL(URL),
"Deprecated getFileForURL and getFilePathForURL return the same path"
);
}
}
function changeLocation(aLocation, aNewDir) {