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

Unified Diff: content/browser/media/media_internals_unittest.cc

Issue 2815303006: Convert MediaLog from being ref counted to owned by WebMediaPlayer. (Closed)
Patch Set: Rebase. Created 3 years, 8 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
« no previous file with comments | « chromecast/media/service/cast_mojo_media_client.cc ('k') | content/renderer/media/render_media_log.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/media_internals_unittest.cc
diff --git a/content/browser/media/media_internals_unittest.cc b/content/browser/media/media_internals_unittest.cc
index f9aa32859925d598a3f24eefbc208903bbc5d6e8..c70623fe9e9e484131bc42cee2dd8d8ae4ccc231 100644
--- a/content/browser/media/media_internals_unittest.cc
+++ b/content/browser/media/media_internals_unittest.cc
@@ -321,6 +321,7 @@ class DirectMediaLog : public media::MediaLog {
explicit DirectMediaLog(int render_process_id)
: render_process_id_(render_process_id),
internals_(content::MediaInternals::GetInstance()) {}
+ ~DirectMediaLog() override {}
void AddEvent(std::unique_ptr<media::MediaLogEvent> event) override {
std::vector<media::MediaLogEvent> events(1, *event);
@@ -328,8 +329,6 @@ class DirectMediaLog : public media::MediaLog {
}
private:
- ~DirectMediaLog() override {}
-
const int render_process_id_;
MediaInternals* const internals_;
@@ -352,7 +351,7 @@ class MediaInternalsWatchTimeTest : public testing::Test,
bool is_mse,
bool is_encrypted) {
wtr_.reset(new media::WatchTimeReporter(
- has_audio, has_video, is_mse, is_encrypted, true, media_log_,
+ has_audio, has_video, is_mse, is_encrypted, true, media_log_.get(),
gfx::Size(800, 600),
base::Bind(&MediaInternalsWatchTimeTest::GetCurrentMediaTime,
base::Unretained(this))));
@@ -388,7 +387,7 @@ class MediaInternalsWatchTimeTest : public testing::Test,
protected:
const int render_process_id_;
MediaInternals* const internals_;
- scoped_refptr<DirectMediaLog> media_log_;
+ std::unique_ptr<DirectMediaLog> media_log_;
std::unique_ptr<base::HistogramTester> histogram_tester_;
std::unique_ptr<media::WatchTimeReporter> wtr_;
const base::flat_set<base::StringPiece> watch_time_keys_;
« no previous file with comments | « chromecast/media/service/cast_mojo_media_client.cc ('k') | content/renderer/media/render_media_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698