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

Unified Diff: webrtc/modules/audio_device/android/audio_track_jni.cc

Issue 1914153002: Remove calls to ScopedToUnique and UniqueToScoped (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@base-fix
Patch Set: Created 4 years, 8 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: webrtc/modules/audio_device/android/audio_track_jni.cc
diff --git a/webrtc/modules/audio_device/android/audio_track_jni.cc b/webrtc/modules/audio_device/android/audio_track_jni.cc
index 67837f51fb067229138cc2cd39063a4f62d9938c..fc77e32e23321236e3ce1a5295f8136840008c89 100644
--- a/webrtc/modules/audio_device/android/audio_track_jni.cc
+++ b/webrtc/modules/audio_device/android/audio_track_jni.cc
@@ -69,7 +69,7 @@ int AudioTrackJni::JavaAudioTrack::GetStreamVolume() {
// TODO(henrika): possible extend usage of AudioManager and add it as member.
AudioTrackJni::AudioTrackJni(AudioManager* audio_manager)
- : j_environment_(rtc::ScopedToUnique(JVM::GetInstance()->environment())),
+ : j_environment_(JVM::GetInstance()->environment()),
audio_parameters_(audio_manager->GetPlayoutAudioParameters()),
direct_buffer_address_(nullptr),
direct_buffer_capacity_in_bytes_(0),
@@ -86,14 +86,14 @@ AudioTrackJni::AudioTrackJni(AudioManager* audio_manager)
&webrtc::AudioTrackJni::CacheDirectBufferAddress)},
{"nativeGetPlayoutData", "(IJ)V",
reinterpret_cast<void*>(&webrtc::AudioTrackJni::GetPlayoutData)}};
- j_native_registration_ = rtc::ScopedToUnique(j_environment_->RegisterNatives(
- "org/webrtc/voiceengine/WebRtcAudioTrack",
- native_methods, arraysize(native_methods)));
+ j_native_registration_ = j_environment_->RegisterNatives(
+ "org/webrtc/voiceengine/WebRtcAudioTrack", native_methods,
+ arraysize(native_methods));
j_audio_track_.reset(new JavaAudioTrack(
j_native_registration_.get(),
- rtc::ScopedToUnique(j_native_registration_->NewObject(
+ j_native_registration_->NewObject(
"<init>", "(Landroid/content/Context;J)V",
- JVM::GetInstance()->context(), PointerTojlong(this)))));
+ JVM::GetInstance()->context(), PointerTojlong(this))));
// Detach from this thread since we want to use the checker to verify calls
// from the Java based audio thread.
thread_checker_java_.DetachFromThread();
« no previous file with comments | « webrtc/modules/audio_device/android/audio_record_jni.cc ('k') | webrtc/modules/audio_device/android/build_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698