Bug 834543 - Part 2: Update use of setCharsetForURI. r=mak

This commit is contained in:
Raymond Lee 2013-03-22 01:06:53 +08:00
parent b340bb7478
commit 9b2982334e
5 changed files with 5 additions and 10 deletions

View File

@ -295,7 +295,7 @@ var PlacesCommandHook = {
PlacesUtils.transactionManager.doTransaction(txn);
// Set the character-set
if (charset && !PrivateBrowsingUtils.isWindowPrivate(aBrowser.contentWindow))
PlacesUtils.history.setCharsetForURI(uri, charset);
PlacesUtils.setCharsetForURI(uri, charset);
itemId = PlacesUtils.getMostRecentBookmarkForURI(uri);
}

View File

@ -5625,7 +5625,7 @@ function BrowserSetForcedCharacterSet(aCharset)
gBrowser.docShell.charset = aCharset;
// Save the forced character-set
if (!PrivateBrowsingUtils.isWindowPrivate(window))
PlacesUtils.history.setCharsetForURI(getWebNavigation().currentURI, aCharset);
PlacesUtils.setCharsetForURI(getWebNavigation().currentURI, aCharset);
BrowserCharsetReload();
}
@ -7464,7 +7464,6 @@ function focusNextFrame(event) {
if (element.ownerDocument == document)
focusAndSelectUrlBar();
}
let BrowserChromeTest = {
_cb: null,
_ready: false,

View File

@ -572,7 +572,7 @@ var BookmarkPropertiesPanel = {
//XXX TODO: this should be in a transaction!
if (this._charSet && !PrivateBrowsingUtils.isWindowPrivate(window))
PlacesUtils.history.setCharsetForURI(this._uri, this._charSet);
PlacesUtils.setCharsetForURI(this._uri, this._charSet);
let createTxn = new PlacesCreateBookmarkTransaction(this._uri,
aContainer,

View File

@ -534,12 +534,8 @@ BookmarkImporter.prototype = {
// Import last charset.
if (lastCharset) {
try {
PlacesUtils.history.setCharsetForURI(frame.previousLink, lastCharset);
} catch(e) {
}
PlacesUtils.setCharsetForURI(frame.previousLink, lastCharset);
}
},
_handleContainerBegin: function handleContainerBegin() {

View File

@ -1355,7 +1355,7 @@ this.PlacesUtils = {
this.tagging.tagURI(this._uri(aData.uri), tags);
}
if (aData.charset) {
this.history.setCharsetForURI(this._uri(aData.uri), aData.charset);
this.setCharsetForURI(this._uri(aData.uri), aData.charset);
}
if (aData.uri.substr(0, 6) == "place:")
searchIds.push(id);