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

Unified Diff: extensions/renderer/event_bindings.cc

Issue 2252373002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « extensions/common/value_counter.cc ('k') | extensions/renderer/i18n_custom_bindings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/event_bindings.cc
diff --git a/extensions/renderer/event_bindings.cc b/extensions/renderer/event_bindings.cc
index db5fb60f428af90a3ce4ba3edcfee6a77b1a6729..df1de04e8912235560ff186d8f3b7173df02b307 100644
--- a/extensions/renderer/event_bindings.cc
+++ b/extensions/renderer/event_bindings.cc
@@ -126,8 +126,7 @@ bool AddFilter(const std::string& event_name,
FilteredEventListenerCounts::const_iterator counts = all_counts.find(key);
if (counts == all_counts.end()) {
counts =
- all_counts
- .insert(std::make_pair(key, base::WrapUnique(new ValueCounter())))
+ all_counts.insert(std::make_pair(key, base::MakeUnique<ValueCounter>()))
.first;
}
return counts->second->Add(filter);
@@ -347,8 +346,8 @@ void EventBindings::MatchAgainstEventFilter(
std::unique_ptr<EventMatcher> EventBindings::ParseEventMatcher(
std::unique_ptr<base::DictionaryValue> filter) {
- return base::WrapUnique(new EventMatcher(
- std::move(filter), context()->GetRenderFrame()->GetRoutingID()));
+ return base::MakeUnique<EventMatcher>(
+ std::move(filter), context()->GetRenderFrame()->GetRoutingID());
}
void EventBindings::OnInvalidated() {
« no previous file with comments | « extensions/common/value_counter.cc ('k') | extensions/renderer/i18n_custom_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698