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

Unified Diff: mandoline/ui/browser/browser.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/tab/frame_connection.h ('k') | mandoline/ui/browser/browser_apptest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mandoline/ui/browser/browser.cc
diff --git a/mandoline/ui/browser/browser.cc b/mandoline/ui/browser/browser.cc
index c6114d6e940129e8747db23e0b528b3e4c0e512c..e315f8bc156fb92d042018c8f1e93c78fcb01467 100644
--- a/mandoline/ui/browser/browser.cc
+++ b/mandoline/ui/browser/browser.cc
@@ -117,7 +117,7 @@ void Browser::OnEmbedForDescendant(mojo::View* view,
if (!frame || !frame->HasAncestor(frame_tree_->root())) {
// TODO(sky): add requestor url so that we can return false if it's not
// an app we expect.
- mojo::ApplicationConnection* connection =
+ scoped_ptr<mojo::ApplicationConnection> connection =
app_->ConnectToApplication(request.Pass());
connection->ConnectToService(client);
return;
@@ -215,7 +215,7 @@ void Browser::ShowOmnibox(mojo::URLRequestPtr request) {
omnibox_->SetBounds(root_->bounds());
}
mojo::ViewManagerClientPtr view_manager_client;
- mojo::ApplicationConnection* connection =
+ scoped_ptr<mojo::ApplicationConnection> connection =
app_->ConnectToApplication(request.Pass());
connection->AddService<ViewEmbedder>(this);
connection->ConnectToService(&view_manager_client);
« no previous file with comments | « mandoline/tab/frame_connection.h ('k') | mandoline/ui/browser/browser_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698