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 | |
parent | 6571d2ceb42930dab01677ef0e95e732d5076fb8 (diff) | |
download | UXP-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')
-rw-r--r-- | netwerk/base/nsIOService.cpp | 5 | ||||
-rw-r--r-- | netwerk/base/nsIncrementalDownload.cpp | 21 | ||||
-rw-r--r-- | netwerk/base/nsNetUtil.cpp | 5 | ||||
-rw-r--r-- | netwerk/base/nsUDPSocket.cpp | 37 | ||||
-rw-r--r-- | netwerk/base/nsUDPSocket.h | 8 |
5 files changed, 1 insertions, 75 deletions
diff --git a/netwerk/base/nsIOService.cpp b/netwerk/base/nsIOService.cpp index 8b7f31f99..e13541acf 100644 --- a/netwerk/base/nsIOService.cpp +++ b/netwerk/base/nsIOService.cpp @@ -59,11 +59,6 @@ #include "nsContentUtils.h" #include "xpcpublic.h" -#ifdef MOZ_WIDGET_GONK -#include "nsINetworkManager.h" -#include "nsINetworkInterface.h" -#endif - namespace mozilla { namespace net { diff --git a/netwerk/base/nsIncrementalDownload.cpp b/netwerk/base/nsIncrementalDownload.cpp index 42cd6faa5..47f7cb98b 100644 --- a/netwerk/base/nsIncrementalDownload.cpp +++ b/netwerk/base/nsIncrementalDownload.cpp @@ -49,27 +49,6 @@ WriteToFile(nsIFile *lf, const char *data, uint32_t len, int32_t flags) PRFileDesc *fd; int32_t mode = 0600; nsresult rv; -#if defined(MOZ_WIDGET_GONK) - // The sdcard on a B2G phone looks like: - // d---rwx--- system sdcard_rw 1970-01-01 01:00:00 sdcard - // On the emulator, xpcshell fails when using 0600 mode to open the file, - // and 0660 works. - nsCOMPtr<nsIFile> parent; - rv = lf->GetParent(getter_AddRefs(parent)); - if (NS_FAILED(rv)) { - return rv; - } - uint32_t parentPerm; - rv = parent->GetPermissions(&parentPerm); - if (NS_FAILED(rv)) { - return rv; - } - if ((parentPerm & 0700) == 0) { - // Parent directory has no owner-write, so try to use group permissions - // instead of owner permissions. - mode = 0660; - } -#endif rv = lf->OpenNSPRFileDesc(flags, mode, &fd); if (NS_FAILED(rv)) return rv; diff --git a/netwerk/base/nsNetUtil.cpp b/netwerk/base/nsNetUtil.cpp index bc9bcf88a..d60c909c5 100644 --- a/netwerk/base/nsNetUtil.cpp +++ b/netwerk/base/nsNetUtil.cpp @@ -71,11 +71,6 @@ #include "nsHttpHandler.h" #include "nsNSSComponent.h" -#ifdef MOZ_WIDGET_GONK -#include "nsINetworkManager.h" -#include "nsThreadUtils.h" // for NS_IsMainThread -#endif - #include <limits> using namespace mozilla; 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 diff --git a/netwerk/base/nsUDPSocket.h b/netwerk/base/nsUDPSocket.h index 4ddff4248..f8ae87cee 100644 --- a/netwerk/base/nsUDPSocket.h +++ b/netwerk/base/nsUDPSocket.h @@ -12,11 +12,6 @@ #include "nsAutoPtr.h" #include "nsCycleCollectionParticipant.h" -#ifdef MOZ_WIDGET_GONK -#include "nsINetworkInterface.h" -#include "nsProxyRelease.h" -#endif - //----------------------------------------------------------------------------- namespace mozilla { @@ -76,9 +71,6 @@ private: uint64_t mByteReadCount; uint64_t mByteWriteCount; -#ifdef MOZ_WIDGET_GONK - nsMainThreadPtrHandle<nsINetworkInfo> mActiveNetworkInfo; -#endif }; //----------------------------------------------------------------------------- |