Bug 798033 - Remove 'using namespace' from toolkit/ headers. r=bsmedberg
authorBirunthan Mohanathas <birunthan@mohanathas.com>
Sun, 08 Dec 2013 21:53:46 -0500
changeset 159475 a8b06549f680c3bec8c15a629e437c6e20848238
parent 159474 6f362df0b72436ec4082e89d37b38721f336e38c
child 159476 9e1a644eb6f37daca96cdff84d1046bfe2d322ed
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg
bugs798033
milestone28.0a1
Bug 798033 - Remove 'using namespace' from toolkit/ headers. r=bsmedberg
toolkit/components/alerts/nsXULAlerts.cpp
toolkit/components/alerts/nsXULAlerts.h
toolkit/components/build/nsToolkitCompsModule.cpp
--- a/toolkit/components/alerts/nsXULAlerts.cpp
+++ b/toolkit/components/alerts/nsXULAlerts.cpp
@@ -8,16 +8,18 @@
 #include "nsAutoPtr.h"
 #include "mozilla/LookAndFeel.h"
 #include "nsIServiceManager.h"
 #include "nsISupportsArray.h"
 #include "nsISupportsPrimitives.h"
 #include "nsPIDOMWindow.h"
 #include "nsIWindowWatcher.h"
 
+using namespace mozilla;
+
 #define ALERT_CHROME_URL "chrome://global/content/alerts/alert.xul"
 
 NS_IMPL_ISUPPORTS1(nsXULAlertObserver, nsIObserver)
 
 NS_IMETHODIMP
 nsXULAlertObserver::Observe(nsISupports* aSubject, const char* aTopic,
                             const PRUnichar* aData)
 {
--- a/toolkit/components/alerts/nsXULAlerts.h
+++ b/toolkit/components/alerts/nsXULAlerts.h
@@ -7,18 +7,16 @@
 #define nsXULAlerts_h__
 
 #include "nsHashKeys.h"
 #include "nsInterfaceHashtable.h"
 
 #include "nsIDOMWindow.h"
 #include "nsIObserver.h"
 
-using namespace mozilla;
-
 class nsXULAlerts {
   friend class nsXULAlertObserver;
 public:
   nsXULAlerts()
   {
   }
 
   virtual ~nsXULAlerts() {}
--- a/toolkit/components/build/nsToolkitCompsModule.cpp
+++ b/toolkit/components/build/nsToolkitCompsModule.cpp
@@ -31,16 +31,18 @@
 #include "nsUrlClassifierStreamUpdater.h"
 #include "nsUrlClassifierUtils.h"
 #include "nsUrlClassifierPrefixSet.h"
 #endif
 
 #include "nsBrowserStatusFilter.h"
 #include "mozilla/FinalizationWitnessService.h"
 
+using namespace mozilla;
+
 /////////////////////////////////////////////////////////////////////////////
 
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAppStartup, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUserInfo)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsFindService)
 
 #if defined(XP_WIN) && !defined(MOZ_DISABLE_PARENTAL_CONTROLS)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsParentalControlsServiceWin)
@@ -108,17 +110,17 @@ NS_DEFINE_NAMED_CID(NS_URLCLASSIFIERUTIL
 #endif
 NS_DEFINE_NAMED_CID(NS_BROWSERSTATUSFILTER_CID);
 NS_DEFINE_NAMED_CID(NS_CHARSETMENU_CID);
 #if defined(USE_MOZ_UPDATER)
 NS_DEFINE_NAMED_CID(NS_UPDATEPROCESSOR_CID);
 #endif
 NS_DEFINE_NAMED_CID(FINALIZATIONWITNESSSERVICE_CID);
 
-static const mozilla::Module::CIDEntry kToolkitCIDs[] = {
+static const Module::CIDEntry kToolkitCIDs[] = {
   { &kNS_TOOLKIT_APPSTARTUP_CID, false, nullptr, nsAppStartupConstructor },
   { &kNS_USERINFO_CID, false, nullptr, nsUserInfoConstructor },
   { &kNS_ALERTSSERVICE_CID, false, nullptr, nsAlertsServiceConstructor },
 #if defined(XP_WIN) && !defined(MOZ_DISABLE_PARENTAL_CONTROLS)
   { &kNS_PARENTALCONTROLSSERVICE_CID, false, nullptr, nsParentalControlsServiceWinConstructor },
 #endif
   { &kNS_DOWNLOADMANAGER_CID, false, nullptr, nsDownloadManagerConstructor },
   { &kNS_DOWNLOADPLATFORM_CID, false, nullptr, DownloadPlatformConstructor },
@@ -136,17 +138,17 @@ static const mozilla::Module::CIDEntry k
   { &kNS_CHARSETMENU_CID, false, nullptr, NS_NewCharsetMenu },
 #if defined(USE_MOZ_UPDATER)
   { &kNS_UPDATEPROCESSOR_CID, false, nullptr, nsUpdateProcessorConstructor },
 #endif
   { &kFINALIZATIONWITNESSSERVICE_CID, false, nullptr, FinalizationWitnessServiceConstructor },
   { nullptr }
 };
 
-static const mozilla::Module::ContractIDEntry kToolkitContracts[] = {
+static const Module::ContractIDEntry kToolkitContracts[] = {
   { NS_APPSTARTUP_CONTRACTID, &kNS_TOOLKIT_APPSTARTUP_CID },
   { NS_USERINFO_CONTRACTID, &kNS_USERINFO_CID },
   { NS_ALERTSERVICE_CONTRACTID, &kNS_ALERTSSERVICE_CID },
 #if defined(XP_WIN) && !defined(MOZ_DISABLE_PARENTAL_CONTROLS)
   { NS_PARENTALCONTROLSSERVICE_CONTRACTID, &kNS_PARENTALCONTROLSSERVICE_CID },
 #endif
   { NS_DOWNLOADMANAGER_CONTRACTID, &kNS_DOWNLOADMANAGER_CID },
   { NS_DOWNLOADPLATFORM_CONTRACTID, &kNS_DOWNLOADPLATFORM_CID },
@@ -165,15 +167,15 @@ static const mozilla::Module::ContractID
   { NS_RDF_DATASOURCE_CONTRACTID_PREFIX NS_CHARSETMENU_PID, &kNS_CHARSETMENU_CID },
 #if defined(USE_MOZ_UPDATER)
   { NS_UPDATEPROCESSOR_CONTRACTID, &kNS_UPDATEPROCESSOR_CID },
 #endif
   { FINALIZATIONWITNESSSERVICE_CONTRACTID, &kFINALIZATIONWITNESSSERVICE_CID },
   { nullptr }
 };
 
-static const mozilla::Module kToolkitModule = {
-  mozilla::Module::kVersion,
+static const Module kToolkitModule = {
+  Module::kVersion,
   kToolkitCIDs,
   kToolkitContracts
 };
 
 NSMODULE_DEFN(nsToolkitCompsModule) = &kToolkitModule;