summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol/ftp/nsFtpConnectionThread.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-05-13 00:08:52 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-05-13 00:08:52 +0200
commite16bcd08aae85a7d9c2de5a4b1c733280cb81112 (patch)
tree220026724ceb8fbcf18bf627fde022c2d8df0e91 /netwerk/protocol/ftp/nsFtpConnectionThread.cpp
parent6571d2ceb42930dab01677ef0e95e732d5076fb8 (diff)
downloadUXP-e16bcd08aae85a7d9c2de5a4b1c733280cb81112.tar
UXP-e16bcd08aae85a7d9c2de5a4b1c733280cb81112.tar.gz
UXP-e16bcd08aae85a7d9c2de5a4b1c733280cb81112.tar.lz
UXP-e16bcd08aae85a7d9c2de5a4b1c733280cb81112.tar.xz
UXP-e16bcd08aae85a7d9c2de5a4b1c733280cb81112.zip
Remove MOZ_WIDGET_GONK [2/2]
Tag #288
Diffstat (limited to 'netwerk/protocol/ftp/nsFtpConnectionThread.cpp')
-rw-r--r--netwerk/protocol/ftp/nsFtpConnectionThread.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/netwerk/protocol/ftp/nsFtpConnectionThread.cpp b/netwerk/protocol/ftp/nsFtpConnectionThread.cpp
index 1119fcff5..2ae12846a 100644
--- a/netwerk/protocol/ftp/nsFtpConnectionThread.cpp
+++ b/netwerk/protocol/ftp/nsFtpConnectionThread.cpp
@@ -45,10 +45,6 @@
#include "nsIAuthPrompt2.h"
#include "nsIFTPChannelParentInternal.h"
-#ifdef MOZ_WIDGET_GONK
-#include "NetStatistics.h"
-#endif
-
using namespace mozilla;
using namespace mozilla::net;
@@ -1619,13 +1615,6 @@ nsFtpState::Init(nsFtpChannel *channel)
// initialize counter for network metering
mCountRecv = 0;
-#ifdef MOZ_WIDGET_GONK
- nsCOMPtr<nsINetworkInfo> activeNetworkInfo;
- GetActiveNetworkInfo(activeNetworkInfo);
- mActiveNetworkInfo =
- new nsMainThreadPtrHolder<nsINetworkInfo>(activeNetworkInfo);
-#endif
-
mKeepRunning = true;
mSuppliedEntityID = channel->EntityID();
@@ -2104,43 +2093,7 @@ nsFtpState::ReadSegments(nsWriteSegmentFun writer, void *closure,
nsresult
nsFtpState::SaveNetworkStats(bool enforce)
{
-#ifdef MOZ_WIDGET_GONK
- // Obtain app id
- uint32_t appId;
- bool isInBrowser;
- NS_GetAppInfo(mChannel, &appId, &isInBrowser);
-
- // Check if active network and appid are valid.
- if (!mActiveNetworkInfo || appId == NECKO_NO_APP_ID) {
- return NS_OK;
- }
-
- if (mCountRecv <= 0) {
- // There is no traffic, no need to save.
- return NS_OK;
- }
-
- // If |enforce| is false, the traffic amount is saved
- // only when the total amount exceeds the predefined
- // threshold.
- if (!enforce && mCountRecv < NETWORK_STATS_THRESHOLD) {
- return NS_OK;
- }
-
- // Create the event to save the network statistics.
- // the event is then dispathed to the main thread.
- RefPtr<Runnable> event =
- new SaveNetworkStatsEvent(appId, isInBrowser, mActiveNetworkInfo,
- mCountRecv, 0, false);
- NS_DispatchToMainThread(event);
-
- // Reset the counters after saving.
- mCountRecv = 0;
-
- return NS_OK;
-#else
return NS_ERROR_NOT_IMPLEMENTED;
-#endif
}
NS_IMETHODIMP