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

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

Issue 1991083002: Remove ExtensionFunction::SetResult(T*) overload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU Created 4 years, 7 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_api.cc
diff --git a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc
index fbab6845f47e605a55c2b2a2e083d520b76d5248..37a0da2a9627fb40fd1fff0369b9d1b321db6c67 100644
--- a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc
+++ b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc
@@ -359,7 +359,7 @@ bool EasyUnlockPrivateGetStringsFunction::RunSync() {
l10n_util::GetStringUTF16(
IDS_EASY_UNLOCK_SETUP_ERROR_CONNECTING_TO_PHONE));
- SetResult(strings.release());
+ SetResult(std::move(strings));
return true;
}
@@ -706,7 +706,8 @@ bool EasyUnlockPrivateGetRemoteDevicesFunction::RunAsync() {
Profile* profile = Profile::FromBrowserContext(browser_context());
const base::ListValue* devices =
EasyUnlockService::Get(profile)->GetRemoteDevices();
- SetResult(devices ? devices->DeepCopy() : new base::ListValue());
+ SetResult(devices ? devices->CreateDeepCopy()
+ : base::MakeUnique<base::ListValue>());
SendResponse(true);
}

Powered by Google App Engine
This is Rietveld 408576698