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

Unified Diff: chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_connection_manager.cc

Issue 2257113002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
Index: chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_connection_manager.cc
diff --git a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_connection_manager.cc b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_connection_manager.cc
index a11dfb8282b3f9bddc8f90d92b57769810c80d4b..f6433cee0750119084a443321304070e9f748c56 100644
--- a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_connection_manager.cc
+++ b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_connection_manager.cc
@@ -98,7 +98,7 @@ bool EasyUnlockPrivateConnectionManager::SendMessage(
const std::string& payload) {
Connection* connection = GetConnection(extension->id(), connection_id);
if (connection && connection->IsConnected()) {
- connection->SendMessage(base::WrapUnique(new WireMessage(payload)));
+ connection->SendMessage(base::MakeUnique<WireMessage>(payload));
return true;
}
return false;
@@ -163,7 +163,7 @@ void EasyUnlockPrivateConnectionManager::DispatchConnectionEvent(
std::unique_ptr<base::ListValue> args_copy(args->DeepCopy());
int connection_index = 0;
args_copy->Set(connection_index,
- base::WrapUnique(new base::FundamentalValue(connection_id)));
+ base::MakeUnique<base::FundamentalValue>(connection_id));
std::unique_ptr<Event> event(
new Event(histogram_value, event_name, std::move(args_copy)));
EventRouter::Get(browser_context_)

Powered by Google App Engine
This is Rietveld 408576698