bug 229392 : minor cleanup in session history r=alecf sr=bz

This commit is contained in:
hpradhan%hotpop.com 2005-08-18 11:16:52 +00:00
Родитель 168b5e0b75
Коммит 6701caf60c
5 изменённых файлов: 8 добавлений и 37 удалений

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

@ -30,7 +30,7 @@
*/
[scriptable, uuid(2F0C3A72-988B-11d3-BDC7-0050040A9B44)]
[scriptable, uuid(2EDF705F-D252-4971-9F09-71DD0F760DC6)]
interface nsISHTransaction : nsISupports
{
/**
@ -48,11 +48,6 @@ interface nsISHTransaction : nsISupports
*/
attribute nsISHTransaction next;
/**
* The other paths that have been navigated from this transaction
*/
readonly attribute nsISHTransaction lrvList;
/**
* Specifies if this transaction should persist. If not it will be replaced
* by new additions to the list.

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

@ -94,23 +94,6 @@ nsSHTransaction::GetNext(nsISHTransaction * * aResult)
NS_IMETHODIMP
nsSHTransaction::SetNext(nsISHTransaction * aNext)
{
if(mNext)
{
/* We do not want to maintain the previous traversals
* and make SessionHistory grow unboundewd for the
* seamonkey release. We will let go off
* all previous traversals. However, based on a pref
* previous traversals can be maintained. The Pref
* work will be done at a future date.Commenting off
* the following lines will delete previous traversals
*/
#if 0
// There is already a child. Move the child to the LRV list
mLRVList = mNext;
#endif
}
NS_ENSURE_SUCCESS(aNext->SetPrev(this), NS_ERROR_FAILURE);
mNext = aNext;
@ -134,15 +117,6 @@ nsSHTransaction::GetPrev(nsISHTransaction ** aResult)
return NS_OK;
}
NS_IMETHODIMP
nsSHTransaction::GetLrvList(nsISHTransaction ** aResult)
{
NS_ENSURE_ARG_POINTER(aResult);
*aResult = mLRVList;
NS_IF_ADDREF(*aResult);
return NS_OK;
}
NS_IMETHODIMP
nsSHTransaction::SetPersist(PRBool aPersist)
{

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

@ -47,7 +47,6 @@ protected:
nsISHTransaction * mPrev; // Weak Reference
nsCOMPtr<nsISHTransaction> mNext;
nsCOMPtr<nsISHTransaction> mLRVList;
nsCOMPtr<nsISHEntry> mSHEntry;
};

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

@ -259,7 +259,8 @@ nsSHistory::GetTransactionAtIndex(PRInt32 aIndex, nsISHTransaction ** aResult)
return NS_OK;
}
NS_IMETHODIMP
#ifdef DEBUG
nsresult
nsSHistory::PrintHistory()
{
@ -318,13 +319,12 @@ nsSHistory::PrintHistory()
return NS_OK;
}
#endif
NS_IMETHODIMP
nsSHistory::GetRootTransaction(nsISHTransaction ** aResult)
{
nsCOMPtr<nsISHEntry> entry;
NS_ENSURE_ARG_POINTER(aResult);
*aResult=mListRoot;
NS_IF_ADDREF(*aResult);

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

@ -57,7 +57,6 @@ protected:
friend class nsSHEnumerator;
// Could become part of nsIWebNavigation
NS_IMETHOD PrintHistory();
NS_IMETHOD GetEntryAtIndex(PRInt32 aIndex, PRBool aModifyIndex, nsISHEntry** aResult);
NS_IMETHOD GetTransactionAtIndex(PRInt32 aIndex, nsISHTransaction ** aResult);
nsresult CompareFrames(nsISHEntry * prevEntry, nsISHEntry * nextEntry, nsIDocShell * rootDocShell, long aLoadType, PRBool * aIsFrameFound);
@ -65,6 +64,10 @@ protected:
NS_IMETHOD LoadEntry(PRInt32 aIndex, long aLoadType, PRUint32 histCmd);
#ifdef DEBUG
nsresult PrintHistory();
#endif
protected:
nsCOMPtr<nsISHTransaction> mListRoot;
PRInt32 mIndex;