mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
Bug 568969 - Nuke nsContentUtils::GetHistory
r=bz a=bsmedberg
This commit is contained in:
parent
a881d8d55a
commit
f2250bbc15
@ -140,7 +140,6 @@ typedef int (*PR_CALLBACK PrefChangedFunc)(const char *, void *);
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
class IHistory;
|
||||
|
||||
namespace layers {
|
||||
class LayerManager;
|
||||
@ -499,11 +498,6 @@ public:
|
||||
return sImgLoader;
|
||||
}
|
||||
|
||||
static mozilla::IHistory* GetHistory()
|
||||
{
|
||||
return sHistory;
|
||||
}
|
||||
|
||||
#ifdef MOZ_XTF
|
||||
static nsIXTFService* GetXTFService();
|
||||
#endif
|
||||
@ -1726,8 +1720,6 @@ private:
|
||||
static imgILoader* sImgLoader;
|
||||
static imgICache* sImgCache;
|
||||
|
||||
static mozilla::IHistory* sHistory;
|
||||
|
||||
static nsIConsoleService* sConsoleService;
|
||||
|
||||
static nsDataHashtable<nsISupportsHashKey, EventNameMapping>* sAtomEventTable;
|
||||
|
@ -49,6 +49,7 @@
|
||||
#include "mozAutoDocUpdate.h"
|
||||
|
||||
#include "mozilla/IHistory.h"
|
||||
#include "mozilla/Services.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
@ -128,7 +129,7 @@ Link::LinkState() const
|
||||
}
|
||||
|
||||
// We have a good href, so register with History.
|
||||
IHistory *history = nsContentUtils::GetHistory();
|
||||
nsCOMPtr<IHistory> history = services::GetHistoryService();
|
||||
nsresult rv = history->RegisterVisitedCallback(hrefURI, self);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
self->mRegistered = true;
|
||||
@ -508,7 +509,7 @@ Link::UnregisterFromHistory()
|
||||
NS_ASSERTION(mCachedURI, "mRegistered is true, but we have no cached URI?!");
|
||||
|
||||
// And tell History to stop tracking us.
|
||||
IHistory *history = nsContentUtils::GetHistory();
|
||||
nsCOMPtr<IHistory> history = services::GetHistoryService();
|
||||
nsresult rv = history->UnregisterVisitedCallback(mCachedURI, this);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "This should only fail if we misuse the API!");
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
|
@ -102,7 +102,6 @@
|
||||
#include "imgIRequest.h"
|
||||
#include "imgIContainer.h"
|
||||
#include "imgILoader.h"
|
||||
#include "mozilla/IHistory.h"
|
||||
#include "nsDocShellCID.h"
|
||||
#include "nsIImageLoadingContent.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
@ -230,7 +229,6 @@ nsIXTFService *nsContentUtils::sXTFService = nsnull;
|
||||
nsIPrefBranch2 *nsContentUtils::sPrefBranch = nsnull;
|
||||
imgILoader *nsContentUtils::sImgLoader;
|
||||
imgICache *nsContentUtils::sImgCache;
|
||||
mozilla::IHistory *nsContentUtils::sHistory;
|
||||
nsIConsoleService *nsContentUtils::sConsoleService;
|
||||
nsDataHashtable<nsISupportsHashKey, EventNameMapping>* nsContentUtils::sAtomEventTable = nsnull;
|
||||
nsDataHashtable<nsStringHashKey, EventNameMapping>* nsContentUtils::sStringEventTable = nsnull;
|
||||
@ -464,12 +462,6 @@ nsContentUtils::Init()
|
||||
rv = CallGetService(NS_UNICHARCATEGORY_CONTRACTID, &sGenCat);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = CallGetService(NS_IHISTORY_CONTRACTID, &sHistory);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_RUNTIMEABORT("Cannot get the history service");
|
||||
return rv;
|
||||
}
|
||||
|
||||
sPtrsToPtrsToRelease = new nsTArray<nsISupports**>();
|
||||
if (!sPtrsToPtrsToRelease) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
@ -1148,7 +1140,6 @@ nsContentUtils::Shutdown()
|
||||
#endif
|
||||
NS_IF_RELEASE(sImgLoader);
|
||||
NS_IF_RELEASE(sImgCache);
|
||||
NS_IF_RELEASE(sHistory);
|
||||
NS_IF_RELEASE(sPrefBranch);
|
||||
#ifdef IBMBIDI
|
||||
NS_IF_RELEASE(sBidiKeyboard);
|
||||
|
@ -441,7 +441,7 @@ bool
|
||||
ContentParent::RecvStartVisitedQuery(const IPC::URI& aURI)
|
||||
{
|
||||
nsCOMPtr<nsIURI> newURI(aURI);
|
||||
IHistory *history = nsContentUtils::GetHistory();
|
||||
nsCOMPtr<IHistory> history = services::GetHistoryService();
|
||||
history->RegisterVisitedCallback(newURI, nsnull);
|
||||
return true;
|
||||
}
|
||||
@ -454,7 +454,7 @@ ContentParent::RecvVisitURI(const IPC::URI& uri,
|
||||
{
|
||||
nsCOMPtr<nsIURI> ourURI(uri);
|
||||
nsCOMPtr<nsIURI> ourReferrer(referrer);
|
||||
IHistory *history = nsContentUtils::GetHistory();
|
||||
nsCOMPtr<IHistory> history = services::GetHistoryService();
|
||||
history->VisitURI(ourURI, ourReferrer, flags);
|
||||
return true;
|
||||
}
|
||||
@ -465,7 +465,7 @@ ContentParent::RecvSetURITitle(const IPC::URI& uri,
|
||||
const nsString& title)
|
||||
{
|
||||
nsCOMPtr<nsIURI> ourURI(uri);
|
||||
IHistory *history = nsContentUtils::GetHistory();
|
||||
nsCOMPtr<IHistory> history = services::GetHistoryService();
|
||||
history->SetURITitle(ourURI, title);
|
||||
return true;
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ class FailSafeFinishTask
|
||||
{
|
||||
public:
|
||||
FailSafeFinishTask()
|
||||
: mAppended(false)
|
||||
: mAppended(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user