aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2003-04-19 19:00:56 +0800
committerXan Lopez <xan@src.gnome.org>2003-04-19 19:00:56 +0800
commit50ff5e50420a75f627344b7d8bad2451e9fb714a (patch)
tree00d38eeed83b75daf4ad7bff614173b07c5ddbd9 /embed/mozilla
parente527da5ea75e15dba79b88a95619e378f14e9043 (diff)
downloadgsoc2013-epiphany-50ff5e50420a75f627344b7d8bad2451e9fb714a.tar
gsoc2013-epiphany-50ff5e50420a75f627344b7d8bad2451e9fb714a.tar.gz
gsoc2013-epiphany-50ff5e50420a75f627344b7d8bad2451e9fb714a.tar.bz2
gsoc2013-epiphany-50ff5e50420a75f627344b7d8bad2451e9fb714a.tar.lz
gsoc2013-epiphany-50ff5e50420a75f627344b7d8bad2451e9fb714a.tar.xz
gsoc2013-epiphany-50ff5e50420a75f627344b7d8bad2451e9fb714a.tar.zst
gsoc2013-epiphany-50ff5e50420a75f627344b7d8bad2451e9fb714a.zip
Assume Pause/Resume is available for every channel, "fixes" resume for
Assume Pause/Resume is available for every channel, "fixes" resume for HTTP among others. Drop some useless code.
Diffstat (limited to 'embed/mozilla')
-rw-r--r--embed/mozilla/ProgressListener.cpp19
-rw-r--r--embed/mozilla/ProgressListener.h2
2 files changed, 2 insertions, 19 deletions
diff --git a/embed/mozilla/ProgressListener.cpp b/embed/mozilla/ProgressListener.cpp
index 43a0acd06..643764982 100644
--- a/embed/mozilla/ProgressListener.cpp
+++ b/embed/mozilla/ProgressListener.cpp
@@ -31,8 +31,6 @@
#include <libgnome/gnome-i18n.h>
#include "nsXPIDLString.h"
-#include "nsIChannel.h"
-#include "nsIFTPChannel.h"
#include "nsIMIMEInfo.h"
#include "nsCOMPtr.h"
@@ -134,8 +132,6 @@ NS_METHOD GProgressListener::PrivateInit (void)
mPriorKRate = 0;
mRateChanges = 0;
mRateChangeLimit = 2; /* only update rate every second */
- mCheckedCanPause = PR_FALSE;
- mCanPause = PR_FALSE;
mIsPaused = PR_FALSE;
mAbort = PR_FALSE;
PRInt64 now = PR_Now ();
@@ -423,16 +419,6 @@ NS_IMETHODIMP GProgressListener::
if (mNoDialog) return NS_OK;
- if (!mCheckedCanPause)
- {
- mCheckedCanPause = PR_TRUE;
-
- nsresult rv;
- nsCOMPtr<nsIFTPChannel> channel =
- do_QueryInterface (aRequest, &rv);
-
- mCanPause = (NS_SUCCEEDED (rv) ? PR_TRUE : PR_FALSE);
- }
mRequest = aRequest;
PRInt64 now = PR_Now ();
@@ -518,7 +504,6 @@ NS_IMETHODIMP GProgressListener::
totalKBytes,
currentKBytes,
progress,
- mCanPause,
(gpointer)this);
/* done */
@@ -607,7 +592,7 @@ nsresult GProgressListener::Pause (void)
{
nsresult rv;
- if (mCanPause && !mIsPaused)
+ if (!mIsPaused)
{
rv = mRequest->Suspend ();
if (NS_SUCCEEDED (rv))
@@ -627,7 +612,7 @@ nsresult GProgressListener::Resume (void)
{
nsresult rv;
- if (mCanPause && mIsPaused)
+ if (mIsPaused)
{
rv = mRequest->Resume ();
if (NS_SUCCEEDED (rv))
diff --git a/embed/mozilla/ProgressListener.h b/embed/mozilla/ProgressListener.h
index 459643194..7d5ba62b0 100644
--- a/embed/mozilla/ProgressListener.h
+++ b/embed/mozilla/ProgressListener.h
@@ -112,8 +112,6 @@ class GProgressListener : public nsIProgressDialog,
PRInt32 mRateChanges;
PRInt32 mRateChangeLimit;
- PRBool mCheckedCanPause;
- PRBool mCanPause;
PRBool mIsPaused;
gboolean mNoDialog;
PRBool mAbort;