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

Unified Diff: chrome/browser/browser_process_platform_part_chromeos.h

Issue 1778873002: Replace Increment/DecrementKeepAliveCount by ScopedKeepAlives (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@KAObserver
Patch Set: replace the commented dcheck by a dlog Created 4 years, 9 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 | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/browser_process_platform_part_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_process_platform_part_chromeos.h
diff --git a/chrome/browser/browser_process_platform_part_chromeos.h b/chrome/browser/browser_process_platform_part_chromeos.h
index 11eed8eff3aac2e2e938f4ebb9951f49c1c260b4..d5d3887ab23fe8b71efecbfc0ab3c0aed550a29f 100644
--- a/chrome/browser/browser_process_platform_part_chromeos.h
+++ b/chrome/browser/browser_process_platform_part_chromeos.h
@@ -40,6 +40,7 @@ class SessionManager;
}
class Profile;
+class ScopedKeepAlive;
class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase,
public base::NonThreadSafe {
@@ -70,6 +71,11 @@ class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase,
// out-of-box or login.
virtual session_manager::SessionManager* SessionManager();
+ // Used to register a KeepAlive when Ash is initialized, and release it
+ // when until Chrome starts exiting. Ensure we stay running the whole time.
+ void RegisterKeepAlive();
+ void UnregisterKeepAlive();
+
// Returns the ProfileHelper instance that is used to identify
// users and their profiles in Chrome OS multi user session.
chromeos::ProfileHelper* profile_helper();
@@ -120,6 +126,8 @@ class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase,
scoped_ptr<chromeos::system::SystemClock> system_clock_;
+ scoped_ptr<ScopedKeepAlive> keep_alive_;
+
DISALLOW_COPY_AND_ASSIGN(BrowserProcessPlatformPart);
};
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/browser_process_platform_part_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698