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

Unified Diff: extensions/browser/api/cast_channel/cast_channel_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: extensions/browser/api/cast_channel/cast_channel_api.cc
diff --git a/extensions/browser/api/cast_channel/cast_channel_api.cc b/extensions/browser/api/cast_channel/cast_channel_api.cc
index 7856cbd27dd9184a9019962433315eec40b56388..c016fbfd8f606c443445a75a558af61d2591c862 100644
--- a/extensions/browser/api/cast_channel/cast_channel_api.cc
+++ b/extensions/browser/api/cast_channel/cast_channel_api.cc
@@ -238,7 +238,7 @@ CastSocket* CastChannelAsyncApiFunction::GetSocket(int channel_id) const {
void CastChannelAsyncApiFunction::SetResultFromChannelInfo(
const ChannelInfo& channel_info) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- SetResult(channel_info.ToValue().release());
+ SetResult(channel_info.ToValue());
}
CastChannelOpenFunction::CastChannelOpenFunction()
@@ -480,7 +480,7 @@ void CastChannelGetLogsFunction::AsyncWorkStart() {
size_t length = 0;
std::unique_ptr<char[]> out = api_->GetLogger()->GetLogs(&length);
if (out.get()) {
- SetResult(new base::BinaryValue(std::move(out), length));
+ SetResult(base::MakeUnique<base::BinaryValue>(std::move(out), length));
} else {
SetError("Unable to get logs.");
}

Powered by Google App Engine
This is Rietveld 408576698