diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-05-13 00:08:52 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-05-13 00:08:52 +0200 |
commit | e16bcd08aae85a7d9c2de5a4b1c733280cb81112 (patch) | |
tree | 220026724ceb8fbcf18bf627fde022c2d8df0e91 /netwerk/base/nsUDPSocket.cpp | |
parent | 6571d2ceb42930dab01677ef0e95e732d5076fb8 (diff) | |
download | uxp-e16bcd08aae85a7d9c2de5a4b1c733280cb81112.tar.gz |
Remove MOZ_WIDGET_GONK [2/2]
Tag #288
Diffstat (limited to 'netwerk/base/nsUDPSocket.cpp')
-rw-r--r-- | netwerk/base/nsUDPSocket.cpp | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/netwerk/base/nsUDPSocket.cpp b/netwerk/base/nsUDPSocket.cpp index 84f6b8ea56..5973a205d4 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 |