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

Unified Diff: chrome/browser/ui/views/auto_keep_alive.h

Issue 1708343002: Add ScopedKeepAlive to c/b/lifetime (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use singleton instead of browserprocess Created 4 years, 10 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: chrome/browser/ui/views/auto_keep_alive.h
diff --git a/chrome/browser/ui/views/auto_keep_alive.h b/chrome/browser/ui/views/auto_keep_alive.h
index a9eee78e4b27245f60f34ef79524d4a395f4c521..9ca956d7b249b6d2e7cc914ba631366c6ba309e2 100644
--- a/chrome/browser/ui/views/auto_keep_alive.h
+++ b/chrome/browser/ui/views/auto_keep_alive.h
@@ -5,19 +5,13 @@
#ifndef CHROME_BROWSER_UI_VIEWS_AUTO_KEEP_ALIVE_H_
#define CHROME_BROWSER_UI_VIEWS_AUTO_KEEP_ALIVE_H_
-#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
#include "ui/gfx/native_widget_types.h"
-// Class to scoped decrement keep alive count.
-class AutoKeepAlive {
- public:
- explicit AutoKeepAlive(gfx::NativeWindow window);
- ~AutoKeepAlive();
+class ScopedKeepAlive;
- private:
- bool keep_alive_available_;
-
- DISALLOW_COPY_AND_ASSIGN(AutoKeepAlive);
-};
+// Returns a keep alive object for the caller to take ownership of.
+// On ASH environments, will return a null pointer.
Bernhard Bauer 2016/02/19 17:39:28 Nit: "Ash" (only the first letter is capitalized).
dgn 2016/02/19 18:04:28 Done.
+scoped_ptr<ScopedKeepAlive> AutoKeepAlive(gfx::NativeWindow window);
#endif // CHROME_BROWSER_UI_VIEWS_AUTO_KEEP_ALIVE_H_

Powered by Google App Engine
This is Rietveld 408576698