Bug 910942 - Don't include unnecessary things in netwerk/.../Dashboard. r=mcmanus, r=valentin.gosu
authorCatalin Iordache <catalinn.iordache@gmail.com>
Thu, 05 Sep 2013 16:12:38 -0400
changeset 158801 238ff32d423bfdeaa3a8a2795832e5ca42c3d024
parent 158800 bdb479f06bb1bbb73139ef353012984ed657dd3d
child 158802 47293f729adc72fad87992be50bea0f342cc487d
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus, valentin
bugs910942
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 910942 - Don't include unnecessary things in netwerk/.../Dashboard. r=mcmanus, r=valentin.gosu
netwerk/base/src/Dashboard.cpp
netwerk/base/src/Dashboard.h
netwerk/base/src/DashboardTypes.h
--- a/netwerk/base/src/Dashboard.cpp
+++ b/netwerk/base/src/Dashboard.cpp
@@ -1,28 +1,54 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http:mozilla.org/MPL/2.0/. */
 
+#include "mozilla/dom/NetDashboardBinding.h"
 #include "mozilla/net/Dashboard.h"
-
-#include "jsapi.h"
-#include "mozilla/dom/NetDashboardBinding.h"
 #include "mozilla/net/HttpInfo.h"
 #include "nsCxPusher.h"
+#include "nsHttp.h"
+#include "nsIDNSService.h"
+#include "nsIThread.h"
+#include "nsSocketTransport2.h"
 
 using mozilla::AutoSafeJSContext;
 namespace mozilla {
 namespace net {
 
 NS_IMPL_ISUPPORTS5(Dashboard, nsIDashboard, nsIDashboardEventNotifier,
                               nsITransportEventSink, nsITimerCallback,
                               nsIDNSListener)
 using mozilla::dom::Sequence;
 
+struct ConnStatus
+{
+    nsString creationSts;
+};
+
+class DashConnStatusRunnable: public nsRunnable
+{
+public:
+    DashConnStatusRunnable(Dashboard * aDashboard, ConnStatus aStatus)
+    : mDashboard(aDashboard)
+    {
+        mStatus.creationSts = aStatus.creationSts;
+    }
+
+    NS_IMETHODIMP Run()
+    {
+        return mDashboard->GetConnectionStatus(mStatus);
+    }
+
+private:
+    ConnStatus mStatus;
+    Dashboard * mDashboard;
+};
+
 Dashboard::Dashboard()
 {
     mEnableLogging = false;
 }
 
 Dashboard::~Dashboard()
 {
     if (mDnsup.cancel)
--- a/netwerk/base/src/Dashboard.h
+++ b/netwerk/base/src/Dashboard.h
@@ -1,28 +1,26 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsDashboard_h__
 #define nsDashboard_h__
 
+#include "mozilla/Mutex.h"
+#include "mozilla/net/DashboardTypes.h"
 #include "nsIDashboard.h"
-#include "nsIDashboardEventNotifier.h"
-#include "nsTArray.h"
-#include "nsString.h"
-#include "nsIDNSService.h"
+#include "nsIDNSListener.h"
 #include "nsIServiceManager.h"
-#include "nsIThread.h"
-#include "nsSocketTransport2.h"
-#include "mozilla/net/DashboardTypes.h"
-#include "nsHttp.h"
+#include "nsITimer.h"
 #include "nsITransport.h"
-#include "nsITimer.h"
-#include "nsIDNSListener.h"
+
+class nsIDNSService;
+class nsISocketTransport;
+class nsIThread;
 
 namespace mozilla {
 namespace net {
 
 class Dashboard:
     public nsIDashboard,
     public nsIDashboardEventNotifier,
     public nsITransportEventSink,
@@ -143,29 +141,10 @@ private:
     struct SocketData mSock;
     struct HttpData mHttp;
     struct WebSocketData mWs;
     struct DnsData mDns;
     struct DnsLookup mDnsup;
     struct ConnectionData mConn;
 };
 
-class DashConnStatusRunnable: public nsRunnable
-{
-public:
-    DashConnStatusRunnable(Dashboard * aDashboard, ConnStatus aStatus)
-    : mDashboard(aDashboard)
-    {
-        mStatus.creationSts = aStatus.creationSts;
-    }
-
-    NS_IMETHODIMP Run()
-    {
-        return mDashboard->GetConnectionStatus(mStatus);
-    }
-
-private:
-    ConnStatus mStatus;
-    Dashboard * mDashboard;
-};
-
 } } // namespace mozilla::net
 #endif // nsDashboard_h__
--- a/netwerk/base/src/DashboardTypes.h
+++ b/netwerk/base/src/DashboardTypes.h
@@ -1,17 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_net_DashboardTypes_h_
 #define mozilla_net_DashboardTypes_h_
 
-#include <stdint.h>
-#include "nsStringGlue.h"
+#include "nsString.h"
 #include "nsTArray.h"
 
 namespace mozilla {
 namespace net {
 
 struct SocketInfo
 {
     nsCString host;
@@ -52,16 +51,11 @@ struct HttpRetParams
     nsTArray<HttpConnInfo>   idle;
     nsTArray<HalfOpenSockets> halfOpens;
     uint32_t  counter;
     uint16_t  port;
     bool      spdy;
     bool      ssl;
 };
 
-struct ConnStatus
-{
-    nsString creationSts;
-};
-
 } }
 
 #endif // mozilla_net_DashboardTypes_h_