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

Unified Diff: media/mojo/services/media_service.cc

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month 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/mojo/services/media_service.h ('k') | media/mojo/services/media_service_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/media_service.cc
diff --git a/media/mojo/services/media_service.cc b/media/mojo/services/media_service.cc
index 63e915ad91aee9f01d8ea623d9d0efccd8dc04af..aa922d5b4a1296d56cc8db944f471de10150cf8d 100644
--- a/media/mojo/services/media_service.cc
+++ b/media/mojo/services/media_service.cc
@@ -17,17 +17,18 @@
namespace media {
// TODO(xhwang): Hook up MediaLog when possible.
-MediaService::MediaService(std::unique_ptr<MojoMediaClient> mojo_media_client,
- const base::Closure& quit_closure)
+MediaService::MediaService(std::unique_ptr<MojoMediaClient> mojo_media_client)
: mojo_media_client_(std::move(mojo_media_client)),
- media_log_(new MediaLog()),
- ref_factory_(quit_closure) {
+ media_log_(new MediaLog()) {
DCHECK(mojo_media_client_);
}
MediaService::~MediaService() {}
void MediaService::OnStart(service_manager::ServiceContext* context) {
+ ref_factory_.reset(new service_manager::ServiceContextRefFactory(
+ base::Bind(&service_manager::ServiceContext::RequestQuit,
+ base::Unretained(context))));
mojo_media_client_->Initialize();
}
@@ -56,7 +57,7 @@ void MediaService::CreateInterfaceFactory(
mojo::MakeStrongBinding(
base::MakeUnique<InterfaceFactoryImpl>(
- std::move(remote_interfaces), media_log_, ref_factory_.CreateRef(),
+ std::move(remote_interfaces), media_log_, ref_factory_->CreateRef(),
mojo_media_client_.get()),
std::move(request));
}
« no previous file with comments | « media/mojo/services/media_service.h ('k') | media/mojo/services/media_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698