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

Unified Diff: chrome/browser/safe_browsing/srt_fetcher_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
Index: chrome/browser/safe_browsing/srt_fetcher_win.cc
diff --git a/chrome/browser/safe_browsing/srt_fetcher_win.cc b/chrome/browser/safe_browsing/srt_fetcher_win.cc
index 6bdb1f17c515d5969e6d5839d11eee6b9855fd3f..9f2a5fde52984e0d30f356dbf806629d4e31369c 100644
--- a/chrome/browser/safe_browsing/srt_fetcher_win.cc
+++ b/chrome/browser/safe_browsing/srt_fetcher_win.cc
@@ -18,6 +18,7 @@
#include "base/debug/leak_annotations.h"
#include "base/files/file_path.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/sparse_histogram.h"
@@ -544,7 +545,7 @@ void DisplaySRTPrompt(const base::FilePath& download_path) {
// Ownership of |global_error| is passed to the service. The error removes
// itself from the service and self-destructs when done.
- global_error_service->AddGlobalError(global_error);
+ global_error_service->AddGlobalError(base::WrapUnique(global_error));
bool show_bubble = true;
PrefService* local_state = g_browser_process->local_state();
« no previous file with comments | « chrome/browser/recovery/recovery_install_global_error.cc ('k') | chrome/browser/safe_browsing/srt_global_error_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698