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

Unified Diff: mojo/shell/keep_alive.h

Issue 491443005: Get rid of KeepAlive. Quit shell when all urls run directly by Context are closed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 6 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
Index: mojo/shell/keep_alive.h
diff --git a/mojo/shell/keep_alive.h b/mojo/shell/keep_alive.h
deleted file mode 100644
index d9b61275ca8ecf6e19bd61626845dfcb056648aa..0000000000000000000000000000000000000000
--- a/mojo/shell/keep_alive.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_SHELL_KEEP_ALIVE_H_
-#define MOJO_SHELL_KEEP_ALIVE_H_
-
-#include "base/basictypes.h"
-
-namespace mojo {
-namespace shell {
-
-class Context;
-class KeepAlive;
-
-class KeepAliveCounter {
- public:
- KeepAliveCounter() : count_(0) {
- }
- private:
- friend class KeepAlive;
- int count_;
-};
-
-// Instantiate this class to extend the lifetime of the thread associated
-// with |context| (i.e., the shell's UI thread). Must only be used from
-// the shell's UI thread.
-class KeepAlive {
- public:
- explicit KeepAlive(Context* context);
- ~KeepAlive();
-
- private:
- static void MaybeQuit(Context* context);
-
- Context* context_;
-
- DISALLOW_COPY_AND_ASSIGN(KeepAlive);
-};
-
-} // namespace shell
-} // namespace mojo
-
-#endif // MOJO_SHELL_KEEP_ALIVE_H_

Powered by Google App Engine
This is Rietveld 408576698