mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 443015 - Remove deprecated nsIPrefetchService methods. r=bz
This commit is contained in:
parent
23ca8f9ffa
commit
3bd9f9c4d6
@ -14,12 +14,12 @@ function run_test() {
|
||||
}
|
||||
|
||||
// Make sure the queue has items in it...
|
||||
var queue = prefetch.enumerateQueue(true, false);
|
||||
var queue = prefetch.enumerateQueue();
|
||||
do_check_true(queue.hasMoreElements());
|
||||
|
||||
// Now disable the pref to force the queue to empty...
|
||||
prefs.setBoolPref("network.prefetch-next", false);
|
||||
queue = prefetch.enumerateQueue(true, false);
|
||||
queue = prefetch.enumerateQueue();
|
||||
do_check_false(queue.hasMoreElements());
|
||||
|
||||
// Now reenable the pref, and add more items to the queue.
|
||||
@ -28,7 +28,7 @@ function run_test() {
|
||||
var uri = ios.newURI("http://localhost/" + i, null, null);
|
||||
prefetch.prefetchURI(uri, uri, null, true);
|
||||
}
|
||||
queue = prefetch.enumerateQueue(true, false);
|
||||
queue = prefetch.enumerateQueue();
|
||||
do_check_true(queue.hasMoreElements());
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ interface nsIURI;
|
||||
interface nsIDOMNode;
|
||||
interface nsISimpleEnumerator;
|
||||
|
||||
[scriptable, uuid(cba513eb-c457-4b93-832c-1a979e66edd1)]
|
||||
[scriptable, uuid(bc4dbb34-b148-11e2-b82c-08002734a811)]
|
||||
interface nsIPrefetchService : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -25,28 +25,11 @@ interface nsIPrefetchService : nsISupports
|
||||
in nsIDOMNode aSource,
|
||||
in boolean aExplicit);
|
||||
|
||||
/**
|
||||
* @status DEPRECATED This method is no longer used, and will throw
|
||||
* NS_ERROR_NOT_IMPLEMENTED.
|
||||
*/
|
||||
void prefetchURIForOfflineUse(in nsIURI aURI,
|
||||
in nsIURI aReferrerURI,
|
||||
in nsIDOMNode aSource,
|
||||
in boolean aExplicit);
|
||||
|
||||
/**
|
||||
* Enumerate the items in the prefetch queue. Each element in the
|
||||
* enumeration is an nsIDOMLoadStatus.
|
||||
*
|
||||
* @param aIncludeNormalItems include normal prefetch items in the
|
||||
* list. This parameter is deprecated and must be TRUE,
|
||||
* or NS_ERROR_INT_IMPLEMENTED will be thrown.
|
||||
* @param aIncludeOfflineItems include items being fetched for offline
|
||||
* use. This parameter is deprecated and must be FALSE,
|
||||
* or NS_ERROR_NOT_IMPLEMENTED will be thrown.
|
||||
*/
|
||||
nsISimpleEnumerator enumerateQueue(in boolean aIncludeNormalItems,
|
||||
in boolean aIncludeOfflineItems);
|
||||
nsISimpleEnumerator enumerateQueue();
|
||||
|
||||
// XXX do we need a way to cancel prefetch requests?
|
||||
};
|
||||
|
@ -751,22 +751,8 @@ nsPrefetchService::PrefetchURI(nsIURI *aURI,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPrefetchService::PrefetchURIForOfflineUse(nsIURI *aURI,
|
||||
nsIURI *aReferrerURI,
|
||||
nsIDOMNode *aSource,
|
||||
bool aExplicit)
|
||||
nsPrefetchService::EnumerateQueue(nsISimpleEnumerator **aEnumerator)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPrefetchService::EnumerateQueue(bool aIncludeNormalItems,
|
||||
bool aIncludeOfflineItems,
|
||||
nsISimpleEnumerator **aEnumerator)
|
||||
{
|
||||
NS_ENSURE_TRUE(aIncludeNormalItems && !aIncludeOfflineItems,
|
||||
NS_ERROR_NOT_IMPLEMENTED);
|
||||
|
||||
*aEnumerator = new nsPrefetchQueueEnumerator(this);
|
||||
if (!*aEnumerator) return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user