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

Unified Diff: chrome/browser/recovery/recovery_install_global_error.cc

Issue 2409443002: Make GlobalErrorService's ownership model slightly less insane. (Closed)
Patch Set: commentary Created 4 years 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/extensions/warning_badge_service.cc ('k') | chrome/browser/safe_browsing/srt_fetcher_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/recovery/recovery_install_global_error.cc
diff --git a/chrome/browser/recovery/recovery_install_global_error.cc b/chrome/browser/recovery/recovery_install_global_error.cc
index 737647cab5e3281df25641d2007e54a0faddc3ad..8e2964a010146741758cd82c6790e6813b7769c7 100644
--- a/chrome/browser/recovery/recovery_install_global_error.cc
+++ b/chrome/browser/recovery/recovery_install_global_error.cc
@@ -23,7 +23,8 @@ RecoveryInstallGlobalError::RecoveryInstallGlobalError(Profile* profile)
: elevation_needed_(false),
profile_(profile),
has_shown_bubble_view_(false) {
- GlobalErrorServiceFactory::GetForProfile(profile_)->AddGlobalError(this);
+ GlobalErrorServiceFactory::GetForProfile(profile_)->AddUnownedGlobalError(
+ this);
PrefService* pref = g_browser_process->local_state();
if (pref->FindPreference(prefs::kRecoveryComponentNeedsElevation)) {
@@ -46,7 +47,8 @@ RecoveryInstallGlobalError::~RecoveryInstallGlobalError() {
}
void RecoveryInstallGlobalError::Shutdown() {
- GlobalErrorServiceFactory::GetForProfile(profile_)->RemoveGlobalError(this);
+ GlobalErrorServiceFactory::GetForProfile(profile_)->RemoveUnownedGlobalError(
+ this);
}
GlobalError::Severity RecoveryInstallGlobalError::GetSeverity() {
« no previous file with comments | « chrome/browser/extensions/warning_badge_service.cc ('k') | chrome/browser/safe_browsing/srt_fetcher_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698