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

Unified Diff: components/safe_browsing/base_ui_manager.cc

Issue 2842833003: Update SupportsUserData uses with unique_ptr. (Closed)
Patch Set: rebase Created 3 years, 8 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: components/safe_browsing/base_ui_manager.cc
diff --git a/components/safe_browsing/base_ui_manager.cc b/components/safe_browsing/base_ui_manager.cc
index f951896d15ed7a225595073545f47c685472d31c..cd8940d9e1c7ecd423f80e290a6704881c332224 100644
--- a/components/safe_browsing/base_ui_manager.cc
+++ b/components/safe_browsing/base_ui_manager.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/i18n/rtl.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/supports_user_data.h"
#include "components/safe_browsing/base_blocking_page.h"
@@ -86,7 +87,7 @@ WhitelistUrlSet* GetOrCreateWhitelist(WebContents* web_contents) {
static_cast<WhitelistUrlSet*>(web_contents->GetUserData(kWhitelistKey));
if (!site_list) {
site_list = new WhitelistUrlSet;
- web_contents->SetUserData(kWhitelistKey, site_list);
+ web_contents->SetUserData(kWhitelistKey, base::WrapUnique(site_list));
}
return site_list;
}
« no previous file with comments | « components/renderer_context_menu/context_menu_delegate.cc ('k') | components/sessions/content/content_live_tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698