summaryrefslogtreecommitdiffstats
path: root/netwerk/base/nsUDPSocket.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/base/nsUDPSocket.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/base/nsUDPSocket.cpp')
-rw-r--r--netwerk/base/nsUDPSocket.cpp37
1 files changed, 1 insertions, 36 deletions
diff --git a/netwerk/base/nsUDPSocket.cpp b/netwerk/base/nsUDPSocket.cpp
index 84f6b8ea5..5973a205d 100644
--- a/netwerk/base/nsUDPSocket.cpp
+++ b/netwerk/base/nsUDPSocket.cpp
@@ -31,10 +31,6 @@
#include "nsIDNSService.h"
#include "nsICancelable.h"
-#ifdef MOZ_WIDGET_GONK
-#include "NetStatistics.h"
-#endif
-
namespace mozilla {
namespace net {
@@ -626,15 +622,6 @@ nsUDPSocket::InitWithAddress(const NetAddr *aAddr, nsIPrincipal *aPrincipal,
aPrincipal->GetIsInIsolatedMozBrowserElement();
}
-#ifdef MOZ_WIDGET_GONK
- if (mAppId != NECKO_UNKNOWN_APP_ID) {
- nsCOMPtr<nsINetworkInfo> activeNetworkInfo;
- GetActiveNetworkInfo(activeNetworkInfo);
- mActiveNetworkInfo =
- new nsMainThreadPtrHolder<nsINetworkInfo>(activeNetworkInfo);
- }
-#endif
-
uint16_t port;
if (NS_FAILED(net::GetPort(aAddr, &port))) {
NS_WARNING("invalid bind address");
@@ -770,29 +757,7 @@ nsUDPSocket::GetLocalAddr(nsINetAddr * *aResult)
void
nsUDPSocket::SaveNetworkStats(bool aEnforce)
{
-#ifdef MOZ_WIDGET_GONK
- if (!mActiveNetworkInfo || mAppId == NECKO_UNKNOWN_APP_ID) {
- return;
- }
-
- if (mByteReadCount == 0 && mByteWriteCount == 0) {
- return;
- }
-
- uint64_t total = mByteReadCount + mByteWriteCount;
- if (aEnforce || total > NETWORK_STATS_THRESHOLD) {
- // Create the event to save the network statistics.
- // the event is then dispathed to the main thread.
- RefPtr<Runnable> event =
- new SaveNetworkStatsEvent(mAppId, mIsInIsolatedMozBrowserElement, mActiveNetworkInfo,
- mByteReadCount, mByteWriteCount, false);
- NS_DispatchToMainThread(event);
-
- // Reset the counters after saving.
- mByteReadCount = 0;
- mByteWriteCount = 0;
- }
-#endif
+ /*** STUB ***/
}
void