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

Side by Side Diff: third_party/WebKit/Source/core/html/AutoplayExperimentHelper.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: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/html/AutoplayExperimentHelper.h" 5 #include "core/html/AutoplayExperimentHelper.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/frame/Settings.h" 8 #include "core/frame/Settings.h"
9 #include "core/html/HTMLMediaElement.h" 9 #include "core/html/HTMLMediaElement.h"
10 #include "core/layout/LayoutBox.h" 10 #include "core/layout/LayoutBox.h"
(...skipping 21 matching lines...) Expand all
32 , m_autoplayMediaEncountered(false) 32 , m_autoplayMediaEncountered(false)
33 , m_playbackStartedMetricRecorded(false) 33 , m_playbackStartedMetricRecorded(false)
34 , m_waitingForAutoplayPlaybackEnd(false) 34 , m_waitingForAutoplayPlaybackEnd(false)
35 , m_recordedElement(false) 35 , m_recordedElement(false)
36 , m_lastLocationUpdateTime(-std::numeric_limits<double>::infinity()) 36 , m_lastLocationUpdateTime(-std::numeric_limits<double>::infinity())
37 , m_viewportTimer(this, &AutoplayExperimentHelper::viewportTimerFired) 37 , m_viewportTimer(this, &AutoplayExperimentHelper::viewportTimerFired)
38 , m_autoplayDeferredMetric(GesturelessPlaybackNotOverridden) 38 , m_autoplayDeferredMetric(GesturelessPlaybackNotOverridden)
39 { 39 {
40 m_mode = fromString(this->client().autoplayExperimentMode()); 40 m_mode = fromString(this->client().autoplayExperimentMode());
41 41
42 if (m_mode != Mode::ExperimentOff) { 42 if (m_mode != Mode::ExperimentOff)
43 WTF_LOG(Media, "HTMLMediaElement: autoplay experiment set to %d", 43 DVLOG(3) << "autoplay experiment set to " << m_mode;
fs 2016/05/19 11:05:36 DVLOG_IF(3, m_mode != Mode::ExperimentOff) << ...
Srirama 2016/05/19 12:14:53 Done.
44 m_mode);
45 }
46 } 44 }
47 45
48 AutoplayExperimentHelper::~AutoplayExperimentHelper() 46 AutoplayExperimentHelper::~AutoplayExperimentHelper()
49 { 47 {
50 } 48 }
51 49
52 void AutoplayExperimentHelper::dispose() 50 void AutoplayExperimentHelper::dispose()
53 { 51 {
54 // Do any cleanup that requires the client. 52 // Do any cleanup that requires the client.
55 unregisterForPositionUpdatesIfNeeded(); 53 unregisterForPositionUpdatesIfNeeded();
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 if (m_recordedElement) 469 if (m_recordedElement)
472 return; 470 return;
473 471
474 m_recordedElement = true; 472 m_recordedElement = true;
475 recordAutoplayMetric(client().isHTMLVideoElement() 473 recordAutoplayMetric(client().isHTMLVideoElement()
476 ? AnyVideoElement 474 ? AnyVideoElement
477 : AnyAudioElement); 475 : AnyAudioElement);
478 } 476 }
479 477
480 } // namespace blink 478 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698