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

Unified Diff: chrome/browser/ui/browser_list.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.cc ('k') | chrome/browser/ui/startup/startup_browser_creator_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_list.cc
diff --git a/chrome/browser/ui/browser_list.cc b/chrome/browser/ui/browser_list.cc
index 00d1e5a210bdee46891bc3b5d722c6322bd477e2..183e5b99c84a71a9499bb4a71d3f5b8755b294e2 100644
--- a/chrome/browser/ui/browser_list.cc
+++ b/chrome/browser/ui/browser_list.cc
@@ -55,7 +55,7 @@ void BrowserList::AddBrowser(Browser* browser) {
DCHECK(browser);
GetInstance()->browsers_.push_back(browser);
- g_browser_process->AddRefModule();
+ browser->RegisterKeepAlive();
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_BROWSER_OPENED,
@@ -82,7 +82,7 @@ void BrowserList::RemoveBrowser(Browser* browser) {
FOR_EACH_OBSERVER(chrome::BrowserListObserver, observers_.Get(),
OnBrowserRemoved(browser));
- g_browser_process->ReleaseModule();
+ browser->UnregisterKeepAlive();
// If we're exiting, send out the APP_TERMINATING notification to allow other
// modules to shut themselves down.
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/startup/startup_browser_creator_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698