Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(703)

Unified Diff: third_party/WebKit/Source/core/html/HTMLTrackElement.cpp

Issue 1998553002: media: Replace wtf/Assertions.h macros in favor of base/logging.h macros (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLTrackElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLTrackElement.cpp b/third_party/WebKit/Source/core/html/HTMLTrackElement.cpp
index 7dc0f0cdeb783572f0aab8a84e7974b45f99efda..b8f3618b1572b8e5590aef533a92fbc6e65e9269 100644
--- a/third_party/WebKit/Source/core/html/HTMLTrackElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLTrackElement.cpp
@@ -34,11 +34,12 @@
#include "core/html/track/LoadableTextTrack.h"
#include "platform/Logging.h"
+#define TRACK_LOG_LEVEL 3
+
namespace blink {
using namespace HTMLNames;
-#if !LOG_DISABLED
static String urlForLoggingTrack(const KURL& url)
{
static const unsigned maximumURLLengthForLogging = 128;
@@ -47,13 +48,12 @@ static String urlForLoggingTrack(const KURL& url)
return url.getString();
return url.getString().substring(0, maximumURLLengthForLogging) + "...";
}
-#endif
inline HTMLTrackElement::HTMLTrackElement(Document& document)
: HTMLElement(trackTag, document)
, m_loadTimer(this, &HTMLTrackElement::loadTimerFired)
{
- WTF_LOG(Media, "HTMLTrackElement::HTMLTrackElement - %p", this);
+ DVLOG(TRACK_LOG_LEVEL) << "HTMLTrackElement - " << (void*)this;
}
DEFINE_NODE_FACTORY(HTMLTrackElement)
@@ -64,7 +64,7 @@ HTMLTrackElement::~HTMLTrackElement()
Node::InsertionNotificationRequest HTMLTrackElement::insertedInto(ContainerNode* insertionPoint)
{
- WTF_LOG(Media, "HTMLTrackElement::insertedInto");
+ DVLOG(TRACK_LOG_LEVEL) << "insertedInto";
// Since we've moved to a new parent, we may now be able to load.
scheduleLoad();
@@ -145,7 +145,7 @@ bool HTMLTrackElement::isURLAttribute(const Attribute& attribute) const
void HTMLTrackElement::scheduleLoad()
{
- WTF_LOG(Media, "HTMLTrackElement::scheduleLoad");
+ DVLOG(TRACK_LOG_LEVEL) << "scheduleLoad";
// 1. If another occurrence of this algorithm is already running for this text track and its track element,
// abort these steps, letting that other algorithm take care of this element.
@@ -170,7 +170,7 @@ void HTMLTrackElement::scheduleLoad()
void HTMLTrackElement::loadTimerFired(Timer<HTMLTrackElement>*)
{
- WTF_LOG(Media, "HTMLTrackElement::loadTimerFired");
+ DVLOG(TRACK_LOG_LEVEL) << "loadTimerFired";
// 6. [X] Set the text track readiness state to loading.
setReadyState(LOADING);
@@ -231,7 +231,7 @@ bool HTMLTrackElement::canLoadUrl(const KURL& url)
return false;
if (!document().contentSecurityPolicy()->allowMediaFromSource(url)) {
- WTF_LOG(Media, "HTMLTrackElement::canLoadUrl(%s) -> rejected by Content Security Policy", urlForLoggingTrack(url).utf8().data());
+ DVLOG(TRACK_LOG_LEVEL) << "canLoadUrl(" << urlForLoggingTrack(url) << ") -> rejected by Content Security Policy";
return false;
}

Powered by Google App Engine
This is Rietveld 408576698