Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/

BUG=webrtc:5520

Review URL: https://codereview.webrtc.org/1921233002

Cr-Commit-Position: refs/heads/master@{#12511}
diff --git a/webrtc/modules/utility/source/jvm_android.cc b/webrtc/modules/utility/source/jvm_android.cc
index eb37fda..d53d1b5 100644
--- a/webrtc/modules/utility/source/jvm_android.cc
+++ b/webrtc/modules/utility/source/jvm_android.cc
@@ -10,6 +10,8 @@
 
 #include <android/log.h>
 
+#include <memory>
+
 #include "webrtc/modules/utility/include/jvm_android.h"
 
 #include "webrtc/base/checks.h"
@@ -139,7 +141,7 @@
   CHECK_EXCEPTION(jni_) << "Error during UnregisterNatives";
 }
 
-rtc::scoped_ptr<GlobalRef> NativeRegistration::NewObject(
+std::unique_ptr<GlobalRef> NativeRegistration::NewObject(
     const char* name, const char* signature, ...) {
   ALOGD("NativeRegistration::NewObject%s", GetThreadInfo().c_str());
   va_list args;
@@ -149,7 +151,7 @@
                                  args);
   CHECK_EXCEPTION(jni_) << "Error during NewObjectV";
   va_end(args);
-  return rtc::scoped_ptr<GlobalRef>(new GlobalRef(jni_, obj));
+  return std::unique_ptr<GlobalRef>(new GlobalRef(jni_, obj));
 }
 
 // JavaClass implementation.
@@ -181,14 +183,14 @@
   RTC_DCHECK(thread_checker_.CalledOnValidThread());
 }
 
-rtc::scoped_ptr<NativeRegistration> JNIEnvironment::RegisterNatives(
+std::unique_ptr<NativeRegistration> JNIEnvironment::RegisterNatives(
     const char* name, const JNINativeMethod *methods, int num_methods) {
   ALOGD("JNIEnvironment::RegisterNatives(%s)", name);
   RTC_DCHECK(thread_checker_.CalledOnValidThread());
   jclass clazz = LookUpClass(name);
   jni_->RegisterNatives(clazz, methods, num_methods);
   CHECK_EXCEPTION(jni_) << "Error during RegisterNatives";
-  return rtc::scoped_ptr<NativeRegistration>(
+  return std::unique_ptr<NativeRegistration>(
       new NativeRegistration(jni_, clazz));
 }
 
@@ -240,7 +242,7 @@
   DeleteGlobalRef(jni(), context_);
 }
 
-rtc::scoped_ptr<JNIEnvironment> JVM::environment() {
+std::unique_ptr<JNIEnvironment> JVM::environment() {
   ALOGD("JVM::environment%s", GetThreadInfo().c_str());
   // The JNIEnv is used for thread-local storage. For this reason, we cannot
   // share a JNIEnv between threads. If a piece of code has no other way to get
@@ -250,9 +252,9 @@
   JNIEnv* jni = GetEnv(jvm_);
   if (!jni) {
     ALOGE("AttachCurrentThread() has not been called on this thread.");
-    return rtc::scoped_ptr<JNIEnvironment>();
+    return std::unique_ptr<JNIEnvironment>();
   }
-  return rtc::scoped_ptr<JNIEnvironment>(new JNIEnvironment(jni));
+  return std::unique_ptr<JNIEnvironment>(new JNIEnvironment(jni));
 }
 
 JavaClass JVM::GetClass(const char* name) {