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

Unified Diff: mojo/application/public/cpp/application_impl.h

Issue 1195003002: Mandoline: Introduce ApplicationConnection::CloseConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 5 years, 6 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
Index: mojo/application/public/cpp/application_impl.h
diff --git a/mojo/application/public/cpp/application_impl.h b/mojo/application/public/cpp/application_impl.h
index 7036d33dbc6b72beff66800258d101ca20a093db..8ab9aba4525b8210892715c75cb0ea99f56d4f5e 100644
--- a/mojo/application/public/cpp/application_impl.h
+++ b/mojo/application/public/cpp/application_impl.h
@@ -79,10 +79,14 @@ class ApplicationImpl : public Application,
// Requests a new connection to an application. Returns a pointer to the
// connection if the connection is permitted by this application's delegate,
// or nullptr otherwise. Caller does not take ownership. The pointer remains
- // valid until an error occurs on the connection with the Shell, or until the
- // ApplicationImpl is destroyed, whichever occurs first.
+ // valid until an error occurs on the connection with the Shell, until the
+ // ApplicationImpl is destroyed, or until the connection is closed through a
+ // call to ApplicationConnection::CloseConnection.
ApplicationConnection* ConnectToApplication(mojo::URLRequestPtr request);
+ // Closes the |connection|.
+ void CloseConnection(ApplicationConnection* connection);
+
// Connect to application identified by |request->url| and connect to the
// service implementation of the interface identified by |Interface|.
template <typename Interface>
@@ -134,6 +138,7 @@ class ApplicationImpl : public Application,
base::Closure termination_closure_;
AppLifetimeHelper app_lifetime_helper_;
bool quit_requested_;
+ bool in_destructor_;
base::WeakPtrFactory<ApplicationImpl> weak_factory_;
MOJO_DISALLOW_COPY_AND_ASSIGN(ApplicationImpl);

Powered by Google App Engine
This is Rietveld 408576698