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

Unified Diff: extensions/browser/api/cast_channel/cast_channel_api.cc

Issue 2689673002: Inline base::BinaryValue into base::Value (Closed)
Patch Set: Created 3 years, 10 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 b8fd3b2b64e75a17da811befc06427924d633d79..4c943662f1287d636608bc495d6d6ddbf88908ba 100644
--- a/extensions/browser/api/cast_channel/cast_channel_api.cc
+++ b/extensions/browser/api/cast_channel/cast_channel_api.cc
@@ -11,6 +11,7 @@
#include <memory>
#include <string>
#include <utility>
+#include <vector>
#include "base/json/json_writer.h"
#include "base/lazy_instance.h"
@@ -479,7 +480,8 @@ void CastChannelGetLogsFunction::AsyncWorkStart() {
size_t length = 0;
std::unique_ptr<char[]> out = api_->GetLogger()->GetLogs(&length);
if (out.get()) {
- SetResult(base::MakeUnique<base::BinaryValue>(std::move(out), length));
+ SetResult(base::MakeUnique<base::BinaryValue>(
+ std::vector<char>(out.get(), out.get() + length)));
} else {
SetError("Unable to get logs.");
}

Powered by Google App Engine
This is Rietveld 408576698