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

Unified Diff: content/browser/media/media_internals_proxy.cc

Issue 2086763002: Don't use deprecated ListValue::Append(Value*) overload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: content/browser/media/media_internals_proxy.cc
diff --git a/content/browser/media/media_internals_proxy.cc b/content/browser/media/media_internals_proxy.cc
index 1f8b99f538b4e3b09b3346dfff37a35e9df086a8..adf773bc375eadf52936fb2d6a3e834b41346e3d 100644
--- a/content/browser/media/media_internals_proxy.cc
+++ b/content/browser/media/media_internals_proxy.cc
@@ -7,6 +7,7 @@
#include <stddef.h>
Dan Beam 2016/06/21 00:54:12 #include <utility>
dcheng 2016/06/21 18:56:02 Done.
#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/location.h"
#include "base/macros.h"
#include "base/single_thread_task_runner.h"
@@ -98,7 +99,7 @@ void MediaInternalsProxy::OnAddEntry(const net::NetLog::Entry& entry) {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&MediaInternalsProxy::AddNetEventOnUIThread, this,
- entry.ToValue()));
+ base::Passed(entry.ToValue())));
}
MediaInternalsProxy::~MediaInternalsProxy() {}
@@ -153,7 +154,8 @@ void MediaInternalsProxy::UpdateUIOnUIThread(const base::string16& update) {
handler_->OnUpdate(update);
}
-void MediaInternalsProxy::AddNetEventOnUIThread(base::Value* entry) {
+void MediaInternalsProxy::AddNetEventOnUIThread(
+ std::unique_ptr<base::Value> entry) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Send the updates to the page in kMediaInternalsProxyEventDelayMilliseconds
@@ -166,7 +168,7 @@ void MediaInternalsProxy::AddNetEventOnUIThread(base::Value* entry) {
base::TimeDelta::FromMilliseconds(
kMediaInternalsProxyEventDelayMilliseconds));
}
- pending_net_updates_->Append(entry);
+ pending_net_updates_->Append(std::move(entry));
}
void MediaInternalsProxy::SendNetEventsOnUIThread() {

Powered by Google App Engine
This is Rietveld 408576698