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

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

Issue 2409443002: Make GlobalErrorService's ownership model slightly less insane. (Closed)
Patch Set: windows, ownership Created 4 years, 2 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/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);
Nico 2016/10/10 14:03:37 this ctor has only one call, so making this use th
Avi (use Gerrit) 2016/10/10 16:52:36 Done.
Avi (use Gerrit) 2016/10/17 00:19:27 This got past what I was comfortable doing, so no.
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() {

Powered by Google App Engine
This is Rietveld 408576698