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

Unified Diff: chrome/renderer/extensions/cast_streaming_native_handler.cc

Issue 1551503002: Convert Pass()→std::move() in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/renderer/extensions/cast_streaming_native_handler.cc
diff --git a/chrome/renderer/extensions/cast_streaming_native_handler.cc b/chrome/renderer/extensions/cast_streaming_native_handler.cc
index e2a0dec4847bc666ea71c2d019a14bc306c4b3fa..23ff219654c86eb48896a41f7e47423b95d36ea7 100644
--- a/chrome/renderer/extensions/cast_streaming_native_handler.cc
+++ b/chrome/renderer/extensions/cast_streaming_native_handler.cc
@@ -6,11 +6,11 @@
#include <stddef.h>
#include <stdint.h>
-
#include <algorithm>
#include <functional>
#include <iterator>
#include <string>
+#include <utility>
#include <vector>
#include "base/location.h"
@@ -819,7 +819,7 @@ void CastStreamingNativeHandler::StartCastRtpReceiver(
scoped_ptr<base::Value> options_value(
converter->FromV8Value(args[8], context()->v8_context()));
if (!options_value->IsType(base::Value::TYPE_NULL)) {
- options = base::DictionaryValue::From(options_value.Pass());
+ options = base::DictionaryValue::From(std::move(options_value));
if (!options) {
args.GetIsolate()->ThrowException(v8::Exception::TypeError(
v8::String::NewFromUtf8(args.GetIsolate(), kUnableToConvertArgs)));
@@ -838,7 +838,7 @@ void CastStreamingNativeHandler::StartCastRtpReceiver(
session->Start(
audio_config, video_config, local_endpoint, remote_endpoint,
- options.Pass(), capture_format,
+ std::move(options), capture_format,
base::Bind(&CastStreamingNativeHandler::AddTracksToMediaStream,
weak_factory_.GetWeakPtr(), url, params),
base::Bind(&CastStreamingNativeHandler::CallReceiverErrorCallback,
@@ -864,7 +864,7 @@ void CastStreamingNativeHandler::AddTracksToMediaStream(
scoped_refptr<media::AudioCapturerSource> audio,
scoped_ptr<media::VideoCapturerSource> video) {
content::AddAudioTrackToMediaStream(audio, params, true, true, url);
- content::AddVideoTrackToMediaStream(video.Pass(), true, true, url);
+ content::AddVideoTrackToMediaStream(std::move(video), true, true, url);
}
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698