s/BumpPriority/AdjustPriority/ (bug 278531) r=shaver sr=brendan

This commit is contained in:
darin%meer.net 2005-02-21 22:21:21 +00:00
Родитель d9cd304238
Коммит bdb13852d9
9 изменённых файлов: 18 добавлений и 18 удалений

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

@ -305,7 +305,7 @@ nsImageFrame::Init(nsPresContext* aPresContext,
// Give image loads associated with an image frame a small priority boost! // Give image loads associated with an image frame a small priority boost!
nsCOMPtr<nsISupportsPriority> p = do_QueryInterface(currentRequest); nsCOMPtr<nsISupportsPriority> p = do_QueryInterface(currentRequest);
if (p) if (p)
p->BumpPriority(-1); p->AdjustPriority(-1);
} }
if (currentLoadStatus & imgIRequest::STATUS_ERROR) { if (currentLoadStatus & imgIRequest::STATUS_ERROR) {

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

@ -231,7 +231,7 @@ static nsresult NewImageChannel(nsIChannel **aResult,
if (aLoadFlags & nsIRequest::LOAD_BACKGROUND) if (aLoadFlags & nsIRequest::LOAD_BACKGROUND)
++priority; // further reduce priority for background loads ++priority; // further reduce priority for background loads
p->BumpPriority(priority); p->AdjustPriority(priority);
} }
return NS_OK; return NS_OK;

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

@ -335,7 +335,7 @@ PRInt32 imgRequest::Priority() const
return priority; return priority;
} }
void imgRequest::BumpPriority(imgRequestProxy *proxy, PRInt32 delta) void imgRequest::AdjustPriority(imgRequestProxy *proxy, PRInt32 delta)
{ {
// only the first proxy is allowed to modify the priority of this image load. // only the first proxy is allowed to modify the priority of this image load.
// //
@ -349,7 +349,7 @@ void imgRequest::BumpPriority(imgRequestProxy *proxy, PRInt32 delta)
nsCOMPtr<nsISupportsPriority> p = do_QueryInterface(mChannel); nsCOMPtr<nsISupportsPriority> p = do_QueryInterface(mChannel);
if (p) if (p)
p->BumpPriority(delta); p->AdjustPriority(delta);
} }
/** imgILoad methods **/ /** imgILoad methods **/

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

@ -121,9 +121,9 @@ private:
// PRIORITY_NORMAL if it doesn't support nsISupportsPriority. // PRIORITY_NORMAL if it doesn't support nsISupportsPriority.
PRInt32 Priority() const; PRInt32 Priority() const;
// Bump the priority of the underlying network request by the given delta // Adjust the priority of the underlying network request by the given delta
// on behalf of the given proxy. // on behalf of the given proxy.
void BumpPriority(imgRequestProxy *aProxy, PRInt32 aDelta); void AdjustPriority(imgRequestProxy *aProxy, PRInt32 aDelta);
public: public:
NS_DECL_IMGILOAD NS_DECL_IMGILOAD

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

@ -366,14 +366,14 @@ NS_IMETHODIMP imgRequestProxy::GetPriority(PRInt32 *priority)
NS_IMETHODIMP imgRequestProxy::SetPriority(PRInt32 priority) NS_IMETHODIMP imgRequestProxy::SetPriority(PRInt32 priority)
{ {
NS_ENSURE_STATE(mOwner); NS_ENSURE_STATE(mOwner);
mOwner->BumpPriority(this, priority - mOwner->Priority()); mOwner->AdjustPriority(this, priority - mOwner->Priority());
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP imgRequestProxy::BumpPriority(PRInt32 priority) NS_IMETHODIMP imgRequestProxy::AdjustPriority(PRInt32 priority)
{ {
NS_ENSURE_STATE(mOwner); NS_ENSURE_STATE(mOwner);
mOwner->BumpPriority(this, priority); mOwner->AdjustPriority(this, priority);
return NS_OK; return NS_OK;
} }

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

@ -128,7 +128,7 @@ RescheduleRequest(nsIRequest *aRequest, PRInt32 delta)
{ {
nsCOMPtr<nsISupportsPriority> p = do_QueryInterface(aRequest); nsCOMPtr<nsISupportsPriority> p = do_QueryInterface(aRequest);
if (p) if (p)
p->BumpPriority(delta); p->AdjustPriority(delta);
} }
PR_STATIC_CALLBACK(PLDHashOperator) PR_STATIC_CALLBACK(PLDHashOperator)
@ -837,11 +837,11 @@ nsLoadGroup::GetPriority(PRInt32 *aValue)
NS_IMETHODIMP NS_IMETHODIMP
nsLoadGroup::SetPriority(PRInt32 aValue) nsLoadGroup::SetPriority(PRInt32 aValue)
{ {
return BumpPriority(aValue - mPriority); return AdjustPriority(aValue - mPriority);
} }
NS_IMETHODIMP NS_IMETHODIMP
nsLoadGroup::BumpPriority(PRInt32 aDelta) nsLoadGroup::AdjustPriority(PRInt32 aDelta)
{ {
// Update the priority for each request that supports nsISupportsPriority // Update the priority for each request that supports nsISupportsPriority
if (aDelta != 0) { if (aDelta != 0) {

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

@ -3664,7 +3664,7 @@ nsHttpChannel::SetPriority(PRInt32 value)
} }
NS_IMETHODIMP NS_IMETHODIMP
nsHttpChannel::BumpPriority(PRInt32 delta) nsHttpChannel::AdjustPriority(PRInt32 delta)
{ {
return SetPriority(mPriority + delta); return SetPriority(mPriority + delta);
} }

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

@ -1509,14 +1509,14 @@ NS_IMETHODIMP nsDocLoader::SetPriority(PRInt32 aPriority)
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsDocLoader::BumpPriority(PRInt32 aDelta) NS_IMETHODIMP nsDocLoader::AdjustPriority(PRInt32 aDelta)
{ {
PR_LOG(gDocLoaderLog, PR_LOG_DEBUG, PR_LOG(gDocLoaderLog, PR_LOG_DEBUG,
("DocLoader:%p: BumpPriority(%d) called\n", this, aDelta)); ("DocLoader:%p: AdjustPriority(%d) called\n", this, aDelta));
nsCOMPtr<nsISupportsPriority> p = do_QueryInterface(mLoadGroup); nsCOMPtr<nsISupportsPriority> p = do_QueryInterface(mLoadGroup);
if (p) if (p)
p->BumpPriority(aDelta); p->AdjustPriority(aDelta);
PRInt32 count = mChildList.Count(); PRInt32 count = mChildList.Count();
@ -1524,7 +1524,7 @@ NS_IMETHODIMP nsDocLoader::BumpPriority(PRInt32 aDelta)
for (PRInt32 i=0; i < count; i++) { for (PRInt32 i=0; i < count; i++) {
loader = NS_STATIC_CAST(nsDocLoader*, ChildAt(i)); loader = NS_STATIC_CAST(nsDocLoader*, ChildAt(i));
if (loader) { if (loader) {
loader->BumpPriority(aDelta); loader->AdjustPriority(aDelta);
} }
} }

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

@ -73,5 +73,5 @@ interface nsISupportsPriority : nsISupports
* reduce the amount of coding required to increment or decrement the value * reduce the amount of coding required to increment or decrement the value
* of the priority attribute. * of the priority attribute.
*/ */
void bumpPriority(in long delta); void adjustPriority(in long delta);
}; };