Skip to content

Commit

Permalink
Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
Browse files Browse the repository at this point in the history
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
  • Loading branch information
poiru committed Jul 13, 2015
1 parent e4231f7 commit a893959
Show file tree
Hide file tree
Showing 1,709 changed files with 3,141 additions and 2,926 deletions.
1 change: 1 addition & 0 deletions accessible/generic/OuterDocAccessible.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Accessible::AsOuterDoc()
{
return IsOuterDoc() ? static_cast<OuterDocAccessible*>(this) : nullptr;
}

} // namespace a11y
} // namespace mozilla

Expand Down
1 change: 1 addition & 0 deletions accessible/windows/msaa/AccessibleWrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ WrapperFor(ProxyAccessible* aProxy)
{
return reinterpret_cast<AccessibleWrap*>(aProxy->GetWrapper());
}

} // namespace a11y
} // namespace mozilla

Expand Down
2 changes: 1 addition & 1 deletion browser/components/migration/nsIEHistoryEnumerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace {
return PR_ImplodeTime(&prt);
}

} // Anonymous namespace.
} // namespace

////////////////////////////////////////////////////////////////////////////////
//// nsIEHistoryEnumerator
Expand Down
2 changes: 1 addition & 1 deletion caps/BasePrincipal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class MOZ_STACK_CLASS PopulateFromSuffixIterator final
OriginAttributes* mOriginAttributes;
};

} // anonymous namespace
} // namespace

bool
OriginAttributes::PopulateFromSuffix(const nsACString& aStr)
Expand Down
2 changes: 1 addition & 1 deletion caps/DomainPolicy.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace mozilla {

namespace ipc {
class URIParams;
};
} // namespace ipc

enum DomainSetChangeType{
ACTIVATE_POLICY,
Expand Down
2 changes: 1 addition & 1 deletion caps/nsScriptSecurityManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class nsSystemPrincipal;

namespace mozilla {
class OriginAttributes;
}
} // namespace mozilla

/////////////////////////////
// nsScriptSecurityManager //
Expand Down
2 changes: 1 addition & 1 deletion chrome/RegistryMessageUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,6 @@ struct ParamTraits<OverrideMapping>
}
};

}
} // namespace IPC

#endif // RegistryMessageUtils_h
4 changes: 2 additions & 2 deletions chrome/nsChromeRegistryChrome.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
namespace mozilla {
namespace dom {
class PContentParent;
}
}
} // namespace dom
} // namespace mozilla

class nsIPrefBranch;
struct ChromePackage;
Expand Down
2 changes: 1 addition & 1 deletion docshell/base/IHistory.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace mozilla {

namespace dom {
class Link;
}
} // namespace dom

// 0057c9d3-b98e-4933-bdc5-0275d06705e1
#define IHISTORY_IID \
Expand Down
5 changes: 3 additions & 2 deletions docshell/base/nsDocShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8420,7 +8420,8 @@ class MOZ_STACK_CLASS PresentationEventForgetter
mRestorePresentationEvent;
nsRefPtr<nsDocShell::RestorePresentationEvent> mEvent;
};
}

} // namespace

nsresult
nsDocShell::RestoreFromHistory()
Expand Down Expand Up @@ -9448,7 +9449,7 @@ class nsCopyFaviconCallback final : public nsIFaviconDataCallback
NS_IMPL_ISUPPORTS(nsCopyFaviconCallback, nsIFaviconDataCallback)
#endif

} // anonymous namespace
} // namespace

void
nsDocShell::CopyFavicon(nsIURI* aOldURI,
Expand Down
4 changes: 2 additions & 2 deletions docshell/base/nsDocShell.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
namespace mozilla {
namespace dom {
class EventTarget;
}
}
} // namespace dom
} // namespace mozilla

class nsDocShell;
class nsDOMNavigationTiming;
Expand Down
2 changes: 1 addition & 1 deletion docshell/shistory/nsSHEntryShared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace {

uint64_t gSHEntrySharedID = 0;

} // anonymous namespace
} // namespace

#define CONTENT_VIEWER_TIMEOUT_SECONDS "browser.sessionhistory.contentViewerTimeout"
// Default this to time out unused content viewers after 30 minutes
Expand Down
4 changes: 2 additions & 2 deletions docshell/shistory/nsSHistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ EvictContentViewerForTransaction(nsISHTransaction* aTrans)
}
}

} // anonymous namespace
} // namespace

nsSHistory::nsSHistory()
: mIndex(-1)
Expand Down Expand Up @@ -1046,7 +1046,7 @@ class TransactionAndDistance
int32_t mDistance;
};

} // anonymous namespace
} // namespace

// static
void
Expand Down
6 changes: 3 additions & 3 deletions dom/alarm/AlarmHalService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,6 @@ AlarmHalService::Notify(const int64_t& aClockDeltaMS)
mSystemClockChangedCb->OnSystemClockChanged(aClockDeltaMS);
}

} // alarm
} // dom
} // mozilla
} // namespace alarm
} // namespace dom
} // namespace mozilla
2 changes: 1 addition & 1 deletion dom/animation/AnimationTimeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace {
AnimationTimeline* mTimeline;
#endif
};
}
} // namespace

static PLDHashOperator
AppendAnimationToSequence(nsRefPtrHashKey<dom::Animation>* aKey,
Expand Down
2 changes: 1 addition & 1 deletion dom/asmjscache/AsmJSCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1618,7 +1618,7 @@ OpenFile(nsIPrincipal* aPrincipal,
return JS::AsmJSCache_Success;
}

} // anonymous namespace
} // namespace

typedef uint32_t AsmJSCookieType;
static const uint32_t sAsmJSCookie = 0x600d600d;
Expand Down
2 changes: 1 addition & 1 deletion dom/asmjscache/AsmJSCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace dom {

namespace quota {
class Client;
}
} // namespace quota

namespace asmjscache {

Expand Down
1 change: 1 addition & 0 deletions dom/audiochannel/AudioChannelAgent.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,5 @@ class AudioChannelAgent : public nsIAudioChannelAgent
} // namespace dom
} // namespace mozilla


#endif
4 changes: 2 additions & 2 deletions dom/base/AnonymousContent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,5 @@ AnonymousContent::WrapObject(JSContext* aCx,
return AnonymousContentBinding::Wrap(aCx, this, aGivenProto, aReflector);
}

} // dom namespace
} // mozilla namespace
} // namespace dom
} // namespace mozilla
4 changes: 2 additions & 2 deletions dom/base/AnonymousContent.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class AnonymousContent final
nsCOMPtr<Element> mContentNode;
};

} // dom namespace
} // mozilla namespace
} // namespace dom
} // namespace mozilla

#endif // mozilla_dom_AnonymousContent_h
4 changes: 2 additions & 2 deletions dom/base/BlobSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class BlobSet {
uint64_t mDataBufferLen;
};

} // dom namespace
} // mozilla namespace
} // namespace dom
} // namespace mozilla

#endif // mozilla_dom_BlobSet_h
1 change: 1 addition & 0 deletions dom/base/ChildIterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,5 +345,6 @@ AllChildrenIterator::GetNextChild()

return nullptr;
}

} // namespace dom
} // namespace mozilla
1 change: 1 addition & 0 deletions dom/base/ChromeUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ ChromeUtils::OriginAttributesToSuffix(dom::GlobalObject& aGlobal,
OriginAttributes attrs(aAttrs);
attrs.CreateSuffix(aSuffix);
}

} // namespace dom
} // namespace mozilla
2 changes: 1 addition & 1 deletion dom/base/ChromeUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace mozilla {

namespace devtools {
class HeapSnapshot;
}
} // namespace devtools

namespace dom {

Expand Down
2 changes: 1 addition & 1 deletion dom/base/Console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1469,7 +1469,7 @@ FlushOutput(JSContext* aCx, Sequence<JS::Value>& aSequence, nsString &aOutput)
return true;
}

} // anonymous namespace
} // namespace

bool
Console::ProcessArguments(JSContext* aCx,
Expand Down
4 changes: 2 additions & 2 deletions dom/base/Console.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class Console final : public nsIObserver
friend class ConsoleProfileRunnable;
};

} // dom namespace
} // mozilla namespace
} // namespace dom
} // namespace mozilla

#endif /* mozilla_dom_Console_h */
4 changes: 2 additions & 2 deletions dom/base/DOMMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ class DOMMatrix final : public DOMMatrixReadOnly
void Ensure3DMatrix();
};

}
}
} // namespace dom
} // namespace mozilla

#endif /*MOZILLA_DOM_DOMMATRIX_H_*/
4 changes: 2 additions & 2 deletions dom/base/DOMPoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class DOMPoint final : public DOMPointReadOnly
void SetW(double aW) { mW = aW; }
};

}
}
} // namespace dom
} // namespace mozilla

#endif /*MOZILLA_DOMPOINT_H_*/
4 changes: 2 additions & 2 deletions dom/base/DOMQuad.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class DOMQuad final : public nsWrapperCache
mutable nsRefPtr<QuadBounds> mBounds; // allocated lazily
};

}
}
} // namespace dom
} // namespace mozilla

#endif /*MOZILLA_DOMRECT_H_*/
5 changes: 2 additions & 3 deletions dom/base/DOMRect.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ class DOMRectList final : public nsIDOMClientRectList,
nsCOMPtr<nsISupports> mParent;
};

}

}
} // namespace dom
} // namespace mozilla

#endif /*MOZILLA_DOMRECT_H_*/
4 changes: 2 additions & 2 deletions dom/base/ElementInlines.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Element::UnregisterActivityObserver()
OwnerDoc()->UnregisterActivityObserver(this);
}

}
}
} // namespace dom
} // namespace mozilla

#endif // mozilla_dom_ElementInlines_h
4 changes: 2 additions & 2 deletions dom/base/File.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1333,5 +1333,5 @@ BlobSet::AppendBlobImpls(const nsTArray<nsRefPtr<BlobImpl>>& aBlobImpls)
return NS_OK;
}

} // dom namespace
} // mozilla namespace
} // namespace dom
} // namespace mozilla
6 changes: 3 additions & 3 deletions dom/base/File.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace dom {

namespace indexedDB {
class FileInfo;
};
} // namespace indexedDB

struct BlobPropertyBag;
struct ChromeFilePropertyBag;
Expand Down Expand Up @@ -1038,7 +1038,7 @@ class FileList final : public nsIDOMFileList,
nsCOMPtr<nsISupports> mParent;
};

} // dom namespace
} // file namespace
} // namespace dom
} // namespace mozilla

#endif // mozilla_dom_File_h
2 changes: 1 addition & 1 deletion dom/base/FragmentOrElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2335,7 +2335,7 @@ class StringBuilder
uint32_t mLength;
};

} // anonymous namespace
} // namespace

static void
AppendEncodedCharacters(const nsTextFragment* aText, StringBuilder& aBuilder)
Expand Down
4 changes: 2 additions & 2 deletions dom/base/FragmentOrElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class nsIURI;
namespace mozilla {
namespace dom {
class Element;
}
}
} // namespace dom
} // namespace mozilla

/**
* A class that implements nsIWeakReference
Expand Down
2 changes: 1 addition & 1 deletion dom/base/ImageEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace mozilla {

namespace layers {
class Image;
}
} // namespace layers

namespace dom {

Expand Down
2 changes: 1 addition & 1 deletion dom/base/Navigator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ VibrateWindowListener::RemoveListener()
true /* use capture */);
}

} // anonymous namespace
} // namespace

void
Navigator::AddIdleObserver(MozIdleObserver& aIdleObserver, ErrorResult& aRv)
Expand Down
6 changes: 3 additions & 3 deletions dom/base/Navigator.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class WakeLock;
class ArrayBufferViewOrBlobOrStringOrFormData;
struct MobileIdOptions;
class ServiceWorkerContainer;
}
}
} // namespace dom
} // namespace mozilla

//*****************************************************************************
// Navigator: Script "navigator" object
Expand Down Expand Up @@ -75,7 +75,7 @@ class MozGetUserMediaDevicesSuccessCallback;

namespace network {
class Connection;
} // namespace Connection;
} // namespace network

#ifdef MOZ_B2G_BT
namespace bluetooth {
Expand Down
Loading

0 comments on commit a893959

Please sign in to comment.