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

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

Issue 1254383016: ApplicationConnection lifetime management changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 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 | « mandoline/ui/browser/desktop/desktop_ui.cc ('k') | mojo/application/public/cpp/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/media_apptest.cc
diff --git a/media/mojo/services/media_apptest.cc b/media/mojo/services/media_apptest.cc
index 4d08fbac0b0a5ffca04246e8688a8e55e7f05c7b..958c66299acecf231c03c1b2204cbae54a93e015 100644
--- a/media/mojo/services/media_apptest.cc
+++ b/media/mojo/services/media_apptest.cc
@@ -59,12 +59,11 @@ class MediaAppTest : public mojo::test::ApplicationTestBase {
mojo::URLRequestPtr request = mojo::URLRequest::New();
request->url = "mojo:media";
- mojo::ApplicationConnection* connection =
- application_impl()->ConnectToApplication(request.Pass());
- connection->SetRemoteServiceProviderConnectionErrorHandler(
+ connection_ = application_impl()->ConnectToApplication(request.Pass());
+ connection_->SetRemoteServiceProviderConnectionErrorHandler(
base::Bind(&MediaAppTest::ConnectionClosed, base::Unretained(this)));
- connection->ConnectToService(&service_factory_);
+ connection_->ConnectToService(&service_factory_);
service_factory_->CreateCdm(mojo::GetProxy(&cdm_));
service_factory_->CreateRenderer(mojo::GetProxy(&renderer_));
@@ -122,6 +121,8 @@ class MediaAppTest : public mojo::test::ApplicationTestBase {
StrictMock<MockDemuxerStream> video_demuxer_stream_;
private:
+ scoped_ptr<mojo::ApplicationConnection> connection_;
+
DISALLOW_COPY_AND_ASSIGN(MediaAppTest);
};
« no previous file with comments | « mandoline/ui/browser/desktop/desktop_ui.cc ('k') | mojo/application/public/cpp/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698