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

Unified Diff: media/base/android/media_task_runner.cc

Issue 2276343005: Delete MediaCodecPlayer, it's time! (Closed)
Patch Set: Created 4 years, 4 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 | « media/base/android/media_task_runner.h ('k') | media/base/android/video_media_codec_decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_task_runner.cc
diff --git a/media/base/android/media_task_runner.cc b/media/base/android/media_task_runner.cc
deleted file mode 100644
index 8c6d0c63d60ef179156a89171d937ef62f83f402..0000000000000000000000000000000000000000
--- a/media/base/android/media_task_runner.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "media/base/android/media_task_runner.h"
-
-#include "base/command_line.h"
-#include "base/lazy_instance.h"
-#include "base/metrics/field_trial.h"
-#include "base/strings/string_util.h"
-#include "base/threading/thread.h"
-#include "media/base/media_switches.h"
-
-namespace media {
-
-class MediaThread : public base::Thread {
- public:
- MediaThread() : base::Thread("BrowserMediaThread") {
- Start();
- }
-};
-
-// Create media thread
-base::LazyInstance<MediaThread>::Leaky g_media_thread =
- LAZY_INSTANCE_INITIALIZER;
-
-scoped_refptr<base::SingleThreadTaskRunner> GetMediaTaskRunner() {
- return g_media_thread.Pointer()->task_runner();
-}
-
-bool UseMediaThreadForMediaPlayback() {
- const std::string group_name =
- base::FieldTrialList::FindFullName("EnableMediaThreadForMediaPlayback");
-
- // Command line switches take precedence over filed trial groups.
- // The disable switch takes precedence over enable switch.
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableMediaThreadForMediaPlayback)) {
- return false;
- }
-
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableMediaThreadForMediaPlayback)) {
- return true;
- }
-
- DVLOG(1) << __FUNCTION__ << ": group_name:'" << group_name << "'";
-
- return base::StartsWith(group_name, "Enabled", base::CompareCase::SENSITIVE);
-}
-
-} // namespace media
« no previous file with comments | « media/base/android/media_task_runner.h ('k') | media/base/android/video_media_codec_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698