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

Unified Diff: trunk/src/media/tools/player_x11/data_source_logger.cc

Issue 421843004: Revert 285479 "Make DataSource::Stop() synchronous." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 5 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 | « trunk/src/media/tools/player_x11/data_source_logger.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/media/tools/player_x11/data_source_logger.cc
===================================================================
--- trunk/src/media/tools/player_x11/data_source_logger.cc (revision 285857)
+++ trunk/src/media/tools/player_x11/data_source_logger.cc (working copy)
@@ -6,6 +6,11 @@
#include "base/logging.h"
#include "media/tools/player_x11/data_source_logger.h"
+static void LogAndRunStopClosure(const base::Closure& closure) {
+ VLOG(1) << "Stop() finished";
+ closure.Run();
+}
+
static void LogAndRunReadCB(
int64 position, int size,
const media::DataSource::ReadCB& read_cb, int result) {
@@ -20,9 +25,9 @@
streaming_(streaming) {
}
-void DataSourceLogger::Stop() {
- VLOG(1) << "Stop()";
- data_source_->Stop();
+void DataSourceLogger::Stop(const base::Closure& closure) {
+ VLOG(1) << "Stop() started";
+ data_source_->Stop(base::Bind(&LogAndRunStopClosure, closure));
}
void DataSourceLogger::Read(
« no previous file with comments | « trunk/src/media/tools/player_x11/data_source_logger.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698