1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "mojo/application/public/cpp/application_connection.h"
7 #include "base/logging.h"
11 ApplicationConnection::ApplicationConnection() : connection_closed_(false) {
14 void ApplicationConnection::CloseConnection() {
15 if (connection_closed_
)
18 connection_closed_
= true;
22 ApplicationConnection::~ApplicationConnection() {
23 // If this DCHECK fails then something has tried to delete this object without
24 // calling CloseConnection.
25 DCHECK(connection_closed_
);