mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
Bug 878690 - Use FormHistory.jsm for the Safari profile migrator. r=mak
This commit is contained in:
parent
a6ddb8018f
commit
5a6f7551ba
@ -19,6 +19,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
|
||||
"resource://gre/modules/NetUtil.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "FormHistory",
|
||||
"resource://gre/modules/FormHistory.jsm");
|
||||
|
||||
function Bookmarks(aBookmarksFile) {
|
||||
this._file = aBookmarksFile;
|
||||
@ -540,11 +542,11 @@ SearchStrings.prototype = {
|
||||
if (aDict.has("RecentSearchStrings")) {
|
||||
let recentSearchStrings = aDict.get("RecentSearchStrings");
|
||||
if (recentSearchStrings && recentSearchStrings.length > 0) {
|
||||
let formHistory = Cc["@mozilla.org/satchel/form-history;1"].
|
||||
getService(Ci.nsIFormHistory2);
|
||||
for (let searchString of recentSearchStrings) {
|
||||
formHistory.addEntry("searchbar-history", searchString);
|
||||
}
|
||||
let changes = [{op: "add",
|
||||
fieldname: "searchbar-history",
|
||||
value: searchString}
|
||||
for (searchString of recentSearchStrings)];
|
||||
FormHistory.update(changes);
|
||||
}
|
||||
}
|
||||
}.bind(this), aCallback));
|
||||
|
Loading…
x
Reference in New Issue
Block a user