remove unused GetUnreversedHostname function (bug 331795) r=brettw

Original committer: bryner%brianryner.com
Original revision: 1.88
Original date: 2006/03/27 01:26:09
This commit is contained in:
benjamin%smedbergs.us 2006-07-18 16:33:23 +00:00
Родитель ae02051781
Коммит c083cf03c8
1 изменённых файлов: 0 добавлений и 32 удалений

Просмотреть файл

@ -130,8 +130,6 @@ static void GetSubstringFromNthDot(const nsCString& aInput, PRInt32 aStartingSpo
static nsresult GenerateTitleFromURI(nsIURI* aURI, nsAString& aTitle);
static PRInt32 GetTLDCharCount(const nsCString& aHost);
static PRInt32 GetTLDType(const nsCString& aHostTail);
static void GetUnreversedHostname(const nsString& aBackward,
nsAString& aForward);
static PRBool IsNumericHostName(const nsCString& aHost);
static PRInt64 GetSimpleBookmarksQueryFolder(
const nsCOMArray<nsNavHistoryQuery>& aQueries);
@ -3850,36 +3848,6 @@ GetReversedHostname(const nsString& aForward, nsAString& aRevHost)
}
// GetUnreversedHostname
//
// This takes a reversed hostname as above and converts it to a
// "regular" hostname with no dot at the beginning.
//
// Input:
// gor.allizom.
// Output
// mozilla.org
//
// See GetReversedHostname() above
void
GetUnreversedHostname(const nsString& aBackward, nsAString& aForward)
{
NS_ASSERTION(! aBackward.IsEmpty() && aBackward[aBackward.Length()-1] == '.',
"Malformed reversed hostname with no trailing dot");
aForward.Truncate(0);
if (! aBackward.IsEmpty() && aBackward[aBackward.Length()-1] == '.') {
// copy everything except the trailing dot
for (PRInt32 i = aBackward.Length() - 2; i >= 0; i -- )
aForward.Append(aBackward[i]);
} else {
NS_WARNING("Malformed reversed host name: no trailing dot");
ReverseString(aBackward, aForward);
}
}
// IsNumericHostName
//
// For host-based groupings, numeric IPs should not be collapsed by the