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

Unified Diff: components/view_manager/view_manager_service_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 | « components/view_manager/view_manager_client_apptest.cc ('k') | mandoline/tab/frame_connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/view_manager/view_manager_service_apptest.cc
diff --git a/components/view_manager/view_manager_service_apptest.cc b/components/view_manager/view_manager_service_apptest.cc
index e18c23da2abd96fafb198fc3d3d38118ccc66570..bc3db9b38ae80a7d0d89a6e7421f7c0dbafa34ce 100644
--- a/components/view_manager/view_manager_service_apptest.cc
+++ b/components/view_manager/view_manager_service_apptest.cc
@@ -78,7 +78,7 @@ bool EmbedUrl(mojo::ApplicationImpl* app,
{
mojo::URLRequestPtr request(mojo::URLRequest::New());
request->url = mojo::String::From(url);
- ApplicationConnection* connection =
+ scoped_ptr<ApplicationConnection> connection =
app->ConnectToApplication(request.Pass());
mojo::ViewManagerClientPtr client;
connection->ConnectToService(&client);
@@ -343,7 +343,7 @@ class ViewManagerClientImpl : public mojo::ViewManagerClient,
const OnEmbedForDescendantCallback& callback) override {
tracker()->OnEmbedForDescendant(view);
mojo::ViewManagerClientPtr client;
- ApplicationConnection* connection =
+ scoped_ptr<ApplicationConnection> connection =
app_->ConnectToApplication(request.Pass());
connection->ConnectToService(&client);
callback.Run(client.Pass());
@@ -562,7 +562,7 @@ class ViewManagerServiceAppTest : public mojo::test::ApplicationTestBase,
client_factory_.reset(new ViewManagerClientFactory(application_impl()));
mojo::URLRequestPtr request(mojo::URLRequest::New());
request->url = mojo::String::From("mojo:view_manager");
- ApplicationConnection* vm_connection =
+ scoped_ptr<ApplicationConnection> vm_connection =
application_impl()->ConnectToApplication(request.Pass());
vm_connection->AddService(client_factory_.get());
vm_connection->ConnectToService(&view_manager_root_);
« no previous file with comments | « components/view_manager/view_manager_client_apptest.cc ('k') | mandoline/tab/frame_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698