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

Unified Diff: chrome/browser/safe_browsing/srt_global_error_win.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/safe_browsing/srt_fetcher_win.cc ('k') | chrome/browser/sync/sync_global_error.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/srt_global_error_win.cc
diff --git a/chrome/browser/safe_browsing/srt_global_error_win.cc b/chrome/browser/safe_browsing/srt_global_error_win.cc
index a5f6b2df989c215f0a5e756b5301ceebec653a84..5172781e036f46ea58d6da16706e6fc54272944c 100644
--- a/chrome/browser/safe_browsing/srt_global_error_win.cc
+++ b/chrome/browser/safe_browsing/srt_global_error_win.cc
@@ -221,8 +221,8 @@ void SRTGlobalError::MaybeExecuteSRT() {
return;
}
// At this point, this object owns itself, since ownership has been taken back
- // from the global_error_service_ in the call to RemoveGlobalError. This means
- // that it is safe to use base::Unretained here.
+ // from the global_error_service_ in the call to OnUserInteractionStarted.
+ // This means that it is safe to use base::Unretained here.
BrowserThread::PostBlockingPoolTask(
FROM_HERE,
base::Bind(
@@ -262,7 +262,7 @@ void SRTGlobalError::OnUserinteractionStarted(
RecordSRTPromptHistogram(histogram_value);
interacted_ = true;
if (global_error_service_) {
- global_error_service_->RemoveGlobalError(this);
+ global_error_service_->RemoveGlobalError(this).release();
global_error_service_ = nullptr;
}
}
« no previous file with comments | « chrome/browser/safe_browsing/srt_fetcher_win.cc ('k') | chrome/browser/sync/sync_global_error.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698