Bug 910161 - Remove nsIHistoryEntry and replace it with nsISHEntry; r=bz

This commit is contained in:
Tim Taubert
2013-08-30 06:14:59 +02:00
parent 1e3d9ed06f
commit a7a74cb9a2
12 changed files with 65 additions and 135 deletions

View File

@@ -117,7 +117,7 @@
#include "nsISHistoryInternal.h"
#include "nsIPrincipal.h"
#include "nsIFileURL.h"
#include "nsIHistoryEntry.h"
#include "nsISHEntry.h"
#include "nsISHistoryListener.h"
#include "nsIWindowWatcher.h"
#include "nsIPromptFactory.h"
@@ -3783,7 +3783,7 @@ nsDocShell::AddChildSHEntry(nsISHEntry * aCloneRef, nsISHEntry * aNewEntry,
* a new entry.
*/
int32_t index = -1;
nsCOMPtr<nsIHistoryEntry> currentHE;
nsCOMPtr<nsISHEntry> currentHE;
mSessionHistory->GetIndex(&index);
if (index < 0)
return NS_ERROR_FAILURE;
@@ -8049,11 +8049,8 @@ nsDocShell::CreateContentViewer(const char *aContentType,
mSessionHistory->GetRequestedIndex(&idx);
if (idx == -1)
mSessionHistory->GetIndex(&idx);
nsCOMPtr<nsIHistoryEntry> entry;
mSessionHistory->GetEntryAtIndex(idx, false,
getter_AddRefs(entry));
mLSHE = do_QueryInterface(entry);
getter_AddRefs(mLSHE));
}
mLoadType = LOAD_ERROR_PAGE;
@@ -9155,13 +9152,11 @@ nsDocShell::InternalLoad(nsIURI * aURI,
if (mSessionHistory) {
int32_t index = -1;
mSessionHistory->GetIndex(&index);
nsCOMPtr<nsIHistoryEntry> hEntry;
nsCOMPtr<nsISHEntry> shEntry;
mSessionHistory->GetEntryAtIndex(index, false,
getter_AddRefs(hEntry));
NS_ENSURE_TRUE(hEntry, NS_ERROR_FAILURE);
nsCOMPtr<nsISHEntry> shEntry(do_QueryInterface(hEntry));
if (shEntry)
shEntry->SetTitle(mTitle);
getter_AddRefs(shEntry));
NS_ENSURE_TRUE(shEntry, NS_ERROR_FAILURE);
shEntry->SetTitle(mTitle);
}
/* Set the title for the Global History entry for this anchor url.