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

Unified Diff: chrome/browser/ui/browser.cc

Issue 1803143002: Replace BrowserProces::AddRefModule/RemoveModule by ScopedKeepAlive (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments 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/ui/browser.h ('k') | chrome/browser/ui/browser_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 1595e868001d614ce36dc7d5dc0e6cc947427210..62b1dd19b09a3bc5fc0ad13c198366dc2f57968e 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -62,6 +62,8 @@
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/lifetime/keep_alive_registry.h"
+#include "chrome/browser/lifetime/keep_alive_types.h"
+#include "chrome/browser/lifetime/scoped_keep_alive.h"
#include "chrome/browser/memory/tab_manager_web_contents_data.h"
#include "chrome/browser/notifications/notification_ui_manager.h"
#include "chrome/browser/pepper_broker_infobar_delegate.h"
@@ -945,6 +947,14 @@ void Browser::ShowModalSyncConfirmationWindow() {
signin_view_controller_.ShowModalSyncConfirmationDialog(this);
}
+void Browser::RegisterKeepAlive() {
+ keep_alive_.reset(new ScopedKeepAlive(KeepAliveOrigin::BROWSER,
+ KeepAliveRestartOption::DISABLED));
+}
+void Browser::UnregisterKeepAlive() {
+ keep_alive_.reset();
+}
+
///////////////////////////////////////////////////////////////////////////////
// Browser, PageNavigator implementation:
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698