Bug 1167132 - Part 13: [NetworkManager] Move network information into a separate interface (Necko/NetStats). r=ethan
This commit is contained in:
@@ -1376,10 +1376,10 @@ WebSocketChannel::BeginOpenInternal()
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
if (mAppId != NECKO_NO_APP_ID) {
|
||||
nsCOMPtr<nsINetworkInterface> activeNetwork;
|
||||
GetActiveNetworkInterface(activeNetwork);
|
||||
mActiveNetwork =
|
||||
new nsMainThreadPtrHolder<nsINetworkInterface>(activeNetwork);
|
||||
nsCOMPtr<nsINetworkInfo> activeNetworkInfo;
|
||||
GetActiveNetworkInfo(activeNetworkInfo);
|
||||
mActiveNetworkInfo =
|
||||
new nsMainThreadPtrHolder<nsINetworkInfo>(activeNetworkInfo);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3709,7 +3709,7 @@ WebSocketChannel::SaveNetworkStats(bool enforce)
|
||||
{
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
// Check if the active network and app id are valid.
|
||||
if(!mActiveNetwork || mAppId == NECKO_NO_APP_ID) {
|
||||
if(!mActiveNetworkInfo || mAppId == NECKO_NO_APP_ID) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -3735,7 +3735,7 @@ WebSocketChannel::SaveNetworkStats(bool enforce)
|
||||
// Create the event to save the network statistics.
|
||||
// the event is then dispathed to the main thread.
|
||||
nsRefPtr<nsRunnable> event =
|
||||
new SaveNetworkStatsEvent(mAppId, mIsInBrowser, mActiveNetwork,
|
||||
new SaveNetworkStatsEvent(mAppId, mIsInBrowser, mActiveNetworkInfo,
|
||||
countRecv, countSent, false);
|
||||
NS_DispatchToMainThread(event);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user