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

Unified Diff: components/history/ios/browser/web_state_top_sites_observer.mm

Issue 2847013003: Switch SupportsUserData uses to use unique_ptr. (Closed)
Patch Set: rev 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
« no previous file with comments | « components/history/ios/browser/web_state_top_sites_observer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/history/ios/browser/web_state_top_sites_observer.mm
diff --git a/components/history/ios/browser/web_state_top_sites_observer.mm b/components/history/ios/browser/web_state_top_sites_observer.mm
index cdddbd9a240dca27a530a50fef4a762e923dd77f..d414a52a8dc90bf77eea7d82fa54c5094bdecfd9 100644
--- a/components/history/ios/browser/web_state_top_sites_observer.mm
+++ b/components/history/ios/browser/web_state_top_sites_observer.mm
@@ -5,6 +5,7 @@
#include "components/history/ios/browser/web_state_top_sites_observer.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "components/history/core/browser/top_sites.h"
#include "ios/web/public/load_committed_details.h"
#include "ios/web/public/navigation_item.h"
@@ -22,8 +23,9 @@ void WebStateTopSitesObserver::CreateForWebState(web::WebState* web_state,
TopSites* top_sites) {
DCHECK(web_state);
if (!FromWebState(web_state)) {
- web_state->SetUserData(UserDataKey(),
- new WebStateTopSitesObserver(web_state, top_sites));
+ web_state->SetUserData(
+ UserDataKey(),
+ base::WrapUnique(new WebStateTopSitesObserver(web_state, top_sites)));
}
}
« no previous file with comments | « components/history/ios/browser/web_state_top_sites_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698