Bug 913734 - Remove namespace mozilla::hotness. r=mrbkap
authorBobby Holley <bobbyholley@gmail.com>
Fri, 13 Dec 2013 19:15:44 -0800
changeset 160497 093a4a3a68caf597330d0cfb00af103ac2791178
parent 160496 4dcc22e19dee436d6aa010fd14c3c3b8ef7ace4c
child 160498 00db24c44565df7e3c4b0cd0ddca67051d78f8e5
push id25834
push userphilringnalda@gmail.com
push dateSun, 15 Dec 2013 02:20:53 +0000
treeherdermozilla-central@9fcc6330dc69 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs913734
milestone29.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 913734 - Remove namespace mozilla::hotness. r=mrbkap
caps/include/DomainPolicy.h
caps/src/DomainPolicy.cpp
caps/src/nsScriptSecurityManager.cpp
--- a/caps/include/DomainPolicy.h
+++ b/caps/include/DomainPolicy.h
@@ -8,21 +8,16 @@
 #define DomainPolicy_h__
 
 #include "nsIDomainPolicy.h"
 #include "nsTHashtable.h"
 #include "nsURIHashKey.h"
 
 namespace mozilla {
 
-// The name "DomainPolicy" conflicts with some of the old-style policy machinery
-// in nsScriptSecurityManager.cpp, which needs to #include this file. So we
-// temporarily use a sub-namespace until that machinery goes away in bug 913734.
-namespace hotness {
-
 class DomainPolicy : public nsIDomainPolicy
 {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIDOMAINPOLICY
     DomainPolicy();
     virtual ~DomainPolicy();
 
@@ -41,12 +36,11 @@ public:
 
     DomainSet() {}
     virtual ~DomainSet() {}
 
 protected:
     nsTHashtable<nsURIHashKey> mHashTable;
 };
 
-} /* namespace hotness */
 } /* namespace mozilla */
 
 #endif /* DomainPolicy_h__ */
--- a/caps/src/DomainPolicy.cpp
+++ b/caps/src/DomainPolicy.cpp
@@ -3,17 +3,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/. */
 
 #include "DomainPolicy.h"
 #include "nsScriptSecurityManager.h"
 
 namespace mozilla {
-namespace hotness {
 
 NS_IMPL_ISUPPORTS1(DomainPolicy, nsIDomainPolicy)
 
 DomainPolicy::DomainPolicy() : mBlacklist(new DomainSet())
                              , mSuperBlacklist(new DomainSet())
                              , mWhitelist(new DomainSet())
                              , mSuperWhitelist(new DomainSet())
 {}
@@ -156,10 +155,9 @@ DomainSet::ContainsSuperDomain(nsIURI* a
         NS_ENSURE_SUCCESS(rv, rv);
     }
 
     // No match.
     return NS_OK;
 
 }
 
-} /* namespace hotness */
 } /* namespace mozilla */
--- a/caps/src/nsScriptSecurityManager.cpp
+++ b/caps/src/nsScriptSecurityManager.cpp
@@ -1954,17 +1954,17 @@ NS_IMETHODIMP
 nsScriptSecurityManager::ActivateDomainPolicy(nsIDomainPolicy** aRv)
 {
     // We only allow one domain policy at a time. The holder of the previous
     // policy must explicitly deactivate it first.
     if (mDomainPolicy) {
         return NS_ERROR_SERVICE_NOT_AVAILABLE;
     }
 
-    mDomainPolicy = new mozilla::hotness::DomainPolicy();
+    mDomainPolicy = new DomainPolicy();
     nsCOMPtr<nsIDomainPolicy> ptr = mDomainPolicy;
     ptr.forget(aRv);
     return NS_OK;
 }
 
 // Intentionally non-scriptable. Script must have a reference to the
 // nsIDomainPolicy to deactivate it.
 void