Use base/scoped_ptr.h; system_wrappers/interface/scoped_ptr.h is going away

BUG=
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/36229004

Cr-Commit-Position: refs/heads/master@{#8517}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8517 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/common_audio/audio_converter.cc b/webrtc/common_audio/audio_converter.cc
index 05262f8..7e043b7 100644
--- a/webrtc/common_audio/audio_converter.cc
+++ b/webrtc/common_audio/audio_converter.cc
@@ -135,11 +135,11 @@
   ScopedVector<ChannelBuffer<float>> buffers_;
 };
 
-scoped_ptr<AudioConverter> AudioConverter::Create(int src_channels,
-                                                  int src_frames,
-                                                  int dst_channels,
-                                                  int dst_frames) {
-  scoped_ptr<AudioConverter> sp;
+rtc::scoped_ptr<AudioConverter> AudioConverter::Create(int src_channels,
+                                                       int src_frames,
+                                                       int dst_channels,
+                                                       int dst_frames) {
+  rtc::scoped_ptr<AudioConverter> sp;
   if (src_channels > dst_channels) {
     if (src_frames != dst_frames) {
       ScopedVector<AudioConverter> converters;
diff --git a/webrtc/common_audio/audio_converter.h b/webrtc/common_audio/audio_converter.h
index 3873827..772872f 100644
--- a/webrtc/common_audio/audio_converter.h
+++ b/webrtc/common_audio/audio_converter.h
@@ -12,7 +12,7 @@
 #define WEBRTC_COMMON_AUDIO_AUDIO_CONVERTER_H_
 
 #include "webrtc/base/constructormagic.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -26,8 +26,10 @@
  public:
   // Returns a new AudioConverter, which will use the supplied format for its
   // lifetime. Caller is responsible for the memory.
-  static scoped_ptr<AudioConverter> Create(int src_channels, int src_frames,
-                                           int dst_channels, int dst_frames);
+  static rtc::scoped_ptr<AudioConverter> Create(int src_channels,
+                                                int src_frames,
+                                                int dst_channels,
+                                                int dst_frames);
   virtual ~AudioConverter() {};
 
   // Convert |src|, containing |src_size| samples, to |dst|, having a sample
diff --git a/webrtc/common_audio/audio_converter_unittest.cc b/webrtc/common_audio/audio_converter_unittest.cc
index 03c0d47..6da339f 100644
--- a/webrtc/common_audio/audio_converter_unittest.cc
+++ b/webrtc/common_audio/audio_converter_unittest.cc
@@ -13,14 +13,14 @@
 #include <vector>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/audio_converter.h"
 #include "webrtc/common_audio/channel_buffer.h"
 #include "webrtc/common_audio/resampler/push_sinc_resampler.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
-typedef scoped_ptr<ChannelBuffer<float>> ScopedBuffer;
+typedef rtc::scoped_ptr<ChannelBuffer<float>> ScopedBuffer;
 
 // Sets the signal value to increase by |data| with every sample.
 ScopedBuffer CreateBuffer(const std::vector<float>& data, int frames) {
@@ -128,9 +128,8 @@
   printf("(%d, %d Hz) -> (%d, %d Hz) ",  // SNR reported on the same line later.
       src_channels, src_sample_rate_hz, dst_channels, dst_sample_rate_hz);
 
-  scoped_ptr<AudioConverter> converter =
-      AudioConverter::Create(src_channels, src_frames, dst_channels,
-                             dst_frames);
+  rtc::scoped_ptr<AudioConverter> converter = AudioConverter::Create(
+      src_channels, src_frames, dst_channels, dst_frames);
   converter->Convert(src_buffer->channels(), src_buffer->size(),
                      dst_buffer->channels(), dst_buffer->size());
 
diff --git a/webrtc/common_audio/audio_ring_buffer_unittest.cc b/webrtc/common_audio/audio_ring_buffer_unittest.cc
index 2d7d2c7..cc1922c 100644
--- a/webrtc/common_audio/audio_ring_buffer_unittest.cc
+++ b/webrtc/common_audio/audio_ring_buffer_unittest.cc
@@ -27,7 +27,7 @@
   const size_t num_channels = input.num_channels();
   const size_t total_frames = input.num_frames();
   AudioRingBuffer buf(num_channels, buffer_frames);
-  scoped_ptr<float*[]> slice(new float*[num_channels]);
+  rtc::scoped_ptr<float* []> slice(new float* [num_channels]);
 
   size_t input_pos = 0;
   size_t output_pos = 0;
diff --git a/webrtc/common_audio/blocker.h b/webrtc/common_audio/blocker.h
index 3c4cf81..de439cd 100644
--- a/webrtc/common_audio/blocker.h
+++ b/webrtc/common_audio/blocker.h
@@ -11,9 +11,9 @@
 #ifndef WEBRTC_INTERNAL_BEAMFORMER_BLOCKER_H_
 #define WEBRTC_INTERNAL_BEAMFORMER_BLOCKER_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/audio_ring_buffer.h"
 #include "webrtc/common_audio/channel_buffer.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -106,7 +106,7 @@
   // Space for the output block (can't wrap because of overlap/add).
   ChannelBuffer<float> output_block_;
 
-  scoped_ptr<float[]> window_;
+  rtc::scoped_ptr<float[]> window_;
 
   // The amount of frames between the start of contiguous blocks. For example,
   // |shift_amount_| = |block_size_| / 2 for a Hann window.
diff --git a/webrtc/common_audio/blocker_unittest.cc b/webrtc/common_audio/blocker_unittest.cc
index bff447f..6b97ed9 100644
--- a/webrtc/common_audio/blocker_unittest.cc
+++ b/webrtc/common_audio/blocker_unittest.cc
@@ -306,7 +306,7 @@
   CopyBlockerCallback callback;
 
   for (size_t i = 0; i < (sizeof(kChunkSize) / sizeof(*kChunkSize)); ++i) {
-    scoped_ptr<float[]> window(new float[kBlockSize[i]]);
+    rtc::scoped_ptr<float[]> window(new float[kBlockSize[i]]);
     for (int j = 0; j < kBlockSize[i]; ++j) {
       window[j] = 1.f;
     }
diff --git a/webrtc/common_audio/channel_buffer.h b/webrtc/common_audio/channel_buffer.h
index a5c4870..323c5e9 100644
--- a/webrtc/common_audio/channel_buffer.h
+++ b/webrtc/common_audio/channel_buffer.h
@@ -14,6 +14,7 @@
 #include <string.h>
 
 #include "webrtc/base/checks.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/include/audio_util.h"
 #include "webrtc/test/testsupport/gtest_prod_util.h"
 
@@ -126,9 +127,9 @@
   }
 
  private:
-  scoped_ptr<T[]> data_;
-  scoped_ptr<T*[]> channels_;
-  scoped_ptr<T*[]> bands_;
+  rtc::scoped_ptr<T[]> data_;
+  rtc::scoped_ptr<T* []> channels_;
+  rtc::scoped_ptr<T* []> bands_;
   const int num_frames_;
   const int num_frames_per_band_;
   const int num_channels_;
diff --git a/webrtc/common_audio/fir_filter.cc b/webrtc/common_audio/fir_filter.cc
index 3be9148..f1a3baa 100644
--- a/webrtc/common_audio/fir_filter.cc
+++ b/webrtc/common_audio/fir_filter.cc
@@ -13,10 +13,10 @@
 #include <assert.h>
 #include <string.h>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/fir_filter_neon.h"
 #include "webrtc/common_audio/fir_filter_sse.h"
 #include "webrtc/system_wrappers/interface/cpu_features_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -30,8 +30,8 @@
  private:
   size_t coefficients_length_;
   size_t state_length_;
-  scoped_ptr<float[]> coefficients_;
-  scoped_ptr<float[]> state_;
+  rtc::scoped_ptr<float[]> coefficients_;
+  rtc::scoped_ptr<float[]> state_;
 };
 
 FIRFilter* FIRFilter::Create(const float* coefficients,
diff --git a/webrtc/common_audio/fir_filter_neon.h b/webrtc/common_audio/fir_filter_neon.h
index df41c92..9301109 100644
--- a/webrtc/common_audio/fir_filter_neon.h
+++ b/webrtc/common_audio/fir_filter_neon.h
@@ -11,9 +11,9 @@
 #ifndef WEBRTC_COMMON_AUDIO_FIR_FILTER_NEON_H_
 #define WEBRTC_COMMON_AUDIO_FIR_FILTER_NEON_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/fir_filter.h"
 #include "webrtc/system_wrappers/interface/aligned_malloc.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -28,8 +28,8 @@
  private:
   size_t coefficients_length_;
   size_t state_length_;
-  scoped_ptr<float[], AlignedFreeDeleter> coefficients_;
-  scoped_ptr<float[], AlignedFreeDeleter> state_;
+  rtc::scoped_ptr<float[], AlignedFreeDeleter> coefficients_;
+  rtc::scoped_ptr<float[], AlignedFreeDeleter> state_;
 };
 
 }  // namespace webrtc
diff --git a/webrtc/common_audio/fir_filter_sse.h b/webrtc/common_audio/fir_filter_sse.h
index a0b9164..4e67b04 100644
--- a/webrtc/common_audio/fir_filter_sse.h
+++ b/webrtc/common_audio/fir_filter_sse.h
@@ -11,9 +11,9 @@
 #ifndef WEBRTC_COMMON_AUDIO_FIR_FILTER_SSE_H_
 #define WEBRTC_COMMON_AUDIO_FIR_FILTER_SSE_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/fir_filter.h"
 #include "webrtc/system_wrappers/interface/aligned_malloc.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -28,8 +28,8 @@
  private:
   size_t coefficients_length_;
   size_t state_length_;
-  scoped_ptr<float[], AlignedFreeDeleter> coefficients_;
-  scoped_ptr<float[], AlignedFreeDeleter> state_;
+  rtc::scoped_ptr<float[], AlignedFreeDeleter> coefficients_;
+  rtc::scoped_ptr<float[], AlignedFreeDeleter> state_;
 };
 
 }  // namespace webrtc
diff --git a/webrtc/common_audio/fir_filter_unittest.cc b/webrtc/common_audio/fir_filter_unittest.cc
index 01c7161..1bd01be 100644
--- a/webrtc/common_audio/fir_filter_unittest.cc
+++ b/webrtc/common_audio/fir_filter_unittest.cc
@@ -13,7 +13,7 @@
 #include <string.h>
 
 #include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -37,8 +37,8 @@
 TEST(FIRFilterTest, FilterAsIdentity) {
   const float kCoefficients[] = {1.f, 0.f, 0.f, 0.f, 0.f};
   float output[kInputLength];
-  scoped_ptr<FIRFilter> filter(FIRFilter::Create(
-      kCoefficients, kCoefficientsLength, kInputLength));
+  rtc::scoped_ptr<FIRFilter> filter(
+      FIRFilter::Create(kCoefficients, kCoefficientsLength, kInputLength));
   filter->Filter(kInput, kInputLength, output);
 
   VerifyOutput(kInput, output, kInputLength);
@@ -47,8 +47,8 @@
 TEST(FIRFilterTest, FilterUsedAsScalarMultiplication) {
   const float kCoefficients[] = {5.f, 0.f, 0.f, 0.f, 0.f};
   float output[kInputLength];
-  scoped_ptr<FIRFilter> filter(FIRFilter::Create(
-      kCoefficients, kCoefficientsLength, kInputLength));
+  rtc::scoped_ptr<FIRFilter> filter(
+      FIRFilter::Create(kCoefficients, kCoefficientsLength, kInputLength));
   filter->Filter(kInput, kInputLength, output);
 
   EXPECT_FLOAT_EQ(5.f, output[0]);
@@ -60,8 +60,8 @@
 TEST(FIRFilterTest, FilterUsedAsInputShifting) {
   const float kCoefficients[] = {0.f, 0.f, 0.f, 0.f, 1.f};
   float output[kInputLength];
-  scoped_ptr<FIRFilter> filter(FIRFilter::Create(
-      kCoefficients, kCoefficientsLength, kInputLength));
+  rtc::scoped_ptr<FIRFilter> filter(
+      FIRFilter::Create(kCoefficients, kCoefficientsLength, kInputLength));
   filter->Filter(kInput, kInputLength, output);
 
   EXPECT_FLOAT_EQ(0.f, output[0]);
@@ -73,8 +73,8 @@
 
 TEST(FIRFilterTest, FilterUsedAsArbitraryWeighting) {
   float output[kInputLength];
-  scoped_ptr<FIRFilter> filter(FIRFilter::Create(
-      kCoefficients, kCoefficientsLength, kInputLength));
+  rtc::scoped_ptr<FIRFilter> filter(
+      FIRFilter::Create(kCoefficients, kCoefficientsLength, kInputLength));
   filter->Filter(kInput, kInputLength, output);
 
   EXPECT_FLOAT_EQ(0.2f, output[0]);
@@ -86,7 +86,7 @@
 
 TEST(FIRFilterTest, FilterInLengthLesserOrEqualToCoefficientsLength) {
   float output[kInputLength];
-  scoped_ptr<FIRFilter> filter(
+  rtc::scoped_ptr<FIRFilter> filter(
       FIRFilter::Create(kCoefficients, kCoefficientsLength, 2));
   filter->Filter(kInput, 2, output);
 
@@ -103,7 +103,7 @@
 
 TEST(FIRFilterTest, MultipleFilterCalls) {
   float output[kInputLength];
-  scoped_ptr<FIRFilter> filter(
+  rtc::scoped_ptr<FIRFilter> filter(
       FIRFilter::Create(kCoefficients, kCoefficientsLength, 3));
   filter->Filter(kInput, 2, output);
   EXPECT_FLOAT_EQ(0.2f, output[0]);
@@ -134,8 +134,8 @@
 
 TEST(FIRFilterTest, VerifySampleBasedVsBlockBasedFiltering) {
   float output_block_based[kInputLength];
-  scoped_ptr<FIRFilter> filter(FIRFilter::Create(
-      kCoefficients, kCoefficientsLength, kInputLength));
+  rtc::scoped_ptr<FIRFilter> filter(
+      FIRFilter::Create(kCoefficients, kCoefficientsLength, kInputLength));
   filter->Filter(kInput, kInputLength, output_block_based);
 
   float output_sample_based[kInputLength];
@@ -159,7 +159,7 @@
       sizeof(kConstantInput[0]);
 
   float output[kConstantInputLength];
-  scoped_ptr<FIRFilter> filter(FIRFilter::Create(
+  rtc::scoped_ptr<FIRFilter> filter(FIRFilter::Create(
       kCoefficients, kCoefficientsLength, kConstantInputLength));
   filter->Filter(kConstantInput, kConstantInputLength, output);
   EXPECT_FLOAT_EQ(1.f, output[0]);
@@ -178,7 +178,7 @@
                                         sizeof(kHighFrequencyInput[0]);
 
   float output[kHighFrequencyInputLength];
-  scoped_ptr<FIRFilter> filter(FIRFilter::Create(
+  rtc::scoped_ptr<FIRFilter> filter(FIRFilter::Create(
       kCoefficients, kCoefficientsLength, kHighFrequencyInputLength));
   filter->Filter(kHighFrequencyInput, kHighFrequencyInputLength, output);
   EXPECT_FLOAT_EQ(-1.f, output[0]);
@@ -190,7 +190,7 @@
 TEST(FIRFilterTest, SameOutputWhenSwapedCoefficientsAndInput) {
   float output[kCoefficientsLength];
   float output_swaped[kCoefficientsLength];
-  scoped_ptr<FIRFilter> filter(FIRFilter::Create(
+  rtc::scoped_ptr<FIRFilter> filter(FIRFilter::Create(
       kCoefficients, kCoefficientsLength, kCoefficientsLength));
   // Use kCoefficientsLength for in_length to get same-length outputs.
   filter->Filter(kInput, kCoefficientsLength, output);
diff --git a/webrtc/common_audio/include/audio_util.h b/webrtc/common_audio/include/audio_util.h
index 767b21c..8262649 100644
--- a/webrtc/common_audio/include/audio_util.h
+++ b/webrtc/common_audio/include/audio_util.h
@@ -13,7 +13,7 @@
 
 #include <limits>
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
diff --git a/webrtc/common_audio/lapped_transform.h b/webrtc/common_audio/lapped_transform.h
index 330886a..052e8ac 100644
--- a/webrtc/common_audio/lapped_transform.h
+++ b/webrtc/common_audio/lapped_transform.h
@@ -14,10 +14,10 @@
 #include <complex>
 
 #include "webrtc/base/checks.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/blocker.h"
 #include "webrtc/common_audio/real_fourier.h"
 #include "webrtc/system_wrappers/interface/aligned_array.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -86,7 +86,7 @@
   int block_length_;
   int chunk_length_;
   Callback* block_processor_;
-  scoped_ptr<Blocker> blocker_;
+  rtc::scoped_ptr<Blocker> blocker_;
 
   RealFourier fft_;
   int cplx_length_;
diff --git a/webrtc/common_audio/real_fourier.h b/webrtc/common_audio/real_fourier.h
index 0ca962c..eda3ba3 100644
--- a/webrtc/common_audio/real_fourier.h
+++ b/webrtc/common_audio/real_fourier.h
@@ -13,8 +13,8 @@
 
 #include <complex>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/aligned_malloc.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 // Uniform interface class for the real DFT and its inverse, for power-of-2
 // input lengths. Also contains helper functions for buffer allocation, taking
@@ -25,8 +25,9 @@
 class RealFourier {
  public:
   // Shorthand typenames for the scopers used by the buffer allocation helpers.
-  typedef scoped_ptr<float[], AlignedFreeDeleter> fft_real_scoper;
-  typedef scoped_ptr<std::complex<float>[], AlignedFreeDeleter> fft_cplx_scoper;
+  typedef rtc::scoped_ptr<float[], AlignedFreeDeleter> fft_real_scoper;
+  typedef rtc::scoped_ptr<std::complex<float>[], AlignedFreeDeleter>
+      fft_cplx_scoper;
 
   // The maximum input order supported by this implementation.
   static const int kMaxFftOrder;
diff --git a/webrtc/common_audio/resampler/include/push_resampler.h b/webrtc/common_audio/resampler/include/push_resampler.h
index f04dc0f..a4e57e4 100644
--- a/webrtc/common_audio/resampler/include/push_resampler.h
+++ b/webrtc/common_audio/resampler/include/push_resampler.h
@@ -11,7 +11,7 @@
 #ifndef WEBRTC_COMMON_AUDIO_RESAMPLER_INCLUDE_PUSH_RESAMPLER_H_
 #define WEBRTC_COMMON_AUDIO_RESAMPLER_INCLUDE_PUSH_RESAMPLER_H_
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -36,15 +36,15 @@
   int Resample(const T* src, int src_length, T* dst, int dst_capacity);
 
  private:
-  scoped_ptr<PushSincResampler> sinc_resampler_;
-  scoped_ptr<PushSincResampler> sinc_resampler_right_;
+  rtc::scoped_ptr<PushSincResampler> sinc_resampler_;
+  rtc::scoped_ptr<PushSincResampler> sinc_resampler_right_;
   int src_sample_rate_hz_;
   int dst_sample_rate_hz_;
   int num_channels_;
-  scoped_ptr<T[]> src_left_;
-  scoped_ptr<T[]> src_right_;
-  scoped_ptr<T[]> dst_left_;
-  scoped_ptr<T[]> dst_right_;
+  rtc::scoped_ptr<T[]> src_left_;
+  rtc::scoped_ptr<T[]> src_right_;
+  rtc::scoped_ptr<T[]> dst_left_;
+  rtc::scoped_ptr<T[]> dst_right_;
 };
 
 }  // namespace webrtc
diff --git a/webrtc/common_audio/resampler/push_sinc_resampler.h b/webrtc/common_audio/resampler/push_sinc_resampler.h
index e68a2fb..c48ec71 100644
--- a/webrtc/common_audio/resampler/push_sinc_resampler.h
+++ b/webrtc/common_audio/resampler/push_sinc_resampler.h
@@ -12,8 +12,8 @@
 #define WEBRTC_COMMON_AUDIO_RESAMPLER_PUSH_SINC_RESAMPLER_H_
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/resampler/sinc_resampler.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -56,8 +56,8 @@
   friend class PushSincResamplerTest;
   SincResampler* get_resampler_for_testing() { return resampler_.get(); }
 
-  scoped_ptr<SincResampler> resampler_;
-  scoped_ptr<float[]> float_buffer_;
+  rtc::scoped_ptr<SincResampler> resampler_;
+  rtc::scoped_ptr<float[]> float_buffer_;
   const float* source_ptr_;
   const int16_t* source_ptr_int_;
   const int destination_frames_;
diff --git a/webrtc/common_audio/resampler/push_sinc_resampler_unittest.cc b/webrtc/common_audio/resampler/push_sinc_resampler_unittest.cc
index c39a7a4..f955a68 100644
--- a/webrtc/common_audio/resampler/push_sinc_resampler_unittest.cc
+++ b/webrtc/common_audio/resampler/push_sinc_resampler_unittest.cc
@@ -13,10 +13,10 @@
 
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/include/audio_util.h"
 #include "webrtc/common_audio/resampler/push_sinc_resampler.h"
 #include "webrtc/common_audio/resampler/sinusoidal_linear_chirp_source.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/tick_util.h"
 #include "webrtc/typedefs.h"
 
@@ -71,10 +71,10 @@
   // Source for data to be resampled.
   ZeroSource resampler_source;
 
-  scoped_ptr<float[]> resampled_destination(new float[output_samples]);
-  scoped_ptr<float[]> source(new float[input_samples]);
-  scoped_ptr<int16_t[]> source_int(new int16_t[input_samples]);
-  scoped_ptr<int16_t[]> destination_int(new int16_t[output_samples]);
+  rtc::scoped_ptr<float[]> resampled_destination(new float[output_samples]);
+  rtc::scoped_ptr<float[]> source(new float[input_samples]);
+  rtc::scoped_ptr<int16_t[]> source_int(new int16_t[input_samples]);
+  rtc::scoped_ptr<int16_t[]> destination_int(new int16_t[output_samples]);
 
   resampler_source.Run(input_samples, source.get());
   for (int i = 0; i < input_samples; ++i) {
@@ -151,11 +151,11 @@
 
   // TODO(dalecurtis): If we switch to AVX/SSE optimization, we'll need to
   // allocate these on 32-byte boundaries and ensure they're sized % 32 bytes.
-  scoped_ptr<float[]> resampled_destination(new float[output_samples]);
-  scoped_ptr<float[]> pure_destination(new float[output_samples]);
-  scoped_ptr<float[]> source(new float[input_samples]);
-  scoped_ptr<int16_t[]> source_int(new int16_t[input_block_size]);
-  scoped_ptr<int16_t[]> destination_int(new int16_t[output_block_size]);
+  rtc::scoped_ptr<float[]> resampled_destination(new float[output_samples]);
+  rtc::scoped_ptr<float[]> pure_destination(new float[output_samples]);
+  rtc::scoped_ptr<float[]> source(new float[input_samples]);
+  rtc::scoped_ptr<int16_t[]> source_int(new int16_t[input_block_size]);
+  rtc::scoped_ptr<int16_t[]> destination_int(new int16_t[output_block_size]);
 
   // The sinc resampler has an implicit delay of approximately half the kernel
   // size at the input sample rate. By moving to a push model, this delay
diff --git a/webrtc/common_audio/resampler/sinc_resampler.h b/webrtc/common_audio/resampler/sinc_resampler.h
index 71ade79..4428359 100644
--- a/webrtc/common_audio/resampler/sinc_resampler.h
+++ b/webrtc/common_audio/resampler/sinc_resampler.h
@@ -15,8 +15,8 @@
 #define WEBRTC_COMMON_AUDIO_RESAMPLER_SINC_RESAMPLER_H_
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/aligned_malloc.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/gtest_prod_util.h"
 #include "webrtc/typedefs.h"
 
@@ -138,12 +138,12 @@
   // Contains kKernelOffsetCount kernels back-to-back, each of size kKernelSize.
   // The kernel offsets are sub-sample shifts of a windowed sinc shifted from
   // 0.0 to 1.0 sample.
-  scoped_ptr<float[], AlignedFreeDeleter> kernel_storage_;
-  scoped_ptr<float[], AlignedFreeDeleter> kernel_pre_sinc_storage_;
-  scoped_ptr<float[], AlignedFreeDeleter> kernel_window_storage_;
+  rtc::scoped_ptr<float[], AlignedFreeDeleter> kernel_storage_;
+  rtc::scoped_ptr<float[], AlignedFreeDeleter> kernel_pre_sinc_storage_;
+  rtc::scoped_ptr<float[], AlignedFreeDeleter> kernel_window_storage_;
 
   // Data from the source is copied into this buffer for each processing pass.
-  scoped_ptr<float[], AlignedFreeDeleter> input_buffer_;
+  rtc::scoped_ptr<float[], AlignedFreeDeleter> input_buffer_;
 
   // Stores the runtime selection of which Convolve function to use.
   // TODO(ajm): Move to using a global static which must only be initialized
diff --git a/webrtc/common_audio/resampler/sinc_resampler_unittest.cc b/webrtc/common_audio/resampler/sinc_resampler_unittest.cc
index 9790862..1aea902 100644
--- a/webrtc/common_audio/resampler/sinc_resampler_unittest.cc
+++ b/webrtc/common_audio/resampler/sinc_resampler_unittest.cc
@@ -18,10 +18,10 @@
 
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/resampler/sinc_resampler.h"
 #include "webrtc/common_audio/resampler/sinusoidal_linear_chirp_source.h"
 #include "webrtc/system_wrappers/interface/cpu_features_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/stringize_macros.h"
 #include "webrtc/system_wrappers/interface/tick_util.h"
 #include "webrtc/test/test_suite.h"
@@ -62,7 +62,7 @@
 
   static const int kChunks = 2;
   int max_chunk_size = resampler.ChunkSize() * kChunks;
-  scoped_ptr<float[]> resampled_destination(new float[max_chunk_size]);
+  rtc::scoped_ptr<float[]> resampled_destination(new float[max_chunk_size]);
 
   // Verify requesting ChunkSize() frames causes a single callback.
   EXPECT_CALL(mock_source, Run(_, _))
@@ -81,7 +81,8 @@
   MockSource mock_source;
   SincResampler resampler(kSampleRateRatio, SincResampler::kDefaultRequestSize,
                           &mock_source);
-  scoped_ptr<float[]> resampled_destination(new float[resampler.ChunkSize()]);
+  rtc::scoped_ptr<float[]> resampled_destination(
+      new float[resampler.ChunkSize()]);
 
   // Fill the resampler with junk data.
   EXPECT_CALL(mock_source, Run(_, _))
@@ -266,7 +267,7 @@
 
   // Force an update to the sample rate ratio to ensure dyanmic sample rate
   // changes are working correctly.
-  scoped_ptr<float[]> kernel(new float[SincResampler::kKernelStorageSize]);
+  rtc::scoped_ptr<float[]> kernel(new float[SincResampler::kKernelStorageSize]);
   memcpy(kernel.get(), resampler.get_kernel_for_testing(),
          SincResampler::kKernelStorageSize);
   resampler.SetRatio(M_PI);
@@ -278,8 +279,8 @@
 
   // TODO(dalecurtis): If we switch to AVX/SSE optimization, we'll need to
   // allocate these on 32-byte boundaries and ensure they're sized % 32 bytes.
-  scoped_ptr<float[]> resampled_destination(new float[output_samples]);
-  scoped_ptr<float[]> pure_destination(new float[output_samples]);
+  rtc::scoped_ptr<float[]> resampled_destination(new float[output_samples]);
+  rtc::scoped_ptr<float[]> pure_destination(new float[output_samples]);
 
   // Generate resampled signal.
   resampler.Resample(output_samples, resampled_destination.get());
diff --git a/webrtc/common_audio/ring_buffer_unittest.cc b/webrtc/common_audio/ring_buffer_unittest.cc
index e1043bd..f8cce74 100644
--- a/webrtc/common_audio/ring_buffer_unittest.cc
+++ b/webrtc/common_audio/ring_buffer_unittest.cc
@@ -15,7 +15,7 @@
 #include <algorithm>
 
 #include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -24,7 +24,7 @@
     WebRtc_FreeBuffer(ptr);
   }
 };
-typedef scoped_ptr<RingBuffer, FreeBufferDeleter> scoped_ring_buffer;
+typedef rtc::scoped_ptr<RingBuffer, FreeBufferDeleter> scoped_ring_buffer;
 
 static void AssertElementEq(int expected, int actual) {
   ASSERT_EQ(expected, actual);
@@ -58,8 +58,8 @@
   srand(seed);
   for (int i = 0; i < kNumTests; i++) {
     const int buffer_size = std::max(rand() % kMaxBufferSize, 1);
-    scoped_ptr<int[]> write_data(new int[buffer_size]);
-    scoped_ptr<int[]> read_data(new int[buffer_size]);
+    rtc::scoped_ptr<int[]> write_data(new int[buffer_size]);
+    rtc::scoped_ptr<int[]> read_data(new int[buffer_size]);
     scoped_ring_buffer buffer(WebRtc_CreateBuffer(buffer_size, sizeof(int)));
     ASSERT_TRUE(buffer.get() != NULL);
     WebRtc_InitBuffer(buffer.get());
diff --git a/webrtc/common_video/i420_video_frame.cc b/webrtc/common_video/i420_video_frame.cc
index 4d82f1e..b2ba158 100644
--- a/webrtc/common_video/i420_video_frame.cc
+++ b/webrtc/common_video/i420_video_frame.cc
@@ -103,7 +103,7 @@
 }
 
 I420VideoFrame* I420VideoFrame::CloneFrame() const {
-  scoped_ptr<I420VideoFrame> new_frame(new I420VideoFrame());
+  rtc::scoped_ptr<I420VideoFrame> new_frame(new I420VideoFrame());
   if (new_frame->CopyFrame(*this) == -1) {
     // CopyFrame failed.
     return NULL;
diff --git a/webrtc/common_video/i420_video_frame_unittest.cc b/webrtc/common_video/i420_video_frame_unittest.cc
index 7779762..47017ef 100644
--- a/webrtc/common_video/i420_video_frame_unittest.cc
+++ b/webrtc/common_video/i420_video_frame_unittest.cc
@@ -12,9 +12,9 @@
 #include <string.h>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_video/interface/i420_video_frame.h"
 #include "webrtc/system_wrappers/interface/ref_count.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/scoped_refptr.h"
 
 namespace webrtc {
@@ -116,7 +116,7 @@
 
 TEST(TestI420VideoFrame, CloneFrame) {
   I420VideoFrame frame1;
-  scoped_ptr<I420VideoFrame> frame2;
+  rtc::scoped_ptr<I420VideoFrame> frame2;
   const int kSizeY = 400;
   const int kSizeU = 100;
   const int kSizeV = 100;
diff --git a/webrtc/common_video/libyuv/libyuv_unittest.cc b/webrtc/common_video/libyuv/libyuv_unittest.cc
index 7a6bd4d..1fecf8c 100644
--- a/webrtc/common_video/libyuv/libyuv_unittest.cc
+++ b/webrtc/common_video/libyuv/libyuv_unittest.cc
@@ -12,9 +12,9 @@
 #include <string.h>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_video/interface/i420_video_frame.h"
 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/tick_util.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
@@ -84,7 +84,7 @@
 
   FILE* source_file_;
   I420VideoFrame orig_frame_;
-  scoped_ptr<uint8_t[]> orig_buffer_;
+  rtc::scoped_ptr<uint8_t[]> orig_buffer_;
   const int width_;
   const int height_;
   const int size_y_;
@@ -147,7 +147,7 @@
                                               (width_ + 1) / 2,
                                               (width_ + 1) / 2));
   printf("\nConvert #%d I420 <-> I420 \n", j);
-  scoped_ptr<uint8_t[]> out_i420_buffer(new uint8_t[frame_length_]);
+  rtc::scoped_ptr<uint8_t[]> out_i420_buffer(new uint8_t[frame_length_]);
   EXPECT_EQ(0, ConvertFromI420(orig_frame_, kI420, 0,
                                out_i420_buffer.get()));
   EXPECT_EQ(0, ConvertToI420(kI420, out_i420_buffer.get(), 0, 0,
@@ -162,7 +162,7 @@
   j++;
 
   printf("\nConvert #%d I420 <-> RGB24\n", j);
-  scoped_ptr<uint8_t[]> res_rgb_buffer2(new uint8_t[width_ * height_ * 3]);
+  rtc::scoped_ptr<uint8_t[]> res_rgb_buffer2(new uint8_t[width_ * height_ * 3]);
   // Align the stride values for the output frame.
   int stride_y = 0;
   int stride_uv = 0;
@@ -184,7 +184,7 @@
   j++;
 
   printf("\nConvert #%d I420 <-> UYVY\n", j);
-  scoped_ptr<uint8_t[]> out_uyvy_buffer(new uint8_t[width_ * height_ * 2]);
+  rtc::scoped_ptr<uint8_t[]> out_uyvy_buffer(new uint8_t[width_ * height_ * 2]);
   EXPECT_EQ(0, ConvertFromI420(orig_frame_,  kUYVY, 0, out_uyvy_buffer.get()));
   EXPECT_EQ(0, ConvertToI420(kUYVY, out_uyvy_buffer.get(), 0, 0, width_,
                              height_, 0, kRotateNone, &res_i420_frame));
@@ -196,8 +196,8 @@
   j++;
 
   printf("\nConvert #%d I420 <-> YV12\n", j);
-  scoped_ptr<uint8_t[]> outYV120Buffer(new uint8_t[frame_length_]);
-  scoped_ptr<uint8_t[]> res_i420_buffer(new uint8_t[frame_length_]);
+  rtc::scoped_ptr<uint8_t[]> outYV120Buffer(new uint8_t[frame_length_]);
+  rtc::scoped_ptr<uint8_t[]> res_i420_buffer(new uint8_t[frame_length_]);
   I420VideoFrame yv12_frame;
   EXPECT_EQ(0, ConvertFromI420(orig_frame_, kYV12, 0, outYV120Buffer.get()));
   yv12_frame.CreateFrame(size_y_, outYV120Buffer.get(),
@@ -218,7 +218,7 @@
   j++;
 
   printf("\nConvert #%d I420 <-> YUY2\n", j);
-  scoped_ptr<uint8_t[]> out_yuy2_buffer(new uint8_t[width_ * height_ * 2]);
+  rtc::scoped_ptr<uint8_t[]> out_yuy2_buffer(new uint8_t[width_ * height_ * 2]);
   EXPECT_EQ(0, ConvertFromI420(orig_frame_,  kYUY2, 0, out_yuy2_buffer.get()));
 
   EXPECT_EQ(0, ConvertToI420(kYUY2, out_yuy2_buffer.get(), 0, 0, width_,
@@ -231,7 +231,8 @@
   psnr = I420PSNR(&orig_frame_, &res_i420_frame);
   EXPECT_EQ(48.0, psnr);
   printf("\nConvert #%d I420 <-> RGB565\n", j);
-  scoped_ptr<uint8_t[]> out_rgb565_buffer(new uint8_t[width_ * height_ * 2]);
+  rtc::scoped_ptr<uint8_t[]> out_rgb565_buffer(
+      new uint8_t[width_ * height_ * 2]);
   EXPECT_EQ(0, ConvertFromI420(orig_frame_, kRGB565, 0,
                                out_rgb565_buffer.get()));
 
@@ -250,7 +251,8 @@
   EXPECT_GT(ceil(psnr), 40);
 
   printf("\nConvert #%d I420 <-> ARGB8888\n", j);
-  scoped_ptr<uint8_t[]> out_argb8888_buffer(new uint8_t[width_ * height_ * 4]);
+  rtc::scoped_ptr<uint8_t[]> out_argb8888_buffer(
+      new uint8_t[width_ * height_ * 4]);
   EXPECT_EQ(0, ConvertFromI420(orig_frame_, kARGB, 0,
                                out_argb8888_buffer.get()));
 
@@ -283,7 +285,7 @@
   Calc16ByteAlignedStride(width_, &stride_y, &stride_uv);
   EXPECT_EQ(0,res_i420_frame.CreateEmptyFrame(width_, height_,
                                               stride_y, stride_uv, stride_uv));
-  scoped_ptr<uint8_t[]> out_i420_buffer(new uint8_t[frame_length_]);
+  rtc::scoped_ptr<uint8_t[]> out_i420_buffer(new uint8_t[frame_length_]);
   EXPECT_EQ(0, ConvertFromI420(orig_frame_, kI420, 0,
                                out_i420_buffer.get()));
   EXPECT_EQ(0, ConvertToI420(kI420, out_i420_buffer.get(), 0, 0,
diff --git a/webrtc/common_video/libyuv/scaler_unittest.cc b/webrtc/common_video/libyuv/scaler_unittest.cc
index 6a5065c..e508290 100644
--- a/webrtc/common_video/libyuv/scaler_unittest.cc
+++ b/webrtc/common_video/libyuv/scaler_unittest.cc
@@ -99,7 +99,7 @@
                                 kI420, kI420,
                                 kScalePoint));
   I420VideoFrame test_frame2;
-  scoped_ptr<uint8_t[]> orig_buffer(new uint8_t[frame_length_]);
+  rtc::scoped_ptr<uint8_t[]> orig_buffer(new uint8_t[frame_length_]);
   EXPECT_GT(fread(orig_buffer.get(), 1, frame_length_, source_file_), 0U);
   test_frame_.CreateFrame(size_y_, orig_buffer.get(),
                           size_uv_, orig_buffer.get() + size_y_,
@@ -343,7 +343,7 @@
   total_clock = 0;
   int frame_count = 0;
   size_t src_required_size = CalcBufferSize(kI420, src_width, src_height);
-  scoped_ptr<uint8_t[]> frame_buffer(new uint8_t[src_required_size]);
+  rtc::scoped_ptr<uint8_t[]> frame_buffer(new uint8_t[src_required_size]);
   int size_y = src_width * src_height;
   int size_uv = ((src_width + 1) / 2) * ((src_height + 1) / 2);
 
diff --git a/webrtc/common_video/plane.cc b/webrtc/common_video/plane.cc
index 3776de1..e0bbba1 100644
--- a/webrtc/common_video/plane.cc
+++ b/webrtc/common_video/plane.cc
@@ -41,8 +41,8 @@
     return -1;
   if (new_size <= allocated_size_)
     return 0;
-  scoped_ptr<uint8_t, AlignedFreeDeleter> new_buffer(static_cast<uint8_t*>(
-      AlignedMalloc(new_size, kBufferAlignment)));
+  rtc::scoped_ptr<uint8_t, AlignedFreeDeleter> new_buffer(
+      static_cast<uint8_t*>(AlignedMalloc(new_size, kBufferAlignment)));
   if (buffer_.get()) {
     memcpy(new_buffer.get(), buffer_.get(), plane_size_);
   }
diff --git a/webrtc/common_video/plane.h b/webrtc/common_video/plane.h
index 4031e03..66b8a5a 100644
--- a/webrtc/common_video/plane.h
+++ b/webrtc/common_video/plane.h
@@ -11,8 +11,8 @@
 #ifndef COMMON_VIDEO_PLANE_H
 #define COMMON_VIDEO_PLANE_H
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/aligned_malloc.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -64,7 +64,7 @@
   // Return value: 0 on success ,-1 on error.
   int MaybeResize(int new_size);
 
-  scoped_ptr<uint8_t, AlignedFreeDeleter> buffer_;
+  rtc::scoped_ptr<uint8_t, AlignedFreeDeleter> buffer_;
   int allocated_size_;
   int plane_size_;
   int stride_;
diff --git a/webrtc/common_video/texture_video_frame_unittest.cc b/webrtc/common_video/texture_video_frame_unittest.cc
index 632521e..c8c21c4 100644
--- a/webrtc/common_video/texture_video_frame_unittest.cc
+++ b/webrtc/common_video/texture_video_frame_unittest.cc
@@ -58,7 +58,7 @@
 TEST(TestTextureVideoFrame, CloneFrame) {
   NativeHandleImpl handle;
   TextureVideoFrame frame1(&handle, 640, 480, 100, 200);
-  scoped_ptr<I420VideoFrame> frame2(frame1.CloneFrame());
+  rtc::scoped_ptr<I420VideoFrame> frame2(frame1.CloneFrame());
   EXPECT_TRUE(frame2.get() != NULL);
   EXPECT_TRUE(EqualTextureFrames(frame1, *frame2));
 }
diff --git a/webrtc/examples/android/opensl_loopback/fake_audio_device_buffer.cc b/webrtc/examples/android/opensl_loopback/fake_audio_device_buffer.cc
index 23b60ee..116521e 100644
--- a/webrtc/examples/android/opensl_loopback/fake_audio_device_buffer.cc
+++ b/webrtc/examples/android/opensl_loopback/fake_audio_device_buffer.cc
@@ -22,7 +22,7 @@
       next_available_buffer_(0),
       record_channels_(0),
       play_channels_(0) {
-  buf_.reset(new scoped_ptr<int8_t[]>[kNumBuffers]);
+  buf_.reset(new rtc::scoped_ptr<int8_t[]>[kNumBuffers]);
   for (int i = 0; i < kNumBuffers; ++i) {
     buf_[i].reset(new int8_t[buffer_size_bytes()]);
   }
diff --git a/webrtc/examples/android/opensl_loopback/fake_audio_device_buffer.h b/webrtc/examples/android/opensl_loopback/fake_audio_device_buffer.h
index 1ef866c..f5442ee 100644
--- a/webrtc/examples/android/opensl_loopback/fake_audio_device_buffer.h
+++ b/webrtc/examples/android/opensl_loopback/fake_audio_device_buffer.h
@@ -11,10 +11,10 @@
 #ifndef WEBRTC_EXAMPLES_ANDROID_OPENSL_LOOPBACK_FAKE_AUDIO_DEVICE_BUFFER_H_
 #define WEBRTC_EXAMPLES_ANDROID_OPENSL_LOOPBACK_FAKE_AUDIO_DEVICE_BUFFER_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_device/android/audio_manager_jni.h"
 #include "webrtc/modules/audio_device/android/single_rw_fifo.h"
 #include "webrtc/modules/audio_device/audio_device_buffer.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -55,7 +55,7 @@
   AudioManagerJni audio_manager_;
 
   SingleRwFifo fifo_;
-  scoped_ptr<scoped_ptr<int8_t[]>[]> buf_;
+  rtc::scoped_ptr<rtc::scoped_ptr<int8_t[]>[]> buf_;
   int next_available_buffer_;
 
   uint8_t record_channels_;
diff --git a/webrtc/examples/android/opensl_loopback/jni/opensl_runner.cc b/webrtc/examples/android/opensl_loopback/jni/opensl_runner.cc
index 526df4d..d0e315d 100644
--- a/webrtc/examples/android/opensl_loopback/jni/opensl_runner.cc
+++ b/webrtc/examples/android/opensl_loopback/jni/opensl_runner.cc
@@ -11,13 +11,13 @@
 #include <assert.h>
 #include <jni.h>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/examples/android/opensl_loopback/fake_audio_device_buffer.h"
 #include "webrtc/modules/audio_device/android/audio_device_template.h"
 #include "webrtc/modules/audio_device/android/audio_record_jni.h"
 #include "webrtc/modules/audio_device/android/audio_track_jni.h"
 #include "webrtc/modules/audio_device/android/opensles_input.h"
 #include "webrtc/modules/audio_device/android/opensles_output.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 // Java globals
 static JavaVM* g_vm = NULL;
diff --git a/webrtc/libjingle/xmpp/chatroommodule_unittest.cc b/webrtc/libjingle/xmpp/chatroommodule_unittest.cc
index 27b5211..65d2827 100644
--- a/webrtc/libjingle/xmpp/chatroommodule_unittest.cc
+++ b/webrtc/libjingle/xmpp/chatroommodule_unittest.cc
@@ -161,11 +161,11 @@
     std::stringstream dump;
 
     // Configure the engine
-    scoped_ptr<XmppEngine> engine(XmppEngine::Create());
+    rtc::scoped_ptr<XmppEngine> engine(XmppEngine::Create());
     XmppTestHandler handler(engine.get());
 
     // Configure the module and handler
-    scoped_ptr<XmppChatroomModule> chatroom(XmppChatroomModule::Create());
+    rtc::scoped_ptr<XmppChatroomModule> chatroom(XmppChatroomModule::Create());
 
     // Configure the module handler
     chatroom->RegisterEngine(engine.get());
diff --git a/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc b/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc
index 2b2c047..8478839 100644
--- a/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc
+++ b/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc
@@ -9,10 +9,10 @@
  */
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/vad/mock/mock_vad.h"
 #include "webrtc/modules/audio_coding/codecs/cng/include/audio_encoder_cng.h"
 #include "webrtc/modules/audio_coding/codecs/mock/mock_audio_encoder.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 using ::testing::Return;
 using ::testing::_;
@@ -176,7 +176,7 @@
   }
 
   AudioEncoderCng::Config config_;
-  scoped_ptr<AudioEncoderCng> cng_;
+  rtc::scoped_ptr<AudioEncoderCng> cng_;
   MockAudioEncoder mock_encoder_;
   MockVad* mock_vad_;  // Ownership is transferred to |cng_|.
   uint32_t timestamp_;
diff --git a/webrtc/modules/audio_coding/codecs/cng/include/audio_encoder_cng.h b/webrtc/modules/audio_coding/codecs/cng/include/audio_encoder_cng.h
index 72a6603..46ad727 100644
--- a/webrtc/modules/audio_coding/codecs/cng/include/audio_encoder_cng.h
+++ b/webrtc/modules/audio_coding/codecs/cng/include/audio_encoder_cng.h
@@ -13,10 +13,10 @@
 
 #include <vector>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/vad/include/vad.h"
 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
 #include "webrtc/modules/audio_coding/codecs/cng/include/webrtc_cng.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -63,7 +63,7 @@
 
  private:
   // Deleter for use with scoped_ptr. E.g., use as
-  //   scoped_ptr<CNG_enc_inst, CngInstDeleter> cng_inst_;
+  //   rtc::scoped_ptr<CNG_enc_inst, CngInstDeleter> cng_inst_;
   struct CngInstDeleter {
     inline void operator()(CNG_enc_inst* ptr) const { WebRtcCng_FreeEnc(ptr); }
   };
@@ -81,8 +81,8 @@
   uint32_t first_timestamp_in_buffer_;
   int frames_in_buffer_;
   bool last_frame_active_;
-  scoped_ptr<Vad> vad_;
-  scoped_ptr<CNG_enc_inst, CngInstDeleter> cng_inst_;
+  rtc::scoped_ptr<Vad> vad_;
+  rtc::scoped_ptr<CNG_enc_inst, CngInstDeleter> cng_inst_;
 };
 
 }  // namespace webrtc
diff --git a/webrtc/modules/audio_coding/codecs/g722/include/audio_encoder_g722.h b/webrtc/modules/audio_coding/codecs/g722/include/audio_encoder_g722.h
index c314af3..4439bc1 100644
--- a/webrtc/modules/audio_coding/codecs/g722/include/audio_encoder_g722.h
+++ b/webrtc/modules/audio_coding/codecs/g722/include/audio_encoder_g722.h
@@ -11,9 +11,9 @@
 #ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_G722_INCLUDE_AUDIO_ENCODER_G722_H_
 #define WEBRTC_MODULES_AUDIO_CODING_CODECS_G722_INCLUDE_AUDIO_ENCODER_G722_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
 #include "webrtc/modules/audio_coding/codecs/g722/include/g722_interface.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -47,8 +47,8 @@
   // The encoder state for one channel.
   struct EncoderState {
     G722EncInst* encoder;
-    scoped_ptr<int16_t[]> speech_buffer;  // Queued up for encoding.
-    scoped_ptr<uint8_t[]> encoded_buffer;  // Already encoded.
+    rtc::scoped_ptr<int16_t[]> speech_buffer;   // Queued up for encoding.
+    rtc::scoped_ptr<uint8_t[]> encoded_buffer;  // Already encoded.
     EncoderState();
     ~EncoderState();
   };
@@ -58,8 +58,8 @@
   const int num_10ms_frames_per_packet_;
   int num_10ms_frames_buffered_;
   uint32_t first_timestamp_in_buffer_;
-  const scoped_ptr<EncoderState[]> encoders_;
-  const scoped_ptr<uint8_t[]> interleave_buffer_;
+  const rtc::scoped_ptr<EncoderState[]> encoders_;
+  const rtc::scoped_ptr<uint8_t[]> interleave_buffer_;
 };
 
 }  // namespace webrtc
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/interface/audio_encoder_ilbc.h b/webrtc/modules/audio_coding/codecs/ilbc/interface/audio_encoder_ilbc.h
index 7e233bf..15c0e00 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/interface/audio_encoder_ilbc.h
+++ b/webrtc/modules/audio_coding/codecs/ilbc/interface/audio_encoder_ilbc.h
@@ -11,9 +11,9 @@
 #ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_INTERFACE_AUDIO_ENCODER_ILBC_H_
 #define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_INTERFACE_AUDIO_ENCODER_ILBC_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
 #include "webrtc/modules/audio_coding/codecs/ilbc/interface/ilbc.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
diff --git a/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h b/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h
index 668f491..2279c3d 100644
--- a/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h
+++ b/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h
@@ -13,10 +13,10 @@
 
 #include <vector>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/modules/audio_coding/codecs/audio_decoder.h"
 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -112,14 +112,14 @@
   // iSAC encoder/decoder state, guarded by a mutex to ensure that encode calls
   // from one thread won't clash with decode calls from another thread.
   // Note: PT_GUARDED_BY is disabled since it is not yet supported by clang.
-  const scoped_ptr<CriticalSectionWrapper> state_lock_;
+  const rtc::scoped_ptr<CriticalSectionWrapper> state_lock_;
   typename T::instance_type* isac_state_
       GUARDED_BY(state_lock_) /* PT_GUARDED_BY(lock_)*/;
 
   int decoder_sample_rate_hz_ GUARDED_BY(state_lock_);
 
   // Must be acquired before state_lock_.
-  const scoped_ptr<CriticalSectionWrapper> lock_;
+  const rtc::scoped_ptr<CriticalSectionWrapper> lock_;
 
   // Have we accepted input but not yet emitted it in a packet?
   bool packet_in_progress_ GUARDED_BY(lock_);
diff --git a/webrtc/modules/audio_coding/codecs/isac/main/source/audio_encoder_isac_red_unittest.cc b/webrtc/modules/audio_coding/codecs/isac/main/source/audio_encoder_isac_red_unittest.cc
index 7ff1b46..48d7ae7 100644
--- a/webrtc/modules/audio_coding/codecs/isac/main/source/audio_encoder_isac_red_unittest.cc
+++ b/webrtc/modules/audio_coding/codecs/isac/main/source/audio_encoder_isac_red_unittest.cc
@@ -11,8 +11,8 @@
 #include <stdlib.h>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/codecs/isac/main/interface/audio_encoder_isac.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
diff --git a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc
index 9b2f07f..33afa5f 100644
--- a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc
+++ b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc
@@ -9,8 +9,8 @@
  */
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -32,7 +32,7 @@
     }
   }
 
-  scoped_ptr<AudioEncoderOpus> opus_;
+  rtc::scoped_ptr<AudioEncoderOpus> opus_;
 };
 
 namespace {
diff --git a/webrtc/modules/audio_coding/codecs/opus/opus_fec_test.cc b/webrtc/modules/audio_coding/codecs/opus/opus_fec_test.cc
index b91aa45..a30b1cb 100644
--- a/webrtc/modules/audio_coding/codecs/opus/opus_fec_test.cc
+++ b/webrtc/modules/audio_coding/codecs/opus/opus_fec_test.cc
@@ -9,9 +9,9 @@
  */
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/codecs/opus/interface/opus_interface.h"
 #include "webrtc/test/testsupport/fileutils.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 using ::std::string;
 using ::std::tr1::tuple;
@@ -60,9 +60,9 @@
 
   string in_filename_;
 
-  scoped_ptr<int16_t[]> in_data_;
-  scoped_ptr<int16_t[]> out_data_;
-  scoped_ptr<uint8_t[]> bit_stream_;
+  rtc::scoped_ptr<int16_t[]> in_data_;
+  rtc::scoped_ptr<int16_t[]> out_data_;
+  rtc::scoped_ptr<uint8_t[]> bit_stream_;
 };
 
 void OpusFecTest::SetUp() {
diff --git a/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.h b/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.h
index ea8542d..4414d04 100644
--- a/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.h
+++ b/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.h
@@ -13,8 +13,8 @@
 
 #include <vector>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -53,7 +53,7 @@
  private:
   AudioEncoder* speech_encoder_;
   int red_payload_type_;
-  scoped_ptr<uint8_t[]> secondary_encoded_;
+  rtc::scoped_ptr<uint8_t[]> secondary_encoded_;
   size_t secondary_allocated_;
   EncodedInfoLeaf secondary_info_;
 };
diff --git a/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red_unittest.cc b/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red_unittest.cc
index 5373db4..56ada5f 100644
--- a/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red_unittest.cc
+++ b/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red_unittest.cc
@@ -10,9 +10,9 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 #include "webrtc/base/checks.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.h"
 #include "webrtc/modules/audio_coding/codecs/mock/mock_audio_encoder.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 using ::testing::Return;
 using ::testing::_;
@@ -63,7 +63,7 @@
   }
 
   MockAudioEncoder mock_encoder_;
-  scoped_ptr<AudioEncoderCopyRed> red_;
+  rtc::scoped_ptr<AudioEncoderCopyRed> red_;
   uint32_t timestamp_;
   int16_t audio_[kMaxNumSamples];
   const int sample_rate_hz_;
diff --git a/webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.h b/webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.h
index 2c9b45e..35ac69e 100644
--- a/webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.h
+++ b/webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.h
@@ -13,7 +13,7 @@
 
 #include <string>
 #include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -60,11 +60,11 @@
   // Expected output number of samples-per-channel in a frame.
   int output_length_sample_;
 
-  scoped_ptr<int16_t[]> in_data_;
-  scoped_ptr<int16_t[]> out_data_;
+  rtc::scoped_ptr<int16_t[]> in_data_;
+  rtc::scoped_ptr<int16_t[]> out_data_;
   size_t data_pointer_;
   size_t loop_length_samples_;
-  scoped_ptr<uint8_t[]> bit_stream_;
+  rtc::scoped_ptr<uint8_t[]> bit_stream_;
 
   // Maximum number of bytes in output bitstream for a frame of audio.
   int max_bytes_;
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_generic_codec.h b/webrtc/modules/audio_coding/main/acm2/acm_generic_codec.h
index fd3fbab..d264b01 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_generic_codec.h
+++ b/webrtc/modules/audio_coding/main/acm2/acm_generic_codec.h
@@ -13,6 +13,7 @@
 
 #include <map>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module_typedefs.h"
 #include "webrtc/modules/audio_coding/codecs/audio_decoder.h"
@@ -21,7 +22,6 @@
 #include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/interface/rw_lock_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/trace.h"
 
 #define MAX_FRAME_SIZE_10MSEC 6
@@ -72,7 +72,7 @@
   CNG_dec_inst* CngDecoderInstance() override;
 
  private:
-  scoped_ptr<CriticalSectionWrapper> decoder_lock_;
+  rtc::scoped_ptr<CriticalSectionWrapper> decoder_lock_;
   AudioDecoder* decoder_ GUARDED_BY(decoder_lock_);
 };
 
@@ -472,9 +472,9 @@
   OpusApplicationMode GetOpusApplication(int num_channels) const
       EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
 
-  scoped_ptr<AudioEncoder> audio_encoder_ GUARDED_BY(codec_wrapper_lock_);
-  scoped_ptr<AudioEncoder> cng_encoder_ GUARDED_BY(codec_wrapper_lock_);
-  scoped_ptr<AudioEncoder> red_encoder_ GUARDED_BY(codec_wrapper_lock_);
+  rtc::scoped_ptr<AudioEncoder> audio_encoder_ GUARDED_BY(codec_wrapper_lock_);
+  rtc::scoped_ptr<AudioEncoder> cng_encoder_ GUARDED_BY(codec_wrapper_lock_);
+  rtc::scoped_ptr<AudioEncoder> red_encoder_ GUARDED_BY(codec_wrapper_lock_);
   AudioEncoder* encoder_ GUARDED_BY(codec_wrapper_lock_);
   AudioDecoderProxy decoder_proxy_ GUARDED_BY(codec_wrapper_lock_);
   std::vector<int16_t> input_ GUARDED_BY(codec_wrapper_lock_);
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_generic_codec_opus_test.cc b/webrtc/modules/audio_coding/main/acm2/acm_generic_codec_opus_test.cc
index 745a150..c19413a 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_generic_codec_opus_test.cc
+++ b/webrtc/modules/audio_coding/main/acm2/acm_generic_codec_opus_test.cc
@@ -43,7 +43,7 @@
     return ptr;
   }
   WebRtcACMCodecParams acm_codec_params_;
-  scoped_ptr<ACMGenericCodec> codec_wrapper_;
+  rtc::scoped_ptr<ACMGenericCodec> codec_wrapper_;
 };
 
 TEST_F(AcmGenericCodecOpusTest, DefaultApplicationModeMono) {
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_generic_codec_test.cc b/webrtc/modules/audio_coding/main/acm2/acm_generic_codec_test.cc
index 1b8113c..3364d4a 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_generic_codec_test.cc
+++ b/webrtc/modules/audio_coding/main/acm2/acm_generic_codec_test.cc
@@ -73,7 +73,7 @@
   }
 
   WebRtcACMCodecParams acm_codec_params_;
-  scoped_ptr<ACMGenericCodec> codec_;
+  rtc::scoped_ptr<ACMGenericCodec> codec_;
   uint32_t timestamp_;
 };
 
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_receive_test.cc b/webrtc/modules/audio_coding/main/acm2/acm_receive_test.cc
index 08ece69..e74ce22 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_receive_test.cc
+++ b/webrtc/modules/audio_coding/main/acm2/acm_receive_test.cc
@@ -86,7 +86,7 @@
 }
 
 void AcmReceiveTest::Run() {
-  for (scoped_ptr<Packet> packet(packet_source_->NextPacket()); packet;
+  for (rtc::scoped_ptr<Packet> packet(packet_source_->NextPacket()); packet;
        packet.reset(packet_source_->NextPacket())) {
     // Pull audio until time to insert packet.
     while (clock_.TimeInMilliseconds() < packet->time_ms()) {
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_receive_test.h b/webrtc/modules/audio_coding/main/acm2/acm_receive_test.h
index 19fe4c5..552a748 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_receive_test.h
+++ b/webrtc/modules/audio_coding/main/acm2/acm_receive_test.h
@@ -12,8 +12,8 @@
 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RECEIVE_TEST_H_
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 class AudioCoding;
@@ -50,7 +50,7 @@
 
  private:
   SimulatedClock clock_;
-  scoped_ptr<AudioCoding> acm_;
+  rtc::scoped_ptr<AudioCoding> acm_;
   PacketSource* packet_source_;
   AudioSink* audio_sink_;
   const int output_freq_hz_;
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_receive_test_oldapi.cc b/webrtc/modules/audio_coding/main/acm2/acm_receive_test_oldapi.cc
index 391e99b..96a1fc5 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_receive_test_oldapi.cc
+++ b/webrtc/modules/audio_coding/main/acm2/acm_receive_test_oldapi.cc
@@ -144,7 +144,7 @@
 }
 
 void AcmReceiveTestOldApi::Run() {
-  for (scoped_ptr<Packet> packet(packet_source_->NextPacket()); packet;
+  for (rtc::scoped_ptr<Packet> packet(packet_source_->NextPacket()); packet;
        packet.reset(packet_source_->NextPacket())) {
     // Pull audio until time to insert packet.
     while (clock_.TimeInMilliseconds() < packet->time_ms()) {
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_receive_test_oldapi.h b/webrtc/modules/audio_coding/main/acm2/acm_receive_test_oldapi.h
index e913fcf..63c35e4 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_receive_test_oldapi.h
+++ b/webrtc/modules/audio_coding/main/acm2/acm_receive_test_oldapi.h
@@ -12,8 +12,8 @@
 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RECEIVE_TEST_H_
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 class AudioCodingModule;
@@ -52,7 +52,7 @@
   virtual void AfterGetAudio() {}
 
   SimulatedClock clock_;
-  scoped_ptr<AudioCodingModule> acm_;
+  rtc::scoped_ptr<AudioCodingModule> acm_;
   PacketSource* packet_source_;
   AudioSink* audio_sink_;
   int output_freq_hz_;
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_receiver.h b/webrtc/modules/audio_coding/main/acm2/acm_receiver.h
index 43f304a..f18cc51 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_receiver.h
+++ b/webrtc/modules/audio_coding/main/acm2/acm_receiver.h
@@ -13,6 +13,7 @@
 
 #include <vector>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/common_audio/vad/include/webrtc_vad.h"
 #include "webrtc/engine_configurations.h"
@@ -23,7 +24,6 @@
 #include "webrtc/modules/audio_coding/main/acm2/initial_delay_manager.h"
 #include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
 #include "webrtc/modules/interface/module_common_types.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -320,7 +320,7 @@
 
   void InsertStreamOfSyncPackets(InitialDelayManager::SyncStream* sync_stream);
 
-  scoped_ptr<CriticalSectionWrapper> crit_sect_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
   int id_;  // TODO(henrik.lundin) Make const.
   int last_audio_decoder_ GUARDED_BY(crit_sect_);
   AudioFrame::VADActivity previous_audio_activity_ GUARDED_BY(crit_sect_);
@@ -328,9 +328,9 @@
   ACMResampler resampler_ GUARDED_BY(crit_sect_);
   // Used in GetAudio, declared as member to avoid allocating every 10ms.
   // TODO(henrik.lundin) Stack-allocate in GetAudio instead?
-  scoped_ptr<int16_t[]> audio_buffer_ GUARDED_BY(crit_sect_);
-  scoped_ptr<int16_t[]> last_audio_buffer_ GUARDED_BY(crit_sect_);
-  scoped_ptr<Nack> nack_ GUARDED_BY(crit_sect_);
+  rtc::scoped_ptr<int16_t[]> audio_buffer_ GUARDED_BY(crit_sect_);
+  rtc::scoped_ptr<int16_t[]> last_audio_buffer_ GUARDED_BY(crit_sect_);
+  rtc::scoped_ptr<Nack> nack_ GUARDED_BY(crit_sect_);
   bool nack_enabled_ GUARDED_BY(crit_sect_);
   CallStatistics call_stats_ GUARDED_BY(crit_sect_);
   NetEq* neteq_;
@@ -342,15 +342,15 @@
   // Indicates if a non-zero initial delay is set, and the receiver is in
   // AV-sync mode.
   bool av_sync_;
-  scoped_ptr<InitialDelayManager> initial_delay_manager_;
+  rtc::scoped_ptr<InitialDelayManager> initial_delay_manager_;
 
   // The following are defined as members to avoid creating them in every
   // iteration. |missing_packets_sync_stream_| is *ONLY* used in InsertPacket().
   // |late_packets_sync_stream_| is only used in GetAudio(). Both of these
   // member variables are allocated only when we AV-sync is enabled, i.e.
   // initial delay is set.
-  scoped_ptr<InitialDelayManager::SyncStream> missing_packets_sync_stream_;
-  scoped_ptr<InitialDelayManager::SyncStream> late_packets_sync_stream_;
+  rtc::scoped_ptr<InitialDelayManager::SyncStream> missing_packets_sync_stream_;
+  rtc::scoped_ptr<InitialDelayManager::SyncStream> late_packets_sync_stream_;
 };
 
 }  // namespace acm2
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_receiver_unittest.cc b/webrtc/modules/audio_coding/main/acm2/acm_receiver_unittest.cc
index 6b15718..2eb1bf9 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_receiver_unittest.cc
+++ b/webrtc/modules/audio_coding/main/acm2/acm_receiver_unittest.cc
@@ -13,12 +13,12 @@
 #include <algorithm>  // std::min
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
 #include "webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h"
 #include "webrtc/modules/audio_coding/main/acm2/acm_codec_database.h"
 #include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h"
 #include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/test_suite.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/test/testsupport/gtest_disable.h"
@@ -145,9 +145,9 @@
     return 0;
   }
 
-  scoped_ptr<AcmReceiver> receiver_;
+  rtc::scoped_ptr<AcmReceiver> receiver_;
   CodecInst codecs_[ACMCodecDB::kMaxNumCodecs];
-  scoped_ptr<AudioCoding> acm_;
+  rtc::scoped_ptr<AudioCoding> acm_;
   WebRtcRTPHeader rtp_header_;
   uint32_t timestamp_;
   bool packet_sent_;  // Set when SendData is called reset when inserting audio.
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_receiver_unittest_oldapi.cc b/webrtc/modules/audio_coding/main/acm2/acm_receiver_unittest_oldapi.cc
index d57d511..c1b1636 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_receiver_unittest_oldapi.cc
+++ b/webrtc/modules/audio_coding/main/acm2/acm_receiver_unittest_oldapi.cc
@@ -13,12 +13,12 @@
 #include <algorithm>  // std::min
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
 #include "webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h"
 #include "webrtc/modules/audio_coding/main/acm2/acm_codec_database.h"
 #include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h"
 #include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/test_suite.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/test/testsupport/gtest_disable.h"
@@ -149,9 +149,9 @@
     return 0;
   }
 
-  scoped_ptr<AcmReceiver> receiver_;
+  rtc::scoped_ptr<AcmReceiver> receiver_;
   CodecInst codecs_[ACMCodecDB::kMaxNumCodecs];
-  scoped_ptr<AudioCodingModule> acm_;
+  rtc::scoped_ptr<AudioCodingModule> acm_;
   WebRtcRTPHeader rtp_header_;
   uint32_t timestamp_;
   bool packet_sent_;  // Set when SendData is called reset when inserting audio.
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_send_test.h b/webrtc/modules/audio_coding/main/acm2/acm_send_test.h
index ac20cc7..769a327 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_send_test.h
+++ b/webrtc/modules/audio_coding/main/acm2/acm_send_test.h
@@ -14,10 +14,10 @@
 #include <vector>
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
 #include "webrtc/modules/audio_coding/neteq/tools/packet_source.h"
 #include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -61,7 +61,7 @@
   Packet* CreatePacket();
 
   SimulatedClock clock_;
-  scoped_ptr<AudioCoding> acm_;
+  rtc::scoped_ptr<AudioCoding> acm_;
   InputAudioFile* audio_source_;
   int source_rate_hz_;
   const int input_block_size_samples_;
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_send_test_oldapi.h b/webrtc/modules/audio_coding/main/acm2/acm_send_test_oldapi.h
index 5953cab..80aaf36 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_send_test_oldapi.h
+++ b/webrtc/modules/audio_coding/main/acm2/acm_send_test_oldapi.h
@@ -14,10 +14,10 @@
 #include <vector>
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
 #include "webrtc/modules/audio_coding/neteq/tools/packet_source.h"
 #include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -65,7 +65,7 @@
   Packet* CreatePacket();
 
   SimulatedClock clock_;
-  scoped_ptr<AudioCodingModule> acm_;
+  rtc::scoped_ptr<AudioCodingModule> acm_;
   InputAudioFile* audio_source_;
   int source_rate_hz_;
   const int input_block_size_samples_;
diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h
index aa8d366..3450194 100644
--- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h
+++ b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h
@@ -13,13 +13,13 @@
 
 #include <vector>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/common_types.h"
 #include "webrtc/engine_configurations.h"
 #include "webrtc/modules/audio_coding/main/acm2/acm_codec_database.h"
 #include "webrtc/modules/audio_coding/main/acm2/acm_receiver.h"
 #include "webrtc/modules/audio_coding/main/acm2/acm_resampler.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -429,7 +429,7 @@
   int playout_frequency_hz_;
   // TODO(henrik.lundin): All members below this line are temporary and should
   // be removed after refactoring is completed.
-  scoped_ptr<acm2::AudioCodingModuleImpl> acm_old_;
+  rtc::scoped_ptr<acm2::AudioCodingModuleImpl> acm_old_;
   CodecInst current_send_codec_;
 };
 
diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc
index 5185c12..b37ef9d 100644
--- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc
+++ b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc
@@ -14,6 +14,7 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "webrtc/base/checks.h"
 #include "webrtc/base/md5digest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/modules/audio_coding/main/acm2/acm_receive_test.h"
 #include "webrtc/modules/audio_coding/main/acm2/acm_send_test.h"
@@ -29,7 +30,6 @@
 #include "webrtc/system_wrappers/interface/clock.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/interface/event_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/sleep.h"
 #include "webrtc/system_wrappers/interface/thread_wrapper.h"
 #include "webrtc/test/testsupport/fileutils.h"
@@ -112,7 +112,7 @@
  private:
   int num_calls_ GUARDED_BY(crit_sect_);
   std::vector<uint8_t> last_payload_vec_ GUARDED_BY(crit_sect_);
-  const scoped_ptr<CriticalSectionWrapper> crit_sect_;
+  const rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
 };
 
 class AudioCodingModuleTest : public ::testing::Test {
@@ -188,8 +188,8 @@
   }
 
   AudioCoding::Config config_;
-  scoped_ptr<RtpUtility> rtp_utility_;
-  scoped_ptr<AudioCoding> acm_;
+  rtc::scoped_ptr<RtpUtility> rtp_utility_;
+  rtc::scoped_ptr<AudioCoding> acm_;
   PacketizationCallbackStub packet_cb_;
   WebRtcRTPHeader rtp_header_;
   AudioFrame input_frame_;
@@ -404,16 +404,16 @@
     return true;
   }
 
-  scoped_ptr<ThreadWrapper> send_thread_;
-  scoped_ptr<ThreadWrapper> insert_packet_thread_;
-  scoped_ptr<ThreadWrapper> pull_audio_thread_;
-  const scoped_ptr<EventWrapper> test_complete_;
+  rtc::scoped_ptr<ThreadWrapper> send_thread_;
+  rtc::scoped_ptr<ThreadWrapper> insert_packet_thread_;
+  rtc::scoped_ptr<ThreadWrapper> pull_audio_thread_;
+  const rtc::scoped_ptr<EventWrapper> test_complete_;
   int send_count_;
   int insert_packet_count_;
   int pull_audio_count_ GUARDED_BY(crit_sect_);
-  const scoped_ptr<CriticalSectionWrapper> crit_sect_;
+  const rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
   int64_t next_insert_packet_time_ms_ GUARDED_BY(crit_sect_);
-  scoped_ptr<SimulatedClock> fake_clock_;
+  rtc::scoped_ptr<SimulatedClock> fake_clock_;
 };
 
 TEST_F(AudioCodingModuleMtTest, DoTest) {
@@ -531,7 +531,7 @@
   void Run(int output_freq_hz, const std::string& checksum_ref) {
     const std::string input_file_name =
         webrtc::test::ResourcePath("audio_coding/neteq_universal_new", "rtp");
-    scoped_ptr<test::RtpFileSource> packet_source(
+    rtc::scoped_ptr<test::RtpFileSource> packet_source(
         test::RtpFileSource::Create(input_file_name));
 #ifdef WEBRTC_ANDROID
     // Filter out iLBC and iSAC-swb since they are not supported on Android.
@@ -755,8 +755,8 @@
                                   codec_frame_size_rtp_timestamps));
   }
 
-  scoped_ptr<test::AcmSendTest> send_test_;
-  scoped_ptr<test::InputAudioFile> audio_source_;
+  rtc::scoped_ptr<test::AcmSendTest> send_test_;
+  rtc::scoped_ptr<test::InputAudioFile> audio_source_;
   uint32_t frame_size_rtp_timestamps_;
   int packet_count_;
   uint8_t payload_type_;
diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc
index f27b4cf..a1ea179 100644
--- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc
+++ b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc
@@ -13,6 +13,7 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 #include "webrtc/base/md5digest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/modules/audio_coding/main/acm2/acm_receive_test_oldapi.h"
 #include "webrtc/modules/audio_coding/main/acm2/acm_send_test_oldapi.h"
@@ -29,7 +30,6 @@
 #include "webrtc/system_wrappers/interface/clock.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/interface/event_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/sleep.h"
 #include "webrtc/system_wrappers/interface/thread_wrapper.h"
 #include "webrtc/test/testsupport/fileutils.h"
@@ -131,7 +131,7 @@
   FrameType last_frame_type_ GUARDED_BY(crit_sect_);
   int last_payload_type_ GUARDED_BY(crit_sect_);
   std::vector<uint8_t> last_payload_vec_ GUARDED_BY(crit_sect_);
-  const scoped_ptr<CriticalSectionWrapper> crit_sect_;
+  const rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
 };
 
 class AudioCodingModuleTestOldApi : public ::testing::Test {
@@ -205,8 +205,8 @@
   }
 
   const int id_;
-  scoped_ptr<RtpUtility> rtp_utility_;
-  scoped_ptr<AudioCodingModule> acm_;
+  rtc::scoped_ptr<RtpUtility> rtp_utility_;
+  rtc::scoped_ptr<AudioCodingModule> acm_;
   PacketizationCallbackStubOldApi packet_cb_;
   WebRtcRTPHeader rtp_header_;
   AudioFrame input_frame_;
@@ -541,16 +541,16 @@
     return true;
   }
 
-  scoped_ptr<ThreadWrapper> send_thread_;
-  scoped_ptr<ThreadWrapper> insert_packet_thread_;
-  scoped_ptr<ThreadWrapper> pull_audio_thread_;
-  const scoped_ptr<EventWrapper> test_complete_;
+  rtc::scoped_ptr<ThreadWrapper> send_thread_;
+  rtc::scoped_ptr<ThreadWrapper> insert_packet_thread_;
+  rtc::scoped_ptr<ThreadWrapper> pull_audio_thread_;
+  const rtc::scoped_ptr<EventWrapper> test_complete_;
   int send_count_;
   int insert_packet_count_;
   int pull_audio_count_ GUARDED_BY(crit_sect_);
-  const scoped_ptr<CriticalSectionWrapper> crit_sect_;
+  const rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
   int64_t next_insert_packet_time_ms_ GUARDED_BY(crit_sect_);
-  scoped_ptr<SimulatedClock> fake_clock_;
+  rtc::scoped_ptr<SimulatedClock> fake_clock_;
 };
 
 TEST_F(AudioCodingModuleMtTestOldApi, DoTest) {
@@ -675,7 +675,7 @@
   void Run(int output_freq_hz, const std::string& checksum_ref) {
     const std::string input_file_name =
         webrtc::test::ResourcePath("audio_coding/neteq_universal_new", "rtp");
-    scoped_ptr<test::RtpFileSource> packet_source(
+    rtc::scoped_ptr<test::RtpFileSource> packet_source(
         test::RtpFileSource::Create(input_file_name));
 #ifdef WEBRTC_ANDROID
     // Filter out iLBC and iSAC-swb since they are not supported on Android.
@@ -907,8 +907,8 @@
                                   codec_frame_size_rtp_timestamps));
   }
 
-  scoped_ptr<test::AcmSendTestOldApi> send_test_;
-  scoped_ptr<test::InputAudioFile> audio_source_;
+  rtc::scoped_ptr<test::AcmSendTestOldApi> send_test_;
+  rtc::scoped_ptr<test::InputAudioFile> audio_source_;
   uint32_t frame_size_rtp_timestamps_;
   int packet_count_;
   uint8_t payload_type_;
diff --git a/webrtc/modules/audio_coding/main/acm2/initial_delay_manager.h b/webrtc/modules/audio_coding/main/acm2/initial_delay_manager.h
index 6edc115..c6942ec 100644
--- a/webrtc/modules/audio_coding/main/acm2/initial_delay_manager.h
+++ b/webrtc/modules/audio_coding/main/acm2/initial_delay_manager.h
@@ -11,8 +11,8 @@
 #ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_INITIAL_DELAY_MANAGER_H_
 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_INITIAL_DELAY_MANAGER_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/interface/module_common_types.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
diff --git a/webrtc/modules/audio_coding/main/acm2/initial_delay_manager_unittest.cc b/webrtc/modules/audio_coding/main/acm2/initial_delay_manager_unittest.cc
index 6585946..e973593 100644
--- a/webrtc/modules/audio_coding/main/acm2/initial_delay_manager_unittest.cc
+++ b/webrtc/modules/audio_coding/main/acm2/initial_delay_manager_unittest.cc
@@ -78,7 +78,7 @@
     NextRtpHeader(rtp_info, rtp_receive_timestamp);
   }
 
-  scoped_ptr<InitialDelayManager> manager_;
+  rtc::scoped_ptr<InitialDelayManager> manager_;
   WebRtcRTPHeader rtp_info_;
   uint32_t rtp_receive_timestamp_;
 };
diff --git a/webrtc/modules/audio_coding/main/acm2/nack.h b/webrtc/modules/audio_coding/main/acm2/nack.h
index d74bb1f..4224c99 100644
--- a/webrtc/modules/audio_coding/main/acm2/nack.h
+++ b/webrtc/modules/audio_coding/main/acm2/nack.h
@@ -14,8 +14,8 @@
 #include <vector>
 #include <map>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module_typedefs.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/gtest_prod_util.h"
 
 //
diff --git a/webrtc/modules/audio_coding/main/acm2/nack_unittest.cc b/webrtc/modules/audio_coding/main/acm2/nack_unittest.cc
index c175908..c880e32 100644
--- a/webrtc/modules/audio_coding/main/acm2/nack_unittest.cc
+++ b/webrtc/modules/audio_coding/main/acm2/nack_unittest.cc
@@ -15,9 +15,9 @@
 #include <algorithm>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module_typedefs.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -58,7 +58,7 @@
 }  // namespace
 
 TEST(NackTest, EmptyListWhenNoPacketLoss) {
-  scoped_ptr<Nack> nack(Nack::Create(kNackThreshold));
+  rtc::scoped_ptr<Nack> nack(Nack::Create(kNackThreshold));
   nack->UpdateSampleRate(kSampleRateHz);
 
   int seq_num = 1;
@@ -76,7 +76,7 @@
 }
 
 TEST(NackTest, NoNackIfReorderWithinNackThreshold) {
-  scoped_ptr<Nack> nack(Nack::Create(kNackThreshold));
+  rtc::scoped_ptr<Nack> nack(Nack::Create(kNackThreshold));
   nack->UpdateSampleRate(kSampleRateHz);
 
   int seq_num = 1;
@@ -104,7 +104,7 @@
       sizeof(kSequenceNumberLostPackets[0]);
 
   for (int k = 0; k < 2; k++) {  // Two iteration with/without wrap around.
-    scoped_ptr<Nack> nack(Nack::Create(kNackThreshold));
+    rtc::scoped_ptr<Nack> nack(Nack::Create(kNackThreshold));
     nack->UpdateSampleRate(kSampleRateHz);
 
     uint16_t sequence_num_lost_packets[kNumAllLostPackets];
@@ -152,7 +152,7 @@
       sizeof(kSequenceNumberLostPackets[0]);
 
   for (int k = 0; k < 2; ++k) {  // Two iteration with/without wrap around.
-    scoped_ptr<Nack> nack(Nack::Create(kNackThreshold));
+    rtc::scoped_ptr<Nack> nack(Nack::Create(kNackThreshold));
     nack->UpdateSampleRate(kSampleRateHz);
 
     uint16_t sequence_num_lost_packets[kNumAllLostPackets];
@@ -215,7 +215,7 @@
 
 
   for (int k = 0; k < 4; ++k) {
-    scoped_ptr<Nack> nack(Nack::Create(kNackThreshold));
+    rtc::scoped_ptr<Nack> nack(Nack::Create(kNackThreshold));
     nack->UpdateSampleRate(kSampleRateHz);
 
     // Sequence number wrap around if |k| is 2 or 3;
@@ -286,7 +286,7 @@
 TEST(NackTest, MissingPacketsPriorToLastDecodedRtpShouldNotBeInNackList) {
   for (int m = 0; m < 2; ++m) {
     uint16_t seq_num_offset = (m == 0) ? 0 : 65531;  // Wrap around if |m| is 1.
-    scoped_ptr<Nack> nack(Nack::Create(kNackThreshold));
+    rtc::scoped_ptr<Nack> nack(Nack::Create(kNackThreshold));
     nack->UpdateSampleRate(kSampleRateHz);
 
     // Two consecutive packets to have a correct estimate of timestamp increase.
@@ -337,7 +337,7 @@
 }
 
 TEST(NackTest, Reset) {
-  scoped_ptr<Nack> nack(Nack::Create(kNackThreshold));
+  rtc::scoped_ptr<Nack> nack(Nack::Create(kNackThreshold));
   nack->UpdateSampleRate(kSampleRateHz);
 
   // Two consecutive packets to have a correct estimate of timestamp increase.
@@ -364,7 +364,7 @@
   const size_t kNackListSize = 10;
   for (int m = 0; m < 2; ++m) {
     uint16_t seq_num_offset = (m == 0) ? 0 : 65525;  // Wrap around if |m| is 1.
-    scoped_ptr<Nack> nack(Nack::Create(kNackThreshold));
+    rtc::scoped_ptr<Nack> nack(Nack::Create(kNackThreshold));
     nack->UpdateSampleRate(kSampleRateHz);
     nack->SetMaxNackListSize(kNackListSize);
 
@@ -388,7 +388,7 @@
   const size_t kNackListSize = 10;
   for (int m = 0; m < 2; ++m) {
     uint16_t seq_num_offset = (m == 0) ? 0 : 65525;  // Wrap around if |m| is 1.
-    scoped_ptr<Nack> nack(Nack::Create(kNackThreshold));
+    rtc::scoped_ptr<Nack> nack(Nack::Create(kNackThreshold));
     nack->UpdateSampleRate(kSampleRateHz);
 
     uint16_t seq_num = seq_num_offset;
@@ -398,7 +398,7 @@
     // Packet lost more than NACK-list size limit.
     uint16_t num_lost_packets = kNackThreshold + kNackListSize + 5;
 
-    scoped_ptr<uint16_t[]> seq_num_lost(new uint16_t[num_lost_packets]);
+    rtc::scoped_ptr<uint16_t[]> seq_num_lost(new uint16_t[num_lost_packets]);
     for (int n = 0; n < num_lost_packets; ++n) {
       seq_num_lost[n] = ++seq_num;
     }
@@ -454,7 +454,7 @@
 
 TEST(NackTest, RoudTripTimeIsApplied) {
   const int kNackListSize = 200;
-  scoped_ptr<Nack> nack(Nack::Create(kNackThreshold));
+  rtc::scoped_ptr<Nack> nack(Nack::Create(kNackThreshold));
   nack->UpdateSampleRate(kSampleRateHz);
   nack->SetMaxNackListSize(kNackListSize);
 
diff --git a/webrtc/modules/audio_coding/main/test/APITest.h b/webrtc/modules/audio_coding/main/test/APITest.h
index 3b2d4af..7ad51a6 100644
--- a/webrtc/modules/audio_coding/main/test/APITest.h
+++ b/webrtc/modules/audio_coding/main/test/APITest.h
@@ -11,6 +11,7 @@
 #ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_APITEST_H_
 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_APITEST_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
 #include "webrtc/modules/audio_coding/main/test/ACMTest.h"
 #include "webrtc/modules/audio_coding/main/test/Channel.h"
@@ -18,7 +19,6 @@
 #include "webrtc/modules/audio_coding/main/test/utility.h"
 #include "webrtc/system_wrappers/interface/event_wrapper.h"
 #include "webrtc/system_wrappers/interface/rw_lock_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -82,8 +82,8 @@
   bool APIRunB();
 
   //--- ACMs
-  scoped_ptr<AudioCodingModule> _acmA;
-  scoped_ptr<AudioCodingModule> _acmB;
+  rtc::scoped_ptr<AudioCodingModule> _acmA;
+  rtc::scoped_ptr<AudioCodingModule> _acmB;
 
   //--- Channels
   Channel* _channel_A2B;
diff --git a/webrtc/modules/audio_coding/main/test/EncodeDecodeTest.cc b/webrtc/modules/audio_coding/main/test/EncodeDecodeTest.cc
index 27f5500..eff458b 100644
--- a/webrtc/modules/audio_coding/main/test/EncodeDecodeTest.cc
+++ b/webrtc/modules/audio_coding/main/test/EncodeDecodeTest.cc
@@ -15,11 +15,11 @@
 #include <stdlib.h>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
 #include "webrtc/modules/audio_coding/main/acm2/acm_common_defs.h"
 #include "webrtc/modules/audio_coding/main/test/utility.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/trace.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
@@ -276,7 +276,7 @@
   codePars[1] = 0;
   codePars[2] = 0;
 
-  scoped_ptr<AudioCodingModule> acm(AudioCodingModule::Create(0));
+  rtc::scoped_ptr<AudioCodingModule> acm(AudioCodingModule::Create(0));
   struct CodecInst sendCodecTmp;
   numCodecs = acm->NumberOfCodecs();
 
@@ -332,7 +332,7 @@
                                            int codeId,
                                            int* codePars,
                                            int testMode) {
-  scoped_ptr<AudioCodingModule> acm(AudioCodingModule::Create(1));
+  rtc::scoped_ptr<AudioCodingModule> acm(AudioCodingModule::Create(1));
   RTPFile rtpFile;
   std::string fileName = webrtc::test::TempFilename(webrtc::test::OutputPath(),
                                                     "encode_decode_rtp");
diff --git a/webrtc/modules/audio_coding/main/test/PacketLossTest.cc b/webrtc/modules/audio_coding/main/test/PacketLossTest.cc
index 9fec486..f19d491 100644
--- a/webrtc/modules/audio_coding/main/test/PacketLossTest.cc
+++ b/webrtc/modules/audio_coding/main/test/PacketLossTest.cc
@@ -126,7 +126,7 @@
 #ifndef WEBRTC_CODEC_OPUS
   return;
 #else
-  scoped_ptr<AudioCodingModule> acm(AudioCodingModule::Create(0));
+  rtc::scoped_ptr<AudioCodingModule> acm(AudioCodingModule::Create(0));
 
   int codec_id = acm->Codec("opus", 48000, channels_);
 
diff --git a/webrtc/modules/audio_coding/main/test/PacketLossTest.h b/webrtc/modules/audio_coding/main/test/PacketLossTest.h
index e34da8c..70fa9ff 100644
--- a/webrtc/modules/audio_coding/main/test/PacketLossTest.h
+++ b/webrtc/modules/audio_coding/main/test/PacketLossTest.h
@@ -12,8 +12,8 @@
 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_PACKETLOSSTEST_H_
 
 #include <string>
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/main/test/EncodeDecodeTest.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -54,8 +54,8 @@
   int channels_;
   std::string in_file_name_;
   int sample_rate_hz_;
-  scoped_ptr<SenderWithFEC> sender_;
-  scoped_ptr<ReceiverWithPacketLoss> receiver_;
+  rtc::scoped_ptr<SenderWithFEC> sender_;
+  rtc::scoped_ptr<ReceiverWithPacketLoss> receiver_;
   int expected_loss_rate_;
   int actual_loss_rate_;
   int burst_length_;
diff --git a/webrtc/modules/audio_coding/main/test/SpatialAudio.h b/webrtc/modules/audio_coding/main/test/SpatialAudio.h
index 907d690..f5e127f 100644
--- a/webrtc/modules/audio_coding/main/test/SpatialAudio.h
+++ b/webrtc/modules/audio_coding/main/test/SpatialAudio.h
@@ -11,12 +11,12 @@
 #ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_SPATIALAUDIO_H_
 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_SPATIALAUDIO_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
 #include "webrtc/modules/audio_coding/main/test/ACMTest.h"
 #include "webrtc/modules/audio_coding/main/test/Channel.h"
 #include "webrtc/modules/audio_coding/main/test/PCMFile.h"
 #include "webrtc/modules/audio_coding/main/test/utility.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 #define MAX_FILE_NAME_LENGTH_BYTE 500
 
@@ -33,9 +33,9 @@
   void EncodeDecode(double leftPanning, double rightPanning);
   void EncodeDecode();
 
-  scoped_ptr<AudioCodingModule> _acmLeft;
-  scoped_ptr<AudioCodingModule> _acmRight;
-  scoped_ptr<AudioCodingModule> _acmReceiver;
+  rtc::scoped_ptr<AudioCodingModule> _acmLeft;
+  rtc::scoped_ptr<AudioCodingModule> _acmRight;
+  rtc::scoped_ptr<AudioCodingModule> _acmReceiver;
   Channel* _channel;
   PCMFile _inFile;
   PCMFile _outFile;
diff --git a/webrtc/modules/audio_coding/main/test/TestAllCodecs.h b/webrtc/modules/audio_coding/main/test/TestAllCodecs.h
index 42d65a1..4292d77 100644
--- a/webrtc/modules/audio_coding/main/test/TestAllCodecs.h
+++ b/webrtc/modules/audio_coding/main/test/TestAllCodecs.h
@@ -11,10 +11,10 @@
 #ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TESTALLCODECS_H_
 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TESTALLCODECS_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/main/test/ACMTest.h"
 #include "webrtc/modules/audio_coding/main/test/Channel.h"
 #include "webrtc/modules/audio_coding/main/test/PCMFile.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -70,8 +70,8 @@
   void DisplaySendReceiveCodec();
 
   int test_mode_;
-  scoped_ptr<AudioCodingModule> acm_a_;
-  scoped_ptr<AudioCodingModule> acm_b_;
+  rtc::scoped_ptr<AudioCodingModule> acm_a_;
+  rtc::scoped_ptr<AudioCodingModule> acm_b_;
   TestPack* channel_a_to_b_;
   PCMFile infile_a_;
   PCMFile outfile_b_;
diff --git a/webrtc/modules/audio_coding/main/test/TestRedFec.h b/webrtc/modules/audio_coding/main/test/TestRedFec.h
index 30ced1e..57d9fe9 100644
--- a/webrtc/modules/audio_coding/main/test/TestRedFec.h
+++ b/webrtc/modules/audio_coding/main/test/TestRedFec.h
@@ -12,10 +12,10 @@
 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_TESTREDFEC_H_
 
 #include <string>
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/main/test/ACMTest.h"
 #include "webrtc/modules/audio_coding/main/test/Channel.h"
 #include "webrtc/modules/audio_coding/main/test/PCMFile.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -36,8 +36,8 @@
   void Run();
   void OpenOutFile(int16_t testNumber);
   int32_t SetVAD(bool enableDTX, bool enableVAD, ACMVADMode vadMode);
-  scoped_ptr<AudioCodingModule> _acmA;
-  scoped_ptr<AudioCodingModule> _acmB;
+  rtc::scoped_ptr<AudioCodingModule> _acmA;
+  rtc::scoped_ptr<AudioCodingModule> _acmB;
 
   Channel* _channelA2B;
 
diff --git a/webrtc/modules/audio_coding/main/test/TestStereo.h b/webrtc/modules/audio_coding/main/test/TestStereo.h
index 3afc349..89914cc 100644
--- a/webrtc/modules/audio_coding/main/test/TestStereo.h
+++ b/webrtc/modules/audio_coding/main/test/TestStereo.h
@@ -13,7 +13,7 @@
 
 #include <math.h>
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/main/test/ACMTest.h"
 #include "webrtc/modules/audio_coding/main/test/Channel.h"
 #include "webrtc/modules/audio_coding/main/test/PCMFile.h"
@@ -82,8 +82,8 @@
 
   int test_mode_;
 
-  scoped_ptr<AudioCodingModule> acm_a_;
-  scoped_ptr<AudioCodingModule> acm_b_;
+  rtc::scoped_ptr<AudioCodingModule> acm_a_;
+  rtc::scoped_ptr<AudioCodingModule> acm_b_;
 
   TestPackStereo* channel_a2b_;
 
diff --git a/webrtc/modules/audio_coding/main/test/TestVADDTX.h b/webrtc/modules/audio_coding/main/test/TestVADDTX.h
index f8c97e1..5e832e4 100644
--- a/webrtc/modules/audio_coding/main/test/TestVADDTX.h
+++ b/webrtc/modules/audio_coding/main/test/TestVADDTX.h
@@ -11,10 +11,10 @@
 #ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TESTVADDTX_H_
 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TESTVADDTX_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/main/test/ACMTest.h"
 #include "webrtc/modules/audio_coding/main/test/Channel.h"
 #include "webrtc/modules/audio_coding/main/test/PCMFile.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -65,8 +65,8 @@
   void SetVAD(bool statusDTX, bool statusVAD, int16_t vadMode);
   VADDTXstruct GetVAD();
   int16_t VerifyTest();
-  scoped_ptr<AudioCodingModule> _acmA;
-  scoped_ptr<AudioCodingModule> _acmB;
+  rtc::scoped_ptr<AudioCodingModule> _acmA;
+  rtc::scoped_ptr<AudioCodingModule> _acmB;
 
   Channel* _channelA2B;
 
diff --git a/webrtc/modules/audio_coding/main/test/TwoWayCommunication.cc b/webrtc/modules/audio_coding/main/test/TwoWayCommunication.cc
index b5592d0..cc0fc20 100644
--- a/webrtc/modules/audio_coding/main/test/TwoWayCommunication.cc
+++ b/webrtc/modules/audio_coding/main/test/TwoWayCommunication.cc
@@ -60,7 +60,7 @@
 
 void TwoWayCommunication::ChooseCodec(uint8_t* codecID_A,
                                       uint8_t* codecID_B) {
-  scoped_ptr<AudioCodingModule> tmpACM(AudioCodingModule::Create(0));
+  rtc::scoped_ptr<AudioCodingModule> tmpACM(AudioCodingModule::Create(0));
   uint8_t noCodec = tmpACM->NumberOfCodecs();
   CodecInst codecInst;
   printf("List of Supported Codecs\n");
diff --git a/webrtc/modules/audio_coding/main/test/TwoWayCommunication.h b/webrtc/modules/audio_coding/main/test/TwoWayCommunication.h
index 9e0b724..e591bba 100644
--- a/webrtc/modules/audio_coding/main/test/TwoWayCommunication.h
+++ b/webrtc/modules/audio_coding/main/test/TwoWayCommunication.h
@@ -11,12 +11,12 @@
 #ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TWOWAYCOMMUNICATION_H_
 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TWOWAYCOMMUNICATION_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
 #include "webrtc/modules/audio_coding/main/test/ACMTest.h"
 #include "webrtc/modules/audio_coding/main/test/Channel.h"
 #include "webrtc/modules/audio_coding/main/test/PCMFile.h"
 #include "webrtc/modules/audio_coding/main/test/utility.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -31,11 +31,11 @@
   void SetUp();
   void SetUpAutotest();
 
-  scoped_ptr<AudioCodingModule> _acmA;
-  scoped_ptr<AudioCodingModule> _acmB;
+  rtc::scoped_ptr<AudioCodingModule> _acmA;
+  rtc::scoped_ptr<AudioCodingModule> _acmB;
 
-  scoped_ptr<AudioCodingModule> _acmRefA;
-  scoped_ptr<AudioCodingModule> _acmRefB;
+  rtc::scoped_ptr<AudioCodingModule> _acmRefA;
+  rtc::scoped_ptr<AudioCodingModule> _acmRefB;
 
   Channel* _channel_A2B;
   Channel* _channel_B2A;
diff --git a/webrtc/modules/audio_coding/main/test/delay_test.cc b/webrtc/modules/audio_coding/main/test/delay_test.cc
index dbebe38..55dfd93 100644
--- a/webrtc/modules/audio_coding/main/test/delay_test.cc
+++ b/webrtc/modules/audio_coding/main/test/delay_test.cc
@@ -15,6 +15,7 @@
 
 #include "gflags/gflags.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common.h"
 #include "webrtc/common_types.h"
 #include "webrtc/engine_configurations.h"
@@ -25,7 +26,6 @@
 #include "webrtc/modules/audio_coding/main/test/PCMFile.h"
 #include "webrtc/modules/audio_coding/main/test/utility.h"
 #include "webrtc/system_wrappers/interface/event_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
 DEFINE_string(codec, "isac", "Codec Name");
@@ -229,8 +229,8 @@
     out_file_b_.Close();
   }
 
-  scoped_ptr<AudioCodingModule> acm_a_;
-  scoped_ptr<AudioCodingModule> acm_b_;
+  rtc::scoped_ptr<AudioCodingModule> acm_a_;
+  rtc::scoped_ptr<AudioCodingModule> acm_b_;
 
   Channel* channel_a2b_;
 
diff --git a/webrtc/modules/audio_coding/main/test/iSACTest.h b/webrtc/modules/audio_coding/main/test/iSACTest.h
index 9fe6aff..f4223f7 100644
--- a/webrtc/modules/audio_coding/main/test/iSACTest.h
+++ b/webrtc/modules/audio_coding/main/test/iSACTest.h
@@ -13,13 +13,13 @@
 
 #include <string.h>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
 #include "webrtc/modules/audio_coding/main/test/ACMTest.h"
 #include "webrtc/modules/audio_coding/main/test/Channel.h"
 #include "webrtc/modules/audio_coding/main/test/PCMFile.h"
 #include "webrtc/modules/audio_coding/main/test/utility.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 #define MAX_FILE_NAME_LENGTH_BYTE 500
 #define NO_OF_CLIENTS             15
@@ -53,11 +53,11 @@
 
   void SwitchingSamplingRate(int testNr, int maxSampRateChange);
 
-  scoped_ptr<AudioCodingModule> _acmA;
-  scoped_ptr<AudioCodingModule> _acmB;
+  rtc::scoped_ptr<AudioCodingModule> _acmA;
+  rtc::scoped_ptr<AudioCodingModule> _acmB;
 
-  scoped_ptr<Channel> _channel_A2B;
-  scoped_ptr<Channel> _channel_B2A;
+  rtc::scoped_ptr<Channel> _channel_A2B;
+  rtc::scoped_ptr<Channel> _channel_B2A;
 
   PCMFile _inFileA;
   PCMFile _inFileB;
diff --git a/webrtc/modules/audio_coding/main/test/initial_delay_unittest.cc b/webrtc/modules/audio_coding/main/test/initial_delay_unittest.cc
index 0b7aad1..de87b51 100644
--- a/webrtc/modules/audio_coding/main/test/initial_delay_unittest.cc
+++ b/webrtc/modules/audio_coding/main/test/initial_delay_unittest.cc
@@ -16,6 +16,7 @@
 #include <iostream>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
 #include "webrtc/engine_configurations.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module_typedefs.h"
@@ -23,7 +24,6 @@
 #include "webrtc/modules/audio_coding/main/test/PCMFile.h"
 #include "webrtc/modules/audio_coding/main/test/utility.h"
 #include "webrtc/system_wrappers/interface/event_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/test/testsupport/gtest_disable.h"
 
@@ -156,8 +156,8 @@
     ASSERT_LE(num_frames * 10, initial_delay_ms + 100);
   }
 
-  scoped_ptr<AudioCodingModule> acm_a_;
-  scoped_ptr<AudioCodingModule> acm_b_;
+  rtc::scoped_ptr<AudioCodingModule> acm_a_;
+  rtc::scoped_ptr<AudioCodingModule> acm_b_;
   Channel* channel_a2b_;
 };
 
diff --git a/webrtc/modules/audio_coding/main/test/insert_packet_with_timing.cc b/webrtc/modules/audio_coding/main/test/insert_packet_with_timing.cc
index 64dc608..94b093d 100644
--- a/webrtc/modules/audio_coding/main/test/insert_packet_with_timing.cc
+++ b/webrtc/modules/audio_coding/main/test/insert_packet_with_timing.cc
@@ -12,13 +12,13 @@
 
 #include "gflags/gflags.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
 #include "webrtc/modules/audio_coding/main/test/Channel.h"
 #include "webrtc/modules/audio_coding/main/test/PCMFile.h"
 #include "webrtc/modules/interface/module_common_types.h"
 #include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
 // Codec.
@@ -249,8 +249,8 @@
   SimulatedClock* sender_clock_;
   SimulatedClock* receiver_clock_;
 
-  scoped_ptr<AudioCodingModule> send_acm_;
-  scoped_ptr<AudioCodingModule> receive_acm_;
+  rtc::scoped_ptr<AudioCodingModule> send_acm_;
+  rtc::scoped_ptr<AudioCodingModule> receive_acm_;
   Channel* channel_;
 
   FILE* seq_num_fid_;  // Input (text), one sequence number per line.
diff --git a/webrtc/modules/audio_coding/main/test/opus_test.h b/webrtc/modules/audio_coding/main/test/opus_test.h
index 227a5cd..4c3d8c1 100644
--- a/webrtc/modules/audio_coding/main/test/opus_test.h
+++ b/webrtc/modules/audio_coding/main/test/opus_test.h
@@ -13,12 +13,12 @@
 
 #include <math.h>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/main/acm2/acm_resampler.h"
 #include "webrtc/modules/audio_coding/main/test/ACMTest.h"
 #include "webrtc/modules/audio_coding/main/test/Channel.h"
 #include "webrtc/modules/audio_coding/main/test/PCMFile.h"
 #include "webrtc/modules/audio_coding/main/test/TestStereo.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -35,7 +35,7 @@
 
   void OpenOutFile(int test_number);
 
-  scoped_ptr<AudioCodingModule> acm_receiver_;
+  rtc::scoped_ptr<AudioCodingModule> acm_receiver_;
   TestPackStereo* channel_a2b_;
   PCMFile in_file_stereo_;
   PCMFile in_file_mono_;
diff --git a/webrtc/modules/audio_coding/main/test/target_delay_unittest.cc b/webrtc/modules/audio_coding/main/test/target_delay_unittest.cc
index 629e1b5..f1c4382 100644
--- a/webrtc/modules/audio_coding/main/test/target_delay_unittest.cc
+++ b/webrtc/modules/audio_coding/main/test/target_delay_unittest.cc
@@ -9,12 +9,12 @@
  */
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
 #include "webrtc/modules/audio_coding/codecs/pcm16b/include/pcm16b.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
 #include "webrtc/modules/audio_coding/main/test/utility.h"
 #include "webrtc/modules/interface/module_common_types.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/sleep.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/test/testsupport/gtest_disable.h"
@@ -194,7 +194,7 @@
     return acm_->LeastRequiredDelayMs();
   }
 
-  scoped_ptr<AudioCodingModule> acm_;
+  rtc::scoped_ptr<AudioCodingModule> acm_;
   WebRtcRTPHeader rtp_info_;
   uint8_t payload_[kPayloadLenBytes];
 };
diff --git a/webrtc/modules/audio_coding/neteq/audio_classifier.h b/webrtc/modules/audio_coding/neteq/audio_classifier.h
index 7bf8513..2812ea2 100644
--- a/webrtc/modules/audio_coding/neteq/audio_classifier.h
+++ b/webrtc/modules/audio_coding/neteq/audio_classifier.h
@@ -17,7 +17,7 @@
 #include "opus_private.h"
 }
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
diff --git a/webrtc/modules/audio_coding/neteq/audio_classifier_unittest.cc b/webrtc/modules/audio_coding/neteq/audio_classifier_unittest.cc
index 530044e..e4db3a3 100644
--- a/webrtc/modules/audio_coding/neteq/audio_classifier_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/audio_classifier_unittest.cc
@@ -39,7 +39,7 @@
                      const std::string& data_filename,
                      size_t channels) {
   AudioClassifier classifier;
-  scoped_ptr<int16_t[]> in(new int16_t[channels * kFrameSize]);
+  rtc::scoped_ptr<int16_t[]> in(new int16_t[channels * kFrameSize]);
   bool is_music_ref;
 
   FILE* audio_file = fopen(audio_filename.c_str(), "rb");
diff --git a/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc b/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc
index 1f0e881..4c326cc 100644
--- a/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc
@@ -17,6 +17,7 @@
 #include <vector>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/codecs/g711/include/audio_encoder_pcm.h"
 #include "webrtc/modules/audio_coding/codecs/g722/include/audio_encoder_g722.h"
 #include "webrtc/modules/audio_coding/codecs/ilbc/interface/audio_encoder_ilbc.h"
@@ -26,7 +27,6 @@
 #include "webrtc/modules/audio_coding/codecs/pcm16b/include/audio_encoder_pcm16b.h"
 #include "webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.h"
 #include "webrtc/system_wrappers/interface/data_log.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
 namespace webrtc {
@@ -139,7 +139,7 @@
     const size_t samples_per_10ms = audio_encoder_->SampleRateHz() / 100;
     CHECK_EQ(samples_per_10ms * audio_encoder_->Num10MsFramesInNextPacket(),
              input_len_samples);
-    scoped_ptr<int16_t[]> interleaved_input(
+    rtc::scoped_ptr<int16_t[]> interleaved_input(
         new int16_t[channels_ * samples_per_10ms]);
     for (int i = 0; i < audio_encoder_->Num10MsFramesInNextPacket(); ++i) {
       EXPECT_EQ(0u, encoded_info_.encoded_bytes);
@@ -213,21 +213,21 @@
   // decode. Verifies that the decoded result is the same.
   void ReInitTest() {
     InitEncoder();
-    scoped_ptr<int16_t[]> input(new int16_t[frame_size_]);
+    rtc::scoped_ptr<int16_t[]> input(new int16_t[frame_size_]);
     ASSERT_TRUE(
         input_audio_.Read(frame_size_, codec_input_rate_hz_, input.get()));
     size_t enc_len = EncodeFrame(input.get(), frame_size_, encoded_);
     size_t dec_len;
     AudioDecoder::SpeechType speech_type1, speech_type2;
     EXPECT_EQ(0, decoder_->Init());
-    scoped_ptr<int16_t[]> output1(new int16_t[frame_size_ * channels_]);
+    rtc::scoped_ptr<int16_t[]> output1(new int16_t[frame_size_ * channels_]);
     dec_len = decoder_->Decode(encoded_, enc_len, codec_input_rate_hz_,
                                output1.get(), &speech_type1);
     ASSERT_LE(dec_len, frame_size_ * channels_);
     EXPECT_EQ(frame_size_ * channels_, dec_len);
     // Re-init decoder and decode again.
     EXPECT_EQ(0, decoder_->Init());
-    scoped_ptr<int16_t[]> output2(new int16_t[frame_size_ * channels_]);
+    rtc::scoped_ptr<int16_t[]> output2(new int16_t[frame_size_ * channels_]);
     dec_len = decoder_->Decode(encoded_, enc_len, codec_input_rate_hz_,
                                output2.get(), &speech_type2);
     ASSERT_LE(dec_len, frame_size_ * channels_);
@@ -241,13 +241,13 @@
   // Call DecodePlc and verify that the correct number of samples is produced.
   void DecodePlcTest() {
     InitEncoder();
-    scoped_ptr<int16_t[]> input(new int16_t[frame_size_]);
+    rtc::scoped_ptr<int16_t[]> input(new int16_t[frame_size_]);
     ASSERT_TRUE(
         input_audio_.Read(frame_size_, codec_input_rate_hz_, input.get()));
     size_t enc_len = EncodeFrame(input.get(), frame_size_, encoded_);
     AudioDecoder::SpeechType speech_type;
     EXPECT_EQ(0, decoder_->Init());
-    scoped_ptr<int16_t[]> output(new int16_t[frame_size_ * channels_]);
+    rtc::scoped_ptr<int16_t[]> output(new int16_t[frame_size_ * channels_]);
     size_t dec_len = decoder_->Decode(encoded_, enc_len, codec_input_rate_hz_,
                                       output.get(), &speech_type);
     EXPECT_EQ(frame_size_ * channels_, dec_len);
@@ -268,7 +268,7 @@
   const int payload_type_;
   AudioEncoder::EncodedInfo encoded_info_;
   AudioDecoder* decoder_;
-  scoped_ptr<AudioEncoder> audio_encoder_;
+  rtc::scoped_ptr<AudioEncoder> audio_encoder_;
 };
 
 class AudioDecoderPcmUTest : public AudioDecoderTest {
@@ -332,13 +332,13 @@
   // not return any data. It simply resets a few states and returns 0.
   void DecodePlcTest() {
     InitEncoder();
-    scoped_ptr<int16_t[]> input(new int16_t[frame_size_]);
+    rtc::scoped_ptr<int16_t[]> input(new int16_t[frame_size_]);
     ASSERT_TRUE(
         input_audio_.Read(frame_size_, codec_input_rate_hz_, input.get()));
     size_t enc_len = EncodeFrame(input.get(), frame_size_, encoded_);
     AudioDecoder::SpeechType speech_type;
     EXPECT_EQ(0, decoder_->Init());
-    scoped_ptr<int16_t[]> output(new int16_t[frame_size_ * channels_]);
+    rtc::scoped_ptr<int16_t[]> output(new int16_t[frame_size_ * channels_]);
     size_t dec_len = decoder_->Decode(encoded_, enc_len, codec_input_rate_hz_,
                                       output.get(), &speech_type);
     EXPECT_EQ(frame_size_, dec_len);
diff --git a/webrtc/modules/audio_coding/neteq/audio_vector.cc b/webrtc/modules/audio_coding/neteq/audio_vector.cc
index ef24ea2..d0f1aca 100644
--- a/webrtc/modules/audio_coding/neteq/audio_vector.cc
+++ b/webrtc/modules/audio_coding/neteq/audio_vector.cc
@@ -155,7 +155,7 @@
 
 void AudioVector::Reserve(size_t n) {
   if (capacity_ < n) {
-    scoped_ptr<int16_t[]> temp_array(new int16_t[n]);
+    rtc::scoped_ptr<int16_t[]> temp_array(new int16_t[n]);
     memcpy(temp_array.get(), array_.get(), Size() * sizeof(int16_t));
     array_.swap(temp_array);
     capacity_ = n;
diff --git a/webrtc/modules/audio_coding/neteq/audio_vector.h b/webrtc/modules/audio_coding/neteq/audio_vector.h
index 3e025a4..28e53ee 100644
--- a/webrtc/modules/audio_coding/neteq/audio_vector.h
+++ b/webrtc/modules/audio_coding/neteq/audio_vector.h
@@ -14,7 +14,7 @@
 #include <string.h>  // Access to size_t.
 
 #include "webrtc/base/constructormagic.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -108,7 +108,7 @@
 
   void Reserve(size_t n);
 
-  scoped_ptr<int16_t[]> array_;
+  rtc::scoped_ptr<int16_t[]> array_;
   size_t first_free_ix_;  // The first index after the last sample in array_.
                           // Note that this index may point outside of array_.
   size_t capacity_;  // Allocated number of samples in the array.
diff --git a/webrtc/modules/audio_coding/neteq/background_noise.h b/webrtc/modules/audio_coding/neteq/background_noise.h
index 5c9f39b..fd4e6a5 100644
--- a/webrtc/modules/audio_coding/neteq/background_noise.h
+++ b/webrtc/modules/audio_coding/neteq/background_noise.h
@@ -14,9 +14,9 @@
 #include <string.h>  // size_t
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h"
 #include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -126,7 +126,7 @@
                       int32_t residual_energy);
 
   size_t num_channels_;
-  scoped_ptr<ChannelParameters[]> channel_parameters_;
+  rtc::scoped_ptr<ChannelParameters[]> channel_parameters_;
   bool initialized_;
   NetEq::BackgroundNoiseMode mode_;
 
diff --git a/webrtc/modules/audio_coding/neteq/expand.h b/webrtc/modules/audio_coding/neteq/expand.h
index 1acf951..7b41114 100644
--- a/webrtc/modules/audio_coding/neteq/expand.h
+++ b/webrtc/modules/audio_coding/neteq/expand.h
@@ -14,8 +14,8 @@
 #include <assert.h>
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -167,7 +167,7 @@
   int lag_index_direction_;
   int current_lag_index_;
   bool stop_muting_;
-  scoped_ptr<ChannelParameters[]> channel_parameters_;
+  rtc::scoped_ptr<ChannelParameters[]> channel_parameters_;
 
   DISALLOW_COPY_AND_ASSIGN(Expand);
 };
diff --git a/webrtc/modules/audio_coding/neteq/merge.cc b/webrtc/modules/audio_coding/neteq/merge.cc
index d3d8077..bc22000 100644
--- a/webrtc/modules/audio_coding/neteq/merge.cc
+++ b/webrtc/modules/audio_coding/neteq/merge.cc
@@ -15,12 +15,12 @@
 
 #include <algorithm>  // min, max
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
 #include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h"
 #include "webrtc/modules/audio_coding/neteq/dsp_helper.h"
 #include "webrtc/modules/audio_coding/neteq/expand.h"
 #include "webrtc/modules/audio_coding/neteq/sync_buffer.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -310,7 +310,8 @@
   // Normalize correlation to 14 bits and copy to a 16-bit array.
   const int pad_length = static_cast<int>(expand_->overlap_length() - 1);
   const int correlation_buffer_size = 2 * pad_length + kMaxCorrelationLength;
-  scoped_ptr<int16_t[]> correlation16(new int16_t[correlation_buffer_size]);
+  rtc::scoped_ptr<int16_t[]> correlation16(
+      new int16_t[correlation_buffer_size]);
   memset(correlation16.get(), 0, correlation_buffer_size * sizeof(int16_t));
   int16_t* correlation_ptr = &correlation16[pad_length];
   int32_t max_correlation = WebRtcSpl_MaxAbsValueW32(correlation,
diff --git a/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc
index 0449044..8a382e9 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc
@@ -11,11 +11,11 @@
 // Test to verify correct operation for externally created decoders.
 
 #include "testing/gmock/include/gmock/gmock.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/neteq/mock/mock_external_decoder_pcm16b.h"
 #include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h"
 #include "webrtc/modules/audio_coding/neteq/tools/neteq_external_decoder_test.h"
 #include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
 namespace webrtc {
@@ -148,16 +148,16 @@
 
   int samples_per_ms() const { return samples_per_ms_; }
  private:
-  scoped_ptr<MockExternalPcm16B> external_decoder_;
+  rtc::scoped_ptr<MockExternalPcm16B> external_decoder_;
   int samples_per_ms_;
   size_t frame_size_samples_;
-  scoped_ptr<test::RtpGenerator> rtp_generator_;
+  rtc::scoped_ptr<test::RtpGenerator> rtp_generator_;
   int16_t* input_;
   uint8_t* encoded_;
   size_t payload_size_bytes_;
   uint32_t last_send_time_;
   uint32_t last_arrival_time_;
-  scoped_ptr<test::InputAudioFile> input_file_;
+  rtc::scoped_ptr<test::InputAudioFile> input_file_;
   WebRtcRTPHeader rtp_header_;
 };
 
@@ -228,7 +228,7 @@
 
  private:
   int sample_rate_hz_;
-  scoped_ptr<NetEq> neteq_internal_;
+  rtc::scoped_ptr<NetEq> neteq_internal_;
   int16_t output_internal_[kMaxBlockSize];
   int16_t output_[kMaxBlockSize];
 };
diff --git a/webrtc/modules/audio_coding/neteq/neteq_impl.h b/webrtc/modules/audio_coding/neteq/neteq_impl.h
index fa96512..b82b43e 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_impl.h
+++ b/webrtc/modules/audio_coding/neteq/neteq_impl.h
@@ -14,6 +14,7 @@
 #include <vector>
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h"
 #include "webrtc/modules/audio_coding/neteq/defines.h"
@@ -22,7 +23,6 @@
 #include "webrtc/modules/audio_coding/neteq/random_vector.h"
 #include "webrtc/modules/audio_coding/neteq/rtcp.h"
 #include "webrtc/modules/audio_coding/neteq/statistics_calculator.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -334,37 +334,40 @@
   // Creates DecisionLogic object with the mode given by |playout_mode_|.
   virtual void CreateDecisionLogic() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
 
-  const scoped_ptr<CriticalSectionWrapper> crit_sect_;
-  const scoped_ptr<BufferLevelFilter> buffer_level_filter_
+  const rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
+  const rtc::scoped_ptr<BufferLevelFilter> buffer_level_filter_
       GUARDED_BY(crit_sect_);
-  const scoped_ptr<DecoderDatabase> decoder_database_ GUARDED_BY(crit_sect_);
-  const scoped_ptr<DelayManager> delay_manager_ GUARDED_BY(crit_sect_);
-  const scoped_ptr<DelayPeakDetector> delay_peak_detector_
+  const rtc::scoped_ptr<DecoderDatabase> decoder_database_
       GUARDED_BY(crit_sect_);
-  const scoped_ptr<DtmfBuffer> dtmf_buffer_ GUARDED_BY(crit_sect_);
-  const scoped_ptr<DtmfToneGenerator> dtmf_tone_generator_
+  const rtc::scoped_ptr<DelayManager> delay_manager_ GUARDED_BY(crit_sect_);
+  const rtc::scoped_ptr<DelayPeakDetector> delay_peak_detector_
       GUARDED_BY(crit_sect_);
-  const scoped_ptr<PacketBuffer> packet_buffer_ GUARDED_BY(crit_sect_);
-  const scoped_ptr<PayloadSplitter> payload_splitter_ GUARDED_BY(crit_sect_);
-  const scoped_ptr<TimestampScaler> timestamp_scaler_ GUARDED_BY(crit_sect_);
-  const scoped_ptr<PostDecodeVad> vad_ GUARDED_BY(crit_sect_);
-  const scoped_ptr<ExpandFactory> expand_factory_ GUARDED_BY(crit_sect_);
-  const scoped_ptr<AccelerateFactory> accelerate_factory_
+  const rtc::scoped_ptr<DtmfBuffer> dtmf_buffer_ GUARDED_BY(crit_sect_);
+  const rtc::scoped_ptr<DtmfToneGenerator> dtmf_tone_generator_
       GUARDED_BY(crit_sect_);
-  const scoped_ptr<PreemptiveExpandFactory> preemptive_expand_factory_
+  const rtc::scoped_ptr<PacketBuffer> packet_buffer_ GUARDED_BY(crit_sect_);
+  const rtc::scoped_ptr<PayloadSplitter> payload_splitter_
+      GUARDED_BY(crit_sect_);
+  const rtc::scoped_ptr<TimestampScaler> timestamp_scaler_
+      GUARDED_BY(crit_sect_);
+  const rtc::scoped_ptr<PostDecodeVad> vad_ GUARDED_BY(crit_sect_);
+  const rtc::scoped_ptr<ExpandFactory> expand_factory_ GUARDED_BY(crit_sect_);
+  const rtc::scoped_ptr<AccelerateFactory> accelerate_factory_
+      GUARDED_BY(crit_sect_);
+  const rtc::scoped_ptr<PreemptiveExpandFactory> preemptive_expand_factory_
       GUARDED_BY(crit_sect_);
 
-  scoped_ptr<BackgroundNoise> background_noise_ GUARDED_BY(crit_sect_);
-  scoped_ptr<DecisionLogic> decision_logic_ GUARDED_BY(crit_sect_);
-  scoped_ptr<AudioMultiVector> algorithm_buffer_ GUARDED_BY(crit_sect_);
-  scoped_ptr<SyncBuffer> sync_buffer_ GUARDED_BY(crit_sect_);
-  scoped_ptr<Expand> expand_ GUARDED_BY(crit_sect_);
-  scoped_ptr<Normal> normal_ GUARDED_BY(crit_sect_);
-  scoped_ptr<Merge> merge_ GUARDED_BY(crit_sect_);
-  scoped_ptr<Accelerate> accelerate_ GUARDED_BY(crit_sect_);
-  scoped_ptr<PreemptiveExpand> preemptive_expand_ GUARDED_BY(crit_sect_);
+  rtc::scoped_ptr<BackgroundNoise> background_noise_ GUARDED_BY(crit_sect_);
+  rtc::scoped_ptr<DecisionLogic> decision_logic_ GUARDED_BY(crit_sect_);
+  rtc::scoped_ptr<AudioMultiVector> algorithm_buffer_ GUARDED_BY(crit_sect_);
+  rtc::scoped_ptr<SyncBuffer> sync_buffer_ GUARDED_BY(crit_sect_);
+  rtc::scoped_ptr<Expand> expand_ GUARDED_BY(crit_sect_);
+  rtc::scoped_ptr<Normal> normal_ GUARDED_BY(crit_sect_);
+  rtc::scoped_ptr<Merge> merge_ GUARDED_BY(crit_sect_);
+  rtc::scoped_ptr<Accelerate> accelerate_ GUARDED_BY(crit_sect_);
+  rtc::scoped_ptr<PreemptiveExpand> preemptive_expand_ GUARDED_BY(crit_sect_);
   RandomVector random_vector_ GUARDED_BY(crit_sect_);
-  scoped_ptr<ComfortNoise> comfort_noise_ GUARDED_BY(crit_sect_);
+  rtc::scoped_ptr<ComfortNoise> comfort_noise_ GUARDED_BY(crit_sect_);
   Rtcp rtcp_ GUARDED_BY(crit_sect_);
   StatisticsCalculator stats_ GUARDED_BY(crit_sect_);
   int fs_hz_ GUARDED_BY(crit_sect_);
@@ -372,9 +375,9 @@
   int output_size_samples_ GUARDED_BY(crit_sect_);
   int decoder_frame_length_ GUARDED_BY(crit_sect_);
   Modes last_mode_ GUARDED_BY(crit_sect_);
-  scoped_ptr<int16_t[]> mute_factor_array_ GUARDED_BY(crit_sect_);
+  rtc::scoped_ptr<int16_t[]> mute_factor_array_ GUARDED_BY(crit_sect_);
   size_t decoded_buffer_length_ GUARDED_BY(crit_sect_);
-  scoped_ptr<int16_t[]> decoded_buffer_ GUARDED_BY(crit_sect_);
+  rtc::scoped_ptr<int16_t[]> decoded_buffer_ GUARDED_BY(crit_sect_);
   uint32_t playout_timestamp_ GUARDED_BY(crit_sect_);
   bool new_codec_ GUARDED_BY(crit_sect_);
   uint32_t timestamp_ GUARDED_BY(crit_sect_);
diff --git a/webrtc/modules/audio_coding/neteq/neteq_network_stats_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_network_stats_unittest.cc
index cdcf0b3..c6195d0 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_network_stats_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_network_stats_unittest.cc
@@ -9,10 +9,10 @@
  */
 
 #include "testing/gmock/include/gmock/gmock.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/neteq/audio_decoder_impl.h"
 #include "webrtc/modules/audio_coding/neteq/tools/neteq_external_decoder_test.h"
 #include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 namespace test {
@@ -259,7 +259,7 @@
   MockAudioDecoderOpus* external_decoder_;
   const int samples_per_ms_;
   const size_t frame_size_samples_;
-  scoped_ptr<test::RtpGenerator> rtp_generator_;
+  rtc::scoped_ptr<test::RtpGenerator> rtp_generator_;
   WebRtcRTPHeader rtp_header_;
   uint32_t last_lost_time_;
   uint32_t packet_loss_interval_;
diff --git a/webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc
index c9a10df..ea88f24 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc
@@ -15,11 +15,11 @@
 #include <list>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/codecs/pcm16b/include/pcm16b.h"
 #include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
 #include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h"
 #include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/test/testsupport/gtest_disable.h"
 
@@ -260,7 +260,7 @@
   int multi_payload_size_bytes_;
   int last_send_time_;
   int last_arrival_time_;
-  scoped_ptr<test::InputAudioFile> input_file_;
+  rtc::scoped_ptr<test::InputAudioFile> input_file_;
 };
 
 class NetEqStereoTestNoJitter : public NetEqStereoTest {
diff --git a/webrtc/modules/audio_coding/neteq/neteq_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_unittest.cc
index 0d8f1a1..b3d6f25 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_unittest.cc
@@ -25,10 +25,10 @@
 
 #include "gflags/gflags.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/neteq/tools/audio_loop.h"
 #include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h"
 #include "webrtc/modules/audio_coding/codecs/pcm16b/include/pcm16b.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/test/testsupport/gtest_disable.h"
 #include "webrtc/typedefs.h"
@@ -262,8 +262,8 @@
 
   NetEq* neteq_;
   NetEq::Config config_;
-  scoped_ptr<test::RtpFileSource> rtp_source_;
-  scoped_ptr<test::Packet> packet_;
+  rtc::scoped_ptr<test::RtpFileSource> rtp_source_;
+  rtc::scoped_ptr<test::Packet> packet_;
   unsigned int sim_clock_;
   int16_t out_data_[kMaxBlockSize];
   int output_sample_rate_;
diff --git a/webrtc/modules/audio_coding/neteq/normal_unittest.cc b/webrtc/modules/audio_coding/neteq/normal_unittest.cc
index e96359a..796409b 100644
--- a/webrtc/modules/audio_coding/neteq/normal_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/normal_unittest.cc
@@ -15,6 +15,7 @@
 #include <vector>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
 #include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h"
 #include "webrtc/modules/audio_coding/neteq/background_noise.h"
@@ -23,7 +24,6 @@
 #include "webrtc/modules/audio_coding/neteq/mock/mock_expand.h"
 #include "webrtc/modules/audio_coding/neteq/random_vector.h"
 #include "webrtc/modules/audio_coding/neteq/sync_buffer.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 using ::testing::_;
 
@@ -53,7 +53,7 @@
   Normal normal(fs, &db, bgn, &expand);
 
   int16_t input[1000] = {0};
-  scoped_ptr<int16_t[]> mute_factor_array(new int16_t[channels]);
+  rtc::scoped_ptr<int16_t[]> mute_factor_array(new int16_t[channels]);
   for (size_t i = 0; i < channels; ++i) {
     mute_factor_array[i] = 16384;
   }
@@ -97,7 +97,7 @@
   Normal normal(fs, &db, bgn, &expand);
 
   int16_t input[1000] = {0};
-  scoped_ptr<int16_t[]> mute_factor_array(new int16_t[channels]);
+  rtc::scoped_ptr<int16_t[]> mute_factor_array(new int16_t[channels]);
   for (size_t i = 0; i < channels; ++i) {
     mute_factor_array[i] = 16384;
   }
diff --git a/webrtc/modules/audio_coding/neteq/payload_splitter_unittest.cc b/webrtc/modules/audio_coding/neteq/payload_splitter_unittest.cc
index 085e76f..305e526 100644
--- a/webrtc/modules/audio_coding/neteq/payload_splitter_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/payload_splitter_unittest.cc
@@ -17,9 +17,9 @@
 #include <utility>  // pair
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h"
 #include "webrtc/modules/audio_coding/neteq/packet.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 using ::testing::Return;
 using ::testing::ReturnNull;
@@ -371,27 +371,27 @@
   // Tell the mock decoder database to return DecoderInfo structs with different
   // codec types.
   // Use scoped pointers to avoid having to delete them later.
-  scoped_ptr<DecoderDatabase::DecoderInfo> info0(
+  rtc::scoped_ptr<DecoderDatabase::DecoderInfo> info0(
       new DecoderDatabase::DecoderInfo(kDecoderISAC, 16000, NULL, false));
   EXPECT_CALL(decoder_database, GetDecoderInfo(0))
       .WillRepeatedly(Return(info0.get()));
-  scoped_ptr<DecoderDatabase::DecoderInfo> info1(
+  rtc::scoped_ptr<DecoderDatabase::DecoderInfo> info1(
       new DecoderDatabase::DecoderInfo(kDecoderISACswb, 32000, NULL, false));
   EXPECT_CALL(decoder_database, GetDecoderInfo(1))
       .WillRepeatedly(Return(info1.get()));
-  scoped_ptr<DecoderDatabase::DecoderInfo> info2(
+  rtc::scoped_ptr<DecoderDatabase::DecoderInfo> info2(
       new DecoderDatabase::DecoderInfo(kDecoderRED, 8000, NULL, false));
   EXPECT_CALL(decoder_database, GetDecoderInfo(2))
       .WillRepeatedly(Return(info2.get()));
-  scoped_ptr<DecoderDatabase::DecoderInfo> info3(
+  rtc::scoped_ptr<DecoderDatabase::DecoderInfo> info3(
       new DecoderDatabase::DecoderInfo(kDecoderAVT, 8000, NULL, false));
   EXPECT_CALL(decoder_database, GetDecoderInfo(3))
       .WillRepeatedly(Return(info3.get()));
-  scoped_ptr<DecoderDatabase::DecoderInfo> info4(
+  rtc::scoped_ptr<DecoderDatabase::DecoderInfo> info4(
       new DecoderDatabase::DecoderInfo(kDecoderCNGnb, 8000, NULL, false));
   EXPECT_CALL(decoder_database, GetDecoderInfo(4))
       .WillRepeatedly(Return(info4.get()));
-  scoped_ptr<DecoderDatabase::DecoderInfo> info5(
+  rtc::scoped_ptr<DecoderDatabase::DecoderInfo> info5(
       new DecoderDatabase::DecoderInfo(kDecoderArbitrary, 8000, NULL, false));
   EXPECT_CALL(decoder_database, GetDecoderInfo(5))
       .WillRepeatedly(Return(info5.get()));
@@ -529,7 +529,7 @@
   // codec types.
   // Use scoped pointers to avoid having to delete them later.
   // (Sample rate is set to 8000 Hz, but does not matter.)
-  scoped_ptr<DecoderDatabase::DecoderInfo> info(
+  rtc::scoped_ptr<DecoderDatabase::DecoderInfo> info(
       new DecoderDatabase::DecoderInfo(decoder_type_, 8000, NULL, false));
   EXPECT_CALL(decoder_database, GetDecoderInfo(kPayloadType))
       .WillRepeatedly(Return(info.get()));
@@ -608,7 +608,7 @@
   // Tell the mock decoder database to return DecoderInfo structs with different
   // codec types.
   // Use scoped pointers to avoid having to delete them later.
-  scoped_ptr<DecoderDatabase::DecoderInfo> info(
+  rtc::scoped_ptr<DecoderDatabase::DecoderInfo> info(
       new DecoderDatabase::DecoderInfo(kDecoderILBC, 8000, NULL, false));
   EXPECT_CALL(decoder_database, GetDecoderInfo(kPayloadType))
       .WillRepeatedly(Return(info.get()));
@@ -671,7 +671,7 @@
   packet_list.push_back(packet);
 
   MockDecoderDatabase decoder_database;
-  scoped_ptr<DecoderDatabase::DecoderInfo> info(
+  rtc::scoped_ptr<DecoderDatabase::DecoderInfo> info(
       new DecoderDatabase::DecoderInfo(kDecoderILBC, 8000, NULL, false));
   EXPECT_CALL(decoder_database, GetDecoderInfo(kPayloadType))
       .WillRepeatedly(Return(info.get()));
@@ -702,7 +702,7 @@
   packet_list.push_back(packet);
 
   MockDecoderDatabase decoder_database;
-  scoped_ptr<DecoderDatabase::DecoderInfo> info(
+  rtc::scoped_ptr<DecoderDatabase::DecoderInfo> info(
       new DecoderDatabase::DecoderInfo(kDecoderILBC, 8000, NULL, false));
   EXPECT_CALL(decoder_database, GetDecoderInfo(kPayloadType))
       .WillRepeatedly(Return(info.get()));
diff --git a/webrtc/modules/audio_coding/neteq/test/audio_classifier_test.cc b/webrtc/modules/audio_coding/neteq/test/audio_classifier_test.cc
index aa2b61d..a14238c 100644
--- a/webrtc/modules/audio_coding/neteq/test/audio_classifier_test.cc
+++ b/webrtc/modules/audio_coding/neteq/test/audio_classifier_test.cc
@@ -18,7 +18,7 @@
 #include <string>
 #include <iostream>
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 
 int main(int argc, char* argv[]) {
   if (argc != 5) {
@@ -48,7 +48,7 @@
   }
 
   const int data_size = channels * kFrameSizeSamples;
-  webrtc::scoped_ptr<int16_t[]> in(new int16_t[data_size]);
+  rtc::scoped_ptr<int16_t[]> in(new int16_t[data_size]);
 
   std::string input_filename = argv[3];
   std::string output_filename = argv[4];
diff --git a/webrtc/modules/audio_coding/neteq/time_stretch.cc b/webrtc/modules/audio_coding/neteq/time_stretch.cc
index a9228d4..02305c8 100644
--- a/webrtc/modules/audio_coding/neteq/time_stretch.cc
+++ b/webrtc/modules/audio_coding/neteq/time_stretch.cc
@@ -12,10 +12,10 @@
 
 #include <algorithm>  // min, max
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
 #include "webrtc/modules/audio_coding/neteq/background_noise.h"
 #include "webrtc/modules/audio_coding/neteq/dsp_helper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -29,7 +29,7 @@
   int fs_mult_120 = fs_mult_ * 120;  // Corresponds to 15 ms.
 
   const int16_t* signal;
-  scoped_ptr<int16_t[]> signal_array;
+  rtc::scoped_ptr<int16_t[]> signal_array;
   size_t signal_len;
   if (num_channels_ == 1) {
     signal = input;
diff --git a/webrtc/modules/audio_coding/neteq/tools/audio_loop.h b/webrtc/modules/audio_coding/neteq/tools/audio_loop.h
index 9647d82..87ff688 100644
--- a/webrtc/modules/audio_coding/neteq/tools/audio_loop.h
+++ b/webrtc/modules/audio_coding/neteq/tools/audio_loop.h
@@ -14,7 +14,7 @@
 #include <string>
 
 #include "webrtc/base/constructormagic.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -49,7 +49,7 @@
   size_t next_index_;
   size_t loop_length_samples_;
   size_t block_length_samples_;
-  scoped_ptr<int16_t[]> audio_array_;
+  rtc::scoped_ptr<int16_t[]> audio_array_;
 
   DISALLOW_COPY_AND_ASSIGN(AudioLoop);
 };
diff --git a/webrtc/modules/audio_coding/neteq/tools/neteq_external_decoder_test.h b/webrtc/modules/audio_coding/neteq/tools/neteq_external_decoder_test.h
index 8cf6ef8..0d4d2f9 100644
--- a/webrtc/modules/audio_coding/neteq/tools/neteq_external_decoder_test.h
+++ b/webrtc/modules/audio_coding/neteq/tools/neteq_external_decoder_test.h
@@ -11,10 +11,10 @@
 #ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_EXTERNAL_DECODER_TEST_H_
 #define WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_EXTERNAL_DECODER_TEST_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/codecs/audio_decoder.h"
 #include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
 #include "webrtc/modules/interface/module_common_types.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 namespace test {
@@ -52,7 +52,7 @@
   AudioDecoder* decoder_;
   int sample_rate_hz_;
   int channels_;
-  scoped_ptr<NetEq> neteq_;
+  rtc::scoped_ptr<NetEq> neteq_;
 };
 
 }  // namespace test
diff --git a/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.h b/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.h
index 00a2499..6207fde 100644
--- a/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.h
+++ b/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.h
@@ -14,10 +14,10 @@
 #include <gflags/gflags.h>
 #include <string>
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
 #include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h"
 #include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 using google::RegisterFlagValidator;
@@ -57,7 +57,7 @@
   // Prob. of losing current packet, when previous packet is not lost.
   double prob_trans_01_;
   bool lost_last_;
-  scoped_ptr<UniformLoss> uniform_loss_model_;
+  rtc::scoped_ptr<UniformLoss> uniform_loss_model_;
 };
 
 class NetEqQualityTest : public ::testing::Test {
@@ -121,17 +121,17 @@
   size_t payload_size_bytes_;
   int max_payload_bytes_;
 
-  scoped_ptr<InputAudioFile> in_file_;
+  rtc::scoped_ptr<InputAudioFile> in_file_;
   FILE* out_file_;
   FILE* log_file_;
 
-  scoped_ptr<RtpGenerator> rtp_generator_;
-  scoped_ptr<NetEq> neteq_;
-  scoped_ptr<LossModel> loss_model_;
+  rtc::scoped_ptr<RtpGenerator> rtp_generator_;
+  rtc::scoped_ptr<NetEq> neteq_;
+  rtc::scoped_ptr<LossModel> loss_model_;
 
-  scoped_ptr<int16_t[]> in_data_;
-  scoped_ptr<uint8_t[]> payload_;
-  scoped_ptr<int16_t[]> out_data_;
+  rtc::scoped_ptr<int16_t[]> in_data_;
+  rtc::scoped_ptr<uint8_t[]> payload_;
+  rtc::scoped_ptr<int16_t[]> out_data_;
   WebRtcRTPHeader rtp_header_;
 
   size_t total_payload_size_bytes_;
diff --git a/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc b/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc
index efa86d8..11dd20a 100644
--- a/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc
+++ b/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc
@@ -23,6 +23,7 @@
 
 #include "google/gflags.h"
 #include "webrtc/base/checks.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/codecs/pcm16b/include/pcm16b.h"
 #include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
 #include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h"
@@ -31,7 +32,6 @@
 #include "webrtc/modules/audio_coding/neteq/tools/packet.h"
 #include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h"
 #include "webrtc/modules/interface/module_common_types.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/trace.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/typedefs.h"
@@ -270,8 +270,8 @@
 }
 
 size_t ReplacePayload(webrtc::test::InputAudioFile* replacement_audio_file,
-                      webrtc::scoped_ptr<int16_t[]>* replacement_audio,
-                      webrtc::scoped_ptr<uint8_t[]>* payload,
+                      rtc::scoped_ptr<int16_t[]>* replacement_audio,
+                      rtc::scoped_ptr<uint8_t[]>* payload,
                       size_t* payload_mem_size_bytes,
                       size_t* frame_size_samples,
                       WebRtcRTPHeader* rtp_header,
@@ -384,7 +384,7 @@
   }
 
   printf("Input file: %s\n", argv[1]);
-  webrtc::scoped_ptr<webrtc::test::RtpFileSource> file_source(
+  rtc::scoped_ptr<webrtc::test::RtpFileSource> file_source(
       webrtc::test::RtpFileSource::Create(argv[1]));
   assert(file_source.get());
 
@@ -397,7 +397,7 @@
 
   // Check if a replacement audio file was provided, and if so, open it.
   bool replace_payload = false;
-  webrtc::scoped_ptr<webrtc::test::InputAudioFile> replacement_audio_file;
+  rtc::scoped_ptr<webrtc::test::InputAudioFile> replacement_audio_file;
   if (!FLAGS_replacement_audio_file.empty()) {
     replacement_audio_file.reset(
         new webrtc::test::InputAudioFile(FLAGS_replacement_audio_file));
@@ -405,7 +405,7 @@
   }
 
   // Read first packet.
-  webrtc::scoped_ptr<webrtc::test::Packet> packet(file_source->NextPacket());
+  rtc::scoped_ptr<webrtc::test::Packet> packet(file_source->NextPacket());
   if (!packet) {
     printf(
         "Warning: input file is empty, or the filters did not match any "
@@ -427,7 +427,7 @@
   // for wav files.)
   // Check output file type.
   std::string output_file_name = argv[2];
-  webrtc::scoped_ptr<webrtc::test::AudioSink> output;
+  rtc::scoped_ptr<webrtc::test::AudioSink> output;
   if (output_file_name.size() >= 4 &&
       output_file_name.substr(output_file_name.size() - 4) == ".wav") {
     // Open a wav file.
@@ -454,11 +454,11 @@
 
 
   // Set up variables for audio replacement if needed.
-  webrtc::scoped_ptr<webrtc::test::Packet> next_packet;
+  rtc::scoped_ptr<webrtc::test::Packet> next_packet;
   bool next_packet_available = false;
   size_t input_frame_size_timestamps = 0;
-  webrtc::scoped_ptr<int16_t[]> replacement_audio;
-  webrtc::scoped_ptr<uint8_t[]> payload;
+  rtc::scoped_ptr<int16_t[]> replacement_audio;
+  rtc::scoped_ptr<uint8_t[]> payload;
   size_t payload_mem_size_bytes = 0;
   if (replace_payload) {
     // Initially assume that the frame size is 30 ms at the initial sample rate.
diff --git a/webrtc/modules/audio_coding/neteq/tools/packet.cc b/webrtc/modules/audio_coding/neteq/tools/packet.cc
index 794c308..b8b27af 100644
--- a/webrtc/modules/audio_coding/neteq/tools/packet.cc
+++ b/webrtc/modules/audio_coding/neteq/tools/packet.cc
@@ -55,7 +55,7 @@
       virtual_packet_length_bytes_(allocated_bytes),
       virtual_payload_length_bytes_(0),
       time_ms_(time_ms) {
-  scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
+  rtc::scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
   valid_header_ = ParseHeader(*parser);
 }
 
@@ -70,7 +70,7 @@
       virtual_packet_length_bytes_(virtual_packet_length_bytes),
       virtual_payload_length_bytes_(0),
       time_ms_(time_ms) {
-  scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
+  rtc::scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
   valid_header_ = ParseHeader(*parser);
 }
 
diff --git a/webrtc/modules/audio_coding/neteq/tools/packet.h b/webrtc/modules/audio_coding/neteq/tools/packet.h
index df7aeb7..a4e48d8 100644
--- a/webrtc/modules/audio_coding/neteq/tools/packet.h
+++ b/webrtc/modules/audio_coding/neteq/tools/packet.h
@@ -14,8 +14,8 @@
 #include <list>
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -103,7 +103,7 @@
   void CopyToHeader(RTPHeader* destination) const;
 
   RTPHeader header_;
-  scoped_ptr<uint8_t[]> payload_memory_;
+  rtc::scoped_ptr<uint8_t[]> payload_memory_;
   const uint8_t* payload_;            // First byte after header.
   const size_t packet_length_bytes_;  // Total length of packet.
   size_t payload_length_bytes_;  // Length of the payload, after RTP header.
diff --git a/webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.cc b/webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.cc
index f391466..ea88a3f 100644
--- a/webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.cc
+++ b/webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.cc
@@ -11,7 +11,7 @@
 #include "webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.h"
 
 #include "webrtc/base/checks.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
 namespace test {
@@ -22,7 +22,7 @@
   const size_t samples_to_read = samples * file_rate_hz_ / output_rate_hz;
   CHECK_EQ(samples_to_read * output_rate_hz, samples * file_rate_hz_)
       << "Frame size and sample rates don't add up to an integer.";
-  scoped_ptr<int16_t[]> temp_destination(new int16_t[samples_to_read]);
+  rtc::scoped_ptr<int16_t[]> temp_destination(new int16_t[samples_to_read]);
   if (!InputAudioFile::Read(samples_to_read, temp_destination.get()))
     return false;
   resampler_.ResetIfNeeded(
diff --git a/webrtc/modules/audio_coding/neteq/tools/rtp_analyze.cc b/webrtc/modules/audio_coding/neteq/tools/rtp_analyze.cc
index ec604d2..d062b38 100644
--- a/webrtc/modules/audio_coding/neteq/tools/rtp_analyze.cc
+++ b/webrtc/modules/audio_coding/neteq/tools/rtp_analyze.cc
@@ -13,9 +13,9 @@
 #include <vector>
 
 #include "google/gflags.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/neteq/tools/packet.h"
 #include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 // Flag validator.
 static bool ValidatePayloadType(const char* flagname, int32_t value) {
@@ -60,7 +60,7 @@
   }
 
   printf("Input file: %s\n", argv[1]);
-  webrtc::scoped_ptr<webrtc::test::RtpFileSource> file_source(
+  rtc::scoped_ptr<webrtc::test::RtpFileSource> file_source(
       webrtc::test::RtpFileSource::Create(argv[1]));
   assert(file_source.get());
   // Set RTP extension ID.
@@ -90,7 +90,7 @@
   }
   fprintf(out_file, "\n");
 
-  webrtc::scoped_ptr<webrtc::test::Packet> packet;
+  rtc::scoped_ptr<webrtc::test::Packet> packet;
   while (true) {
     packet.reset(file_source->NextPacket());
     if (!packet.get()) {
diff --git a/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc b/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc
index 794c983..f5d323e 100644
--- a/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc
+++ b/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc
@@ -52,13 +52,11 @@
       // Read the next one.
       continue;
     }
-    scoped_ptr<uint8_t[]> packet_memory(new uint8_t[temp_packet.length]);
+    rtc::scoped_ptr<uint8_t[]> packet_memory(new uint8_t[temp_packet.length]);
     memcpy(packet_memory.get(), temp_packet.data, temp_packet.length);
-    scoped_ptr<Packet> packet(new Packet(packet_memory.release(),
-                                         temp_packet.length,
-                                         temp_packet.original_length,
-                                         temp_packet.time_ms,
-                                         *parser_.get()));
+    rtc::scoped_ptr<Packet> packet(new Packet(
+        packet_memory.release(), temp_packet.length,
+        temp_packet.original_length, temp_packet.time_ms, *parser_.get()));
     if (!packet->valid_header()) {
       assert(false);
       return NULL;
diff --git a/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h b/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h
index d309280..70b5216 100644
--- a/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h
+++ b/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h
@@ -15,10 +15,10 @@
 #include <string>
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
 #include "webrtc/modules/audio_coding/neteq/tools/packet_source.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -52,8 +52,8 @@
 
   bool OpenFile(const std::string& file_name);
 
-  scoped_ptr<RtpFileReader> rtp_reader_;
-  scoped_ptr<RtpHeaderParser> parser_;
+  rtc::scoped_ptr<RtpFileReader> rtp_reader_;
+  rtc::scoped_ptr<RtpHeaderParser> parser_;
 
   DISALLOW_COPY_AND_ASSIGN(RtpFileSource);
 };
diff --git a/webrtc/modules/audio_coding/neteq/tools/rtpcat.cc b/webrtc/modules/audio_coding/neteq/tools/rtpcat.cc
index 089d4ca..f7490de 100644
--- a/webrtc/modules/audio_coding/neteq/tools/rtpcat.cc
+++ b/webrtc/modules/audio_coding/neteq/tools/rtpcat.cc
@@ -11,11 +11,11 @@
 #include <stdio.h>
 
 #include "webrtc/base/checks.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/test/rtp_file_reader.h"
 #include "webrtc/test/rtp_file_writer.h"
 
-using webrtc::scoped_ptr;
+using rtc::scoped_ptr;
 using webrtc::test::RtpFileReader;
 using webrtc::test::RtpFileWriter;
 
diff --git a/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.h b/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.h
index 2a37abf..e3367f2 100644
--- a/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.h
+++ b/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.h
@@ -14,13 +14,13 @@
 #include <list>
 #include <map>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/engine_configurations.h"
 #include "webrtc/modules/audio_conference_mixer/interface/audio_conference_mixer.h"
 #include "webrtc/modules/audio_conference_mixer/source/level_indicator.h"
 #include "webrtc/modules/audio_conference_mixer/source/memory_pool.h"
 #include "webrtc/modules/audio_conference_mixer/source/time_scheduler.h"
 #include "webrtc/modules/interface/module_common_types.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 class AudioProcessing;
@@ -163,8 +163,8 @@
     ParticipantStatistics  _scratchVadPositiveParticipants[
         kMaximumAmountOfMixedParticipants];
 
-    scoped_ptr<CriticalSectionWrapper> _crit;
-    scoped_ptr<CriticalSectionWrapper> _cbCrit;
+    rtc::scoped_ptr<CriticalSectionWrapper> _crit;
+    rtc::scoped_ptr<CriticalSectionWrapper> _cbCrit;
 
     int32_t _id;
 
@@ -208,7 +208,7 @@
     int16_t _processCalls;
 
     // Used for inhibiting saturation in mixing.
-    scoped_ptr<AudioProcessing> _limiter;
+    rtc::scoped_ptr<AudioProcessing> _limiter;
 };
 }  // namespace webrtc
 
diff --git a/webrtc/modules/audio_device/android/fine_audio_buffer.h b/webrtc/modules/audio_device/android/fine_audio_buffer.h
index e577b72..812fe1f 100644
--- a/webrtc/modules/audio_device/android/fine_audio_buffer.h
+++ b/webrtc/modules/audio_device/android/fine_audio_buffer.h
@@ -11,7 +11,7 @@
 #ifndef WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_FINE_AUDIO_BUFFER_H_
 #define WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_FINE_AUDIO_BUFFER_H_
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -56,7 +56,7 @@
   int bytes_per_10_ms_;
 
   // Storage for samples that are not yet asked for.
-  scoped_ptr<int8_t[]> cache_buffer_;
+  rtc::scoped_ptr<int8_t[]> cache_buffer_;
   int cached_buffer_start_;  // Location of first unread sample.
   int cached_bytes_;  // Number of bytes stored in cache.
 };
diff --git a/webrtc/modules/audio_device/android/fine_audio_buffer_unittest.cc b/webrtc/modules/audio_device/android/fine_audio_buffer_unittest.cc
index e1f03f8..4cff883 100644
--- a/webrtc/modules/audio_device/android/fine_audio_buffer_unittest.cc
+++ b/webrtc/modules/audio_device/android/fine_audio_buffer_unittest.cc
@@ -15,8 +15,8 @@
 
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_device/mock_audio_device_buffer.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 using ::testing::_;
 using ::testing::InSequence;
@@ -80,7 +80,7 @@
   FineAudioBuffer fine_buffer(&audio_device_buffer, kFrameSizeBytes,
                               sample_rate);
 
-  scoped_ptr<int8_t[]> out_buffer;
+  rtc::scoped_ptr<int8_t[]> out_buffer;
   out_buffer.reset(
       new int8_t[fine_buffer.RequiredBufferSizeBytes()]);
   for (int i = 0; i < kNumberOfFrames; ++i) {
diff --git a/webrtc/modules/audio_device/android/low_latency_event_unittest.cc b/webrtc/modules/audio_device/android/low_latency_event_unittest.cc
index 0726959..5a90416 100644
--- a/webrtc/modules/audio_device/android/low_latency_event_unittest.cc
+++ b/webrtc/modules/audio_device/android/low_latency_event_unittest.cc
@@ -11,7 +11,7 @@
 #include "webrtc/modules/audio_device/android/low_latency_event.h"
 
 #include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/sleep.h"
 #include "webrtc/system_wrappers/interface/thread_wrapper.h"
 
@@ -69,7 +69,7 @@
 
   LowLatencyEvent event_;
 
-  scoped_ptr<ThreadWrapper> process_thread_;
+  rtc::scoped_ptr<ThreadWrapper> process_thread_;
   bool terminated_;
   int iteration_count_;
   int allowed_iterations_;
diff --git a/webrtc/modules/audio_device/android/opensles_input.cc b/webrtc/modules/audio_device/android/opensles_input.cc
index 1cdaea1..1349de1 100644
--- a/webrtc/modules/audio_device/android/opensles_input.cc
+++ b/webrtc/modules/audio_device/android/opensles_input.cc
@@ -285,7 +285,7 @@
   fifo_.reset(new SingleRwFifo(num_fifo_buffers_needed_));
 
   // Allocate the memory area to be used.
-  rec_buf_.reset(new scoped_ptr<int8_t[]>[TotalBuffersUsed()]);
+  rec_buf_.reset(new rtc::scoped_ptr<int8_t[]>[TotalBuffersUsed()]);
   for (int i = 0; i < TotalBuffersUsed(); ++i) {
     rec_buf_[i].reset(new int8_t[buffer_size_bytes()]);
   }
diff --git a/webrtc/modules/audio_device/android/opensles_input.h b/webrtc/modules/audio_device/android/opensles_input.h
index e2170e2..6b32e6c 100644
--- a/webrtc/modules/audio_device/android/opensles_input.h
+++ b/webrtc/modules/audio_device/android/opensles_input.h
@@ -15,11 +15,11 @@
 #include <SLES/OpenSLES_Android.h>
 #include <SLES/OpenSLES_AndroidConfiguration.h>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_device/android/audio_manager_jni.h"
 #include "webrtc/modules/audio_device/android/low_latency_event.h"
 #include "webrtc/modules/audio_device/include/audio_device.h"
 #include "webrtc/modules/audio_device/include/audio_device_defines.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -188,8 +188,8 @@
 
   // Members that are read/write accessed concurrently by the process thread and
   // threads calling public functions of this class.
-  scoped_ptr<ThreadWrapper> rec_thread_;  // Processing thread
-  scoped_ptr<CriticalSectionWrapper> crit_sect_;
+  rtc::scoped_ptr<ThreadWrapper> rec_thread_;  // Processing thread
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
   // This member controls the starting and stopping of recording audio to the
   // the device.
   bool recording_;
@@ -197,7 +197,7 @@
   // Only one thread, T1, may push and only one thread, T2, may pull. T1 may or
   // may not be the same thread as T2. T2 is the process thread and T1 is the
   // OpenSL thread.
-  scoped_ptr<SingleRwFifo> fifo_;
+  rtc::scoped_ptr<SingleRwFifo> fifo_;
   int num_fifo_buffers_needed_;
   LowLatencyEvent event_;
   int number_overruns_;
@@ -212,7 +212,7 @@
   // Audio buffers
   AudioDeviceBuffer* audio_buffer_;
   // Holds all allocated memory such that it is deallocated properly.
-  scoped_ptr<scoped_ptr<int8_t[]>[]> rec_buf_;
+  rtc::scoped_ptr<rtc::scoped_ptr<int8_t[]>[]> rec_buf_;
   // Index in |rec_buf_| pointing to the audio buffer that will be ready the
   // next time RecorderSimpleBufferQueueCallbackHandler is invoked.
   // Ready means buffer contains audio data from the device.
diff --git a/webrtc/modules/audio_device/android/opensles_output.cc b/webrtc/modules/audio_device/android/opensles_output.cc
index 192e535..d4887ec 100644
--- a/webrtc/modules/audio_device/android/opensles_output.cc
+++ b/webrtc/modules/audio_device/android/opensles_output.cc
@@ -337,7 +337,7 @@
   fifo_.reset(new SingleRwFifo(num_fifo_buffers_needed_));
 
   // Allocate the memory area to be used.
-  play_buf_.reset(new scoped_ptr<int8_t[]>[TotalBuffersUsed()]);
+  play_buf_.reset(new rtc::scoped_ptr<int8_t[]>[TotalBuffersUsed()]);
   int required_buffer_size = fine_buffer_->RequiredBufferSizeBytes();
   for (int i = 0; i < TotalBuffersUsed(); ++i) {
     play_buf_[i].reset(new int8_t[required_buffer_size]);
diff --git a/webrtc/modules/audio_device/android/opensles_output.h b/webrtc/modules/audio_device/android/opensles_output.h
index 9cb758d..1fb87f5 100644
--- a/webrtc/modules/audio_device/android/opensles_output.h
+++ b/webrtc/modules/audio_device/android/opensles_output.h
@@ -15,12 +15,12 @@
 #include <SLES/OpenSLES_Android.h>
 #include <SLES/OpenSLES_AndroidConfiguration.h>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_device/android/audio_manager_jni.h"
 #include "webrtc/modules/audio_device/android/low_latency_event.h"
 #include "webrtc/modules/audio_device/android/audio_common.h"
 #include "webrtc/modules/audio_device/include/audio_device_defines.h"
 #include "webrtc/modules/audio_device/include/audio_device.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -197,8 +197,8 @@
 
   // Members that are read/write accessed concurrently by the process thread and
   // threads calling public functions of this class.
-  scoped_ptr<ThreadWrapper> play_thread_;  // Processing thread
-  scoped_ptr<CriticalSectionWrapper> crit_sect_;
+  rtc::scoped_ptr<ThreadWrapper> play_thread_;  // Processing thread
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
   // This member controls the starting and stopping of playing audio to the
   // the device.
   bool playing_;
@@ -206,7 +206,7 @@
   // Only one thread, T1, may push and only one thread, T2, may pull. T1 may or
   // may not be the same thread as T2. T1 is the process thread and T2 is the
   // OpenSL thread.
-  scoped_ptr<SingleRwFifo> fifo_;
+  rtc::scoped_ptr<SingleRwFifo> fifo_;
   int num_fifo_buffers_needed_;
   LowLatencyEvent event_;
   int number_underruns_;
@@ -221,8 +221,8 @@
 
   // Audio buffers
   AudioDeviceBuffer* audio_buffer_;
-  scoped_ptr<FineAudioBuffer> fine_buffer_;
-  scoped_ptr<scoped_ptr<int8_t[]>[]> play_buf_;
+  rtc::scoped_ptr<FineAudioBuffer> fine_buffer_;
+  rtc::scoped_ptr<rtc::scoped_ptr<int8_t[]>[]> play_buf_;
   // Index in |rec_buf_| pointing to the audio buffer that will be ready the
   // next time PlayerSimpleBufferQueueCallbackHandler is invoked.
   // Ready means buffer is ready to be played out to device.
diff --git a/webrtc/modules/audio_device/android/single_rw_fifo.h b/webrtc/modules/audio_device/android/single_rw_fifo.h
index 092b1d5..e51ea5a 100644
--- a/webrtc/modules/audio_device/android/single_rw_fifo.h
+++ b/webrtc/modules/audio_device/android/single_rw_fifo.h
@@ -11,8 +11,8 @@
 #ifndef WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_SINGLE_RW_FIFO_H_
 #define WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_SINGLE_RW_FIFO_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/atomic32.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -35,7 +35,7 @@
   int capacity() const { return capacity_; }
 
  private:
-  scoped_ptr<int8_t*[]> queue_;
+  rtc::scoped_ptr<int8_t* []> queue_;
   int capacity_;
 
   Atomic32 size_;
diff --git a/webrtc/modules/audio_device/android/single_rw_fifo_unittest.cc b/webrtc/modules/audio_device/android/single_rw_fifo_unittest.cc
index 9925baa..b53c9e4 100644
--- a/webrtc/modules/audio_device/android/single_rw_fifo_unittest.cc
+++ b/webrtc/modules/audio_device/android/single_rw_fifo_unittest.cc
@@ -13,7 +13,7 @@
 #include <list>
 
 #include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -90,7 +90,7 @@
  protected:
   SingleRwFifo fifo_;
   // Memory area for proper de-allocation.
-  scoped_ptr<int8_t[]> buffer_[kCapacity];
+  rtc::scoped_ptr<int8_t[]> buffer_[kCapacity];
   std::list<int8_t*> memory_queue_;
 
   int pushed_;
diff --git a/webrtc/modules/audio_processing/agc/agc.h b/webrtc/modules/audio_processing/agc/agc.h
index 3c535d3..1ecdab1 100644
--- a/webrtc/modules/audio_processing/agc/agc.h
+++ b/webrtc/modules/audio_processing/agc/agc.h
@@ -11,7 +11,7 @@
 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_AGC_H_
 #define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_AGC_H_
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -56,12 +56,12 @@
   double last_voice_probability_;
   int target_level_dbfs_;
   bool standalone_vad_enabled_;
-  scoped_ptr<Histogram> histogram_;
-  scoped_ptr<Histogram> inactive_histogram_;
-  scoped_ptr<AgcAudioProc> audio_processing_;
-  scoped_ptr<PitchBasedVad> pitch_based_vad_;
-  scoped_ptr<StandaloneVad> standalone_vad_;
-  scoped_ptr<Resampler> resampler_;
+  rtc::scoped_ptr<Histogram> histogram_;
+  rtc::scoped_ptr<Histogram> inactive_histogram_;
+  rtc::scoped_ptr<AgcAudioProc> audio_processing_;
+  rtc::scoped_ptr<PitchBasedVad> pitch_based_vad_;
+  rtc::scoped_ptr<StandaloneVad> standalone_vad_;
+  rtc::scoped_ptr<Resampler> resampler_;
 };
 
 }  // namespace webrtc
diff --git a/webrtc/modules/audio_processing/agc/agc_audio_proc.h b/webrtc/modules/audio_processing/agc/agc_audio_proc.h
index aedc20b..8c8fc31 100644
--- a/webrtc/modules/audio_processing/agc/agc_audio_proc.h
+++ b/webrtc/modules/audio_processing/agc/agc_audio_proc.h
@@ -11,8 +11,8 @@
 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_AGC_AUDIO_PROC_H_
 #define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_AGC_AUDIO_PROC_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_processing/agc/common.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -73,9 +73,9 @@
   double log_old_gain_;
   double old_lag_;
 
-  scoped_ptr<PitchAnalysisStruct> pitch_analysis_handle_;
-  scoped_ptr<PreFiltBankstr> pre_filter_handle_;
-  scoped_ptr<PoleZeroFilter> high_pass_filter_;
+  rtc::scoped_ptr<PitchAnalysisStruct> pitch_analysis_handle_;
+  rtc::scoped_ptr<PreFiltBankstr> pre_filter_handle_;
+  rtc::scoped_ptr<PoleZeroFilter> high_pass_filter_;
 };
 
 }  // namespace webrtc
diff --git a/webrtc/modules/audio_processing/agc/agc_manager_direct.h b/webrtc/modules/audio_processing/agc/agc_manager_direct.h
index fac5f02..05b7701 100644
--- a/webrtc/modules/audio_processing/agc/agc_manager_direct.h
+++ b/webrtc/modules/audio_processing/agc/agc_manager_direct.h
@@ -11,8 +11,8 @@
 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_AGC_MANAGER_DIRECT_H_
 #define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_AGC_MANAGER_DIRECT_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_processing/agc/agc.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -74,7 +74,7 @@
   void UpdateGain();
   void UpdateCompressor();
 
-  scoped_ptr<Agc> agc_;
+  rtc::scoped_ptr<Agc> agc_;
   GainControl* gctrl_;
   VolumeCallbacks* volume_callbacks_;
 
@@ -89,8 +89,8 @@
   bool check_volume_on_next_process_;
   bool startup_;
 
-  scoped_ptr<DebugFile> file_preproc_;
-  scoped_ptr<DebugFile> file_postproc_;
+  rtc::scoped_ptr<DebugFile> file_preproc_;
+  rtc::scoped_ptr<DebugFile> file_postproc_;
 };
 
 }  // namespace webrtc
diff --git a/webrtc/modules/audio_processing/agc/circular_buffer.h b/webrtc/modules/audio_processing/agc/circular_buffer.h
index 98baa13..eee6097 100644
--- a/webrtc/modules/audio_processing/agc/circular_buffer.h
+++ b/webrtc/modules/audio_processing/agc/circular_buffer.h
@@ -11,7 +11,7 @@
 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_CIRCULAR_BUFFER_H_
 #define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_CIRCULAR_BUFFER_H_
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -58,7 +58,7 @@
   // corresponding linear index.
   int ConvertToLinearIndex(int* index) const;
 
-  scoped_ptr<double[]> buffer_;
+  rtc::scoped_ptr<double[]> buffer_;
   bool is_full_;
   int index_;
   int buffer_size_;
diff --git a/webrtc/modules/audio_processing/agc/circular_buffer_unittest.cc b/webrtc/modules/audio_processing/agc/circular_buffer_unittest.cc
index 6bab2e5..e80a5d0 100644
--- a/webrtc/modules/audio_processing/agc/circular_buffer_unittest.cc
+++ b/webrtc/modules/audio_processing/agc/circular_buffer_unittest.cc
@@ -13,7 +13,7 @@
 #include <stdio.h>
 
 #include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -43,7 +43,7 @@
 }
 
 TEST(AgcCircularBufferTest, GeneralTest) {
-  scoped_ptr<AgcCircularBuffer> circular_buffer(
+  rtc::scoped_ptr<AgcCircularBuffer> circular_buffer(
       AgcCircularBuffer::Create(kShortBuffSize));
   double mean_val;
 
@@ -71,7 +71,7 @@
 }
 
 TEST(AgcCircularBufferTest, TransientsRemoval) {
-  scoped_ptr<AgcCircularBuffer> circular_buffer(
+  rtc::scoped_ptr<AgcCircularBuffer> circular_buffer(
       AgcCircularBuffer::Create(kLongBuffSize));
   // Let the first transient be in wrap-around.
   InsertZeros(kLongBuffSize - kWidthThreshold / 2, circular_buffer.get());
@@ -90,7 +90,7 @@
 }
 
 TEST(AgcCircularBufferTest, TransientDetection) {
-  scoped_ptr<AgcCircularBuffer> circular_buffer(
+  rtc::scoped_ptr<AgcCircularBuffer> circular_buffer(
       AgcCircularBuffer::Create(kLongBuffSize));
   // Let the first transient be in wrap-around.
   int num_insertion = kLongBuffSize - kWidthThreshold / 2;
diff --git a/webrtc/modules/audio_processing/agc/histogram.h b/webrtc/modules/audio_processing/agc/histogram.h
index 8f5c518..a8706bb 100644
--- a/webrtc/modules/audio_processing/agc/histogram.h
+++ b/webrtc/modules/audio_processing/agc/histogram.h
@@ -13,7 +13,7 @@
 
 #include <string.h>
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -73,9 +73,9 @@
   int64_t bin_count_q10_[kHistSize];
 
   // Circular buffer for probabilities
-  scoped_ptr<int[]> activity_probability_;
+  rtc::scoped_ptr<int[]> activity_probability_;
   // Circular buffer for histogram-indices of probabilities.
-  scoped_ptr<int[]> hist_bin_index_;
+  rtc::scoped_ptr<int[]> hist_bin_index_;
   // Current index of circular buffer, where the newest data will be written to,
   // therefore, pointing to the oldest data if buffer is full.
   int buffer_index_;
diff --git a/webrtc/modules/audio_processing/agc/histogram_unittest.cc b/webrtc/modules/audio_processing/agc/histogram_unittest.cc
index 0ae7591..d41aaca 100644
--- a/webrtc/modules/audio_processing/agc/histogram_unittest.cc
+++ b/webrtc/modules/audio_processing/agc/histogram_unittest.cc
@@ -37,7 +37,7 @@
 
  private:
   void TestClean();
-  scoped_ptr<Histogram> hist_;
+  rtc::scoped_ptr<Histogram> hist_;
 };
 
 void HistogramTest::TestClean() {
diff --git a/webrtc/modules/audio_processing/agc/pitch_based_vad.h b/webrtc/modules/audio_processing/agc/pitch_based_vad.h
index 41183a5..2295505 100644
--- a/webrtc/modules/audio_processing/agc/pitch_based_vad.h
+++ b/webrtc/modules/audio_processing/agc/pitch_based_vad.h
@@ -11,9 +11,9 @@
 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_PITCH_BASED_VAD_H_
 #define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_PITCH_BASED_VAD_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_processing/agc/common.h"
 #include "webrtc/modules/audio_processing/agc/gmm.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -49,7 +49,7 @@
 
   double p_prior_;
 
-  scoped_ptr<AgcCircularBuffer> circular_buffer_;
+  rtc::scoped_ptr<AgcCircularBuffer> circular_buffer_;
 };
 
 }  // namespace webrtc
diff --git a/webrtc/modules/audio_processing/agc/pole_zero_filter_unittest.cc b/webrtc/modules/audio_processing/agc/pole_zero_filter_unittest.cc
index 9828490..b198b0e 100644
--- a/webrtc/modules/audio_processing/agc/pole_zero_filter_unittest.cc
+++ b/webrtc/modules/audio_processing/agc/pole_zero_filter_unittest.cc
@@ -14,8 +14,8 @@
 #include <stdio.h>
 
 #include "gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_processing/agc/agc_audio_proc_internal.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
 namespace webrtc {
@@ -53,7 +53,7 @@
 
  private:
   void TestClean();
-  scoped_ptr<PoleZeroFilter> my_filter_;
+  rtc::scoped_ptr<PoleZeroFilter> my_filter_;
 };
 
 void PoleZeroFilterTest::FilterSubframes(int num_subframes) {
diff --git a/webrtc/modules/audio_processing/agc/standalone_vad.h b/webrtc/modules/audio_processing/agc/standalone_vad.h
index 6f26838..3cace01 100644
--- a/webrtc/modules/audio_processing/agc/standalone_vad.h
+++ b/webrtc/modules/audio_processing/agc/standalone_vad.h
@@ -11,9 +11,9 @@
 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_STANDALONE_VAD_H_
 #define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_STANDALONE_VAD_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/vad/include/webrtc_vad.h"
 #include "webrtc/modules/audio_processing/agc/common.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
diff --git a/webrtc/modules/audio_processing/agc/standalone_vad_unittest.cc b/webrtc/modules/audio_processing/agc/standalone_vad_unittest.cc
index 43d09a7..3887828 100644
--- a/webrtc/modules/audio_processing/agc/standalone_vad_unittest.cc
+++ b/webrtc/modules/audio_processing/agc/standalone_vad_unittest.cc
@@ -13,14 +13,14 @@
 #include <string.h>
 
 #include "gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/interface/module_common_types.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
 namespace webrtc {
 
 TEST(StandaloneVadTest, Api) {
-  scoped_ptr<StandaloneVad> vad(StandaloneVad::Create());
+  rtc::scoped_ptr<StandaloneVad> vad(StandaloneVad::Create());
   int16_t data[kLength10Ms] = { 0 };
 
   // Valid frame length (for 32 kHz rate), but not what the VAD is expecting.
@@ -55,7 +55,7 @@
 }
 
 TEST(StandaloneVadTest, ActivityDetection) {
-  scoped_ptr<StandaloneVad> vad(StandaloneVad::Create());
+  rtc::scoped_ptr<StandaloneVad> vad(StandaloneVad::Create());
   const size_t kDataLength = kLength10Ms;
   int16_t data[kDataLength] = { 0 };
 
diff --git a/webrtc/modules/audio_processing/audio_buffer.h b/webrtc/modules/audio_processing/audio_buffer.h
index a7f7e89..cdf0336 100644
--- a/webrtc/modules/audio_processing/audio_buffer.h
+++ b/webrtc/modules/audio_processing/audio_buffer.h
@@ -13,12 +13,12 @@
 
 #include <vector>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/include/audio_util.h"
 #include "webrtc/common_audio/channel_buffer.h"
 #include "webrtc/modules/audio_processing/include/audio_processing.h"
 #include "webrtc/modules/audio_processing/splitting_filter.h"
 #include "webrtc/modules/interface/module_common_types.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/scoped_vector.h"
 #include "webrtc/typedefs.h"
 
@@ -124,13 +124,13 @@
   AudioFrame::VADActivity activity_;
 
   const float* keyboard_data_;
-  scoped_ptr<IFChannelBuffer> data_;
-  scoped_ptr<IFChannelBuffer> split_data_;
-  scoped_ptr<SplittingFilter> splitting_filter_;
-  scoped_ptr<ChannelBuffer<int16_t> > mixed_low_pass_channels_;
-  scoped_ptr<ChannelBuffer<int16_t> > low_pass_reference_channels_;
-  scoped_ptr<ChannelBuffer<float> > input_buffer_;
-  scoped_ptr<ChannelBuffer<float> > process_buffer_;
+  rtc::scoped_ptr<IFChannelBuffer> data_;
+  rtc::scoped_ptr<IFChannelBuffer> split_data_;
+  rtc::scoped_ptr<SplittingFilter> splitting_filter_;
+  rtc::scoped_ptr<ChannelBuffer<int16_t> > mixed_low_pass_channels_;
+  rtc::scoped_ptr<ChannelBuffer<int16_t> > low_pass_reference_channels_;
+  rtc::scoped_ptr<ChannelBuffer<float> > input_buffer_;
+  rtc::scoped_ptr<ChannelBuffer<float> > process_buffer_;
   ScopedVector<PushSincResampler> input_resamplers_;
   ScopedVector<PushSincResampler> output_resamplers_;
 };
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.h b/webrtc/modules/audio_processing/audio_processing_impl.h
index 65437fe..9d99bf0 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl.h
+++ b/webrtc/modules/audio_processing/audio_processing_impl.h
@@ -16,8 +16,8 @@
 #include <list>
 #include <string>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -180,19 +180,19 @@
   LevelEstimatorImpl* level_estimator_;
   NoiseSuppressionImpl* noise_suppression_;
   VoiceDetectionImpl* voice_detection_;
-  scoped_ptr<GainControlForNewAgc> gain_control_for_new_agc_;
+  rtc::scoped_ptr<GainControlForNewAgc> gain_control_for_new_agc_;
 
   std::list<ProcessingComponent*> component_list_;
   CriticalSectionWrapper* crit_;
-  scoped_ptr<AudioBuffer> render_audio_;
-  scoped_ptr<AudioBuffer> capture_audio_;
+  rtc::scoped_ptr<AudioBuffer> render_audio_;
+  rtc::scoped_ptr<AudioBuffer> capture_audio_;
 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP
   // TODO(andrew): make this more graceful. Ideally we would split this stuff
   // out into a separate class with an "enabled" and "disabled" implementation.
   int WriteMessageToDebugFile();
   int WriteInitMessage();
-  scoped_ptr<FileWrapper> debug_file_;
-  scoped_ptr<audioproc::Event> event_msg_;  // Protobuf message.
+  rtc::scoped_ptr<FileWrapper> debug_file_;
+  rtc::scoped_ptr<audioproc::Event> event_msg_;  // Protobuf message.
   std::string event_str_;  // Memory for protobuf serialization.
 #endif
 
@@ -215,12 +215,12 @@
 
   // Only set through the constructor's Config parameter.
   const bool use_new_agc_;
-  scoped_ptr<AgcManagerDirect> agc_manager_ GUARDED_BY(crit_);
+  rtc::scoped_ptr<AgcManagerDirect> agc_manager_ GUARDED_BY(crit_);
 
   bool transient_suppressor_enabled_;
-  scoped_ptr<TransientSuppressor> transient_suppressor_;
+  rtc::scoped_ptr<TransientSuppressor> transient_suppressor_;
   const bool beamformer_enabled_;
-  scoped_ptr<Beamformer> beamformer_;
+  rtc::scoped_ptr<Beamformer> beamformer_;
   const std::vector<Point> array_geometry_;
 };
 
diff --git a/webrtc/modules/audio_processing/beamformer/beamformer.h b/webrtc/modules/audio_processing/beamformer/beamformer.h
index 04b0569..8af3547 100644
--- a/webrtc/modules/audio_processing/beamformer/beamformer.h
+++ b/webrtc/modules/audio_processing/beamformer/beamformer.h
@@ -107,7 +107,7 @@
 
   // Deals with the fft transform and blocking.
   int chunk_length_;
-  scoped_ptr<LappedTransform> lapped_transform_;
+  rtc::scoped_ptr<LappedTransform> lapped_transform_;
   float window_[kFftSize];
 
   // Parameters exposed to the user.
diff --git a/webrtc/modules/audio_processing/beamformer/complex_matrix.h b/webrtc/modules/audio_processing/beamformer/complex_matrix.h
index a726224..391050b 100644
--- a/webrtc/modules/audio_processing/beamformer/complex_matrix.h
+++ b/webrtc/modules/audio_processing/beamformer/complex_matrix.h
@@ -14,9 +14,9 @@
 #include <complex>
 
 #include "webrtc/base/checks.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/channel_buffer.h"
 #include "webrtc/modules/audio_processing/beamformer/matrix.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
diff --git a/webrtc/modules/audio_processing/beamformer/matrix.h b/webrtc/modules/audio_processing/beamformer/matrix.h
index 3778fdb..9e485ef 100644
--- a/webrtc/modules/audio_processing/beamformer/matrix.h
+++ b/webrtc/modules/audio_processing/beamformer/matrix.h
@@ -17,8 +17,8 @@
 
 #include "webrtc/base/checks.h"
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/channel_buffer.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace {
 
diff --git a/webrtc/modules/audio_processing/beamformer/pcm_utils.cc b/webrtc/modules/audio_processing/beamformer/pcm_utils.cc
index 207a2dc..0999de3 100644
--- a/webrtc/modules/audio_processing/beamformer/pcm_utils.cc
+++ b/webrtc/modules/audio_processing/beamformer/pcm_utils.cc
@@ -22,7 +22,7 @@
                int16_t* const* buffer) {
   CHECK_GE(num_channels, 1);
 
-  scoped_ptr<int16_t[]> interleaved_buffer(new int16_t[length]);
+  rtc::scoped_ptr<int16_t[]> interleaved_buffer(new int16_t[length]);
   size_t elements_read = fread(interleaved_buffer.get(), sizeof(int16_t),
                                length, file);
   if (elements_read != length) {
@@ -44,7 +44,7 @@
   CHECK_GE(num_channels, 1);
 
   int num_frames = static_cast<int>(length) / num_channels;
-  scoped_ptr<ChannelBuffer<int16_t> > deinterleaved_buffer(
+  rtc::scoped_ptr<ChannelBuffer<int16_t> > deinterleaved_buffer(
       new ChannelBuffer<int16_t>(num_frames, num_channels));
 
   size_t elements_read =
@@ -62,7 +62,7 @@
               const int16_t* const* buffer) {
   CHECK_GE(num_channels, 1);
 
-  scoped_ptr<int16_t[]> interleaved_buffer(new int16_t[length]);
+  rtc::scoped_ptr<int16_t[]> interleaved_buffer(new int16_t[length]);
   Interleave(buffer,
              static_cast<int>(length) / num_channels,
              num_channels,
@@ -78,7 +78,7 @@
   CHECK_GE(num_channels, 1);
 
   int num_frames = static_cast<int>(length) / num_channels;
-  scoped_ptr<ChannelBuffer<int16_t> > deinterleaved_buffer(
+  rtc::scoped_ptr<ChannelBuffer<int16_t> > deinterleaved_buffer(
       new ChannelBuffer<int16_t>(num_frames, num_channels));
 
   for (int i = 0; i < num_channels; ++i) {
diff --git a/webrtc/modules/audio_processing/echo_cancellation_impl_unittest.cc b/webrtc/modules/audio_processing/echo_cancellation_impl_unittest.cc
index ce4526b..aac9a1e 100644
--- a/webrtc/modules/audio_processing/echo_cancellation_impl_unittest.cc
+++ b/webrtc/modules/audio_processing/echo_cancellation_impl_unittest.cc
@@ -9,17 +9,17 @@
  */
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 extern "C" {
 #include "webrtc/modules/audio_processing/aec/aec_core.h"
 }
 #include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/gtest_disable.h"
 
 namespace webrtc {
 
 TEST(EchoCancellationInternalTest, DelayCorrection) {
-  scoped_ptr<AudioProcessing> ap(AudioProcessing::Create());
+  rtc::scoped_ptr<AudioProcessing> ap(AudioProcessing::Create());
   EXPECT_TRUE(ap->echo_cancellation()->aec_core() == NULL);
 
   EXPECT_EQ(ap->kNoError, ap->echo_cancellation()->Enable(true));
@@ -49,7 +49,7 @@
 }
 
 TEST(EchoCancellationInternalTest, ReportedDelay) {
-  scoped_ptr<AudioProcessing> ap(AudioProcessing::Create());
+  rtc::scoped_ptr<AudioProcessing> ap(AudioProcessing::Create());
   EXPECT_TRUE(ap->echo_cancellation()->aec_core() == NULL);
 
   EXPECT_EQ(ap->kNoError, ap->echo_cancellation()->Enable(true));
diff --git a/webrtc/modules/audio_processing/include/mock_audio_processing.h b/webrtc/modules/audio_processing/include/mock_audio_processing.h
index 46a04ae..63161c8 100644
--- a/webrtc/modules/audio_processing/include/mock_audio_processing.h
+++ b/webrtc/modules/audio_processing/include/mock_audio_processing.h
@@ -11,8 +11,8 @@
 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_MOCK_AUDIO_PROCESSING_H_
 #define WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_MOCK_AUDIO_PROCESSING_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -266,13 +266,13 @@
   }
 
  private:
-  scoped_ptr<MockEchoCancellation> echo_cancellation_;
-  scoped_ptr<MockEchoControlMobile> echo_control_mobile_;
-  scoped_ptr<MockGainControl> gain_control_;
-  scoped_ptr<MockHighPassFilter> high_pass_filter_;
-  scoped_ptr<MockLevelEstimator> level_estimator_;
-  scoped_ptr<MockNoiseSuppression> noise_suppression_;
-  scoped_ptr<MockVoiceDetection> voice_detection_;
+  rtc::scoped_ptr<MockEchoCancellation> echo_cancellation_;
+  rtc::scoped_ptr<MockEchoControlMobile> echo_control_mobile_;
+  rtc::scoped_ptr<MockGainControl> gain_control_;
+  rtc::scoped_ptr<MockHighPassFilter> high_pass_filter_;
+  rtc::scoped_ptr<MockLevelEstimator> level_estimator_;
+  rtc::scoped_ptr<MockNoiseSuppression> noise_suppression_;
+  rtc::scoped_ptr<MockVoiceDetection> voice_detection_;
 };
 
 }  // namespace webrtc
diff --git a/webrtc/modules/audio_processing/splitting_filter.h b/webrtc/modules/audio_processing/splitting_filter.h
index 16387a8..8df5310 100644
--- a/webrtc/modules/audio_processing/splitting_filter.h
+++ b/webrtc/modules/audio_processing/splitting_filter.h
@@ -13,8 +13,8 @@
 
 #include <string.h>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/resampler/push_sinc_resampler.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/scoped_vector.h"
 #include "webrtc/typedefs.h"
 
@@ -69,12 +69,12 @@
   void InitBuffers();
 
   int channels_;
-  scoped_ptr<TwoBandsStates[]> two_bands_states_;
-  scoped_ptr<TwoBandsStates[]> band1_states_;
-  scoped_ptr<TwoBandsStates[]> band2_states_;
+  rtc::scoped_ptr<TwoBandsStates[]> two_bands_states_;
+  rtc::scoped_ptr<TwoBandsStates[]> band1_states_;
+  rtc::scoped_ptr<TwoBandsStates[]> band2_states_;
   ScopedVector<PushSincResampler> analysis_resamplers_;
   ScopedVector<PushSincResampler> synthesis_resamplers_;
-  scoped_ptr<int16_t[]> int_buffer_;
+  rtc::scoped_ptr<int16_t[]> int_buffer_;
 };
 
 }  // namespace webrtc
diff --git a/webrtc/modules/audio_processing/test/audio_processing_unittest.cc b/webrtc/modules/audio_processing/test/audio_processing_unittest.cc
index 0c90758..b034f5f 100644
--- a/webrtc/modules/audio_processing/test/audio_processing_unittest.cc
+++ b/webrtc/modules/audio_processing/test/audio_processing_unittest.cc
@@ -14,6 +14,7 @@
 #include <limits>
 #include <queue>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/include/audio_util.h"
 #include "webrtc/common_audio/resampler/include/push_resampler.h"
 #include "webrtc/common_audio/resampler/push_sinc_resampler.h"
@@ -24,7 +25,6 @@
 #include "webrtc/modules/audio_processing/test/test_utils.h"
 #include "webrtc/modules/interface/module_common_types.h"
 #include "webrtc/system_wrappers/interface/event_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/trace.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/test/testsupport/gtest_disable.h"
@@ -223,7 +223,7 @@
 
   int32_t size = msg.ByteSize();
   ASSERT_GT(size, 0);
-  scoped_ptr<uint8_t[]> array(new uint8_t[size]);
+  rtc::scoped_ptr<uint8_t[]> array(new uint8_t[size]);
   ASSERT_TRUE(msg.SerializeToArray(array.get(), size));
 
   ASSERT_EQ(1u, fwrite(&size, sizeof(size), 1, file));
@@ -371,11 +371,11 @@
   const std::string output_path_;
   const std::string ref_path_;
   const std::string ref_filename_;
-  scoped_ptr<AudioProcessing> apm_;
+  rtc::scoped_ptr<AudioProcessing> apm_;
   AudioFrame* frame_;
   AudioFrame* revframe_;
-  scoped_ptr<ChannelBuffer<float> > float_cb_;
-  scoped_ptr<ChannelBuffer<float> > revfloat_cb_;
+  rtc::scoped_ptr<ChannelBuffer<float> > float_cb_;
+  rtc::scoped_ptr<ChannelBuffer<float> > revfloat_cb_;
   int output_sample_rate_hz_;
   int num_output_channels_;
   FILE* far_file_;
@@ -1004,8 +1004,8 @@
   // Set and get echo path
   const size_t echo_path_size =
       apm_->echo_control_mobile()->echo_path_size_bytes();
-  scoped_ptr<char[]> echo_path_in(new char[echo_path_size]);
-  scoped_ptr<char[]> echo_path_out(new char[echo_path_size]);
+  rtc::scoped_ptr<char[]> echo_path_in(new char[echo_path_size]);
+  rtc::scoped_ptr<char[]> echo_path_out(new char[echo_path_size]);
   EXPECT_EQ(apm_->kNullPointerError,
             apm_->echo_control_mobile()->SetEchoPath(NULL, echo_path_size));
   EXPECT_EQ(apm_->kNullPointerError,
@@ -1230,14 +1230,15 @@
   config.Set<Beamforming>(new Beamforming(true, geometry));
   testing::NiceMock<MockBeamformer>* beamformer =
       new testing::NiceMock<MockBeamformer>(geometry);
-  scoped_ptr<AudioProcessing> apm(AudioProcessing::Create(config, beamformer));
+  rtc::scoped_ptr<AudioProcessing> apm(
+      AudioProcessing::Create(config, beamformer));
   EXPECT_EQ(kNoErr, apm->gain_control()->Enable(true));
   ChannelBuffer<float> src_buf(kSamplesPerChannel, kNumInputChannels);
   ChannelBuffer<float> dest_buf(kSamplesPerChannel, kNumOutputChannels);
   const int max_length = kSamplesPerChannel * std::max(kNumInputChannels,
                                                        kNumOutputChannels);
-  scoped_ptr<int16_t[]> int_data(new int16_t[max_length]);
-  scoped_ptr<float[]> float_data(new float[max_length]);
+  rtc::scoped_ptr<int16_t[]> int_data(new int16_t[max_length]);
+  rtc::scoped_ptr<float[]> float_data(new float[max_length]);
   std::string filename = ResourceFilePath("far", kSampleRateHz);
   FILE* far_file = fopen(filename.c_str(), "rb");
   ASSERT_TRUE(far_file != NULL) << "Could not open file " << filename << "\n";
@@ -1725,8 +1726,8 @@
   FILE* out_file = fopen(out_filename.c_str(), "rb");
   ASSERT_TRUE(ref_file != NULL);
   ASSERT_TRUE(out_file != NULL);
-  scoped_ptr<uint8_t[]> ref_bytes;
-  scoped_ptr<uint8_t[]> out_bytes;
+  rtc::scoped_ptr<uint8_t[]> ref_bytes;
+  rtc::scoped_ptr<uint8_t[]> out_bytes;
 
   size_t ref_size = ReadMessageBytesFromFile(ref_file, &ref_bytes);
   size_t out_size = ReadMessageBytesFromFile(out_file, &out_bytes);
@@ -1827,7 +1828,7 @@
 
   Config config;
   config.Set<ExperimentalAgc>(new ExperimentalAgc(false));
-  scoped_ptr<AudioProcessing> fapm(AudioProcessing::Create(config));
+  rtc::scoped_ptr<AudioProcessing> fapm(AudioProcessing::Create(config));
   EnableAllComponents();
   EnableAllAPComponents(fapm.get());
   for (int i = 0; i < ref_data.test_size(); i++) {
@@ -2165,7 +2166,7 @@
   };
   size_t channel_format_size = sizeof(cf) / sizeof(*cf);
 
-  scoped_ptr<AudioProcessing> ap(AudioProcessing::Create());
+  rtc::scoped_ptr<AudioProcessing> ap(AudioProcessing::Create());
   // Enable one component just to ensure some processing takes place.
   ap->noise_suppression()->Enable(true);
   for (size_t i = 0; i < channel_format_size; ++i) {
@@ -2291,7 +2292,7 @@
                             std::string output_file_prefix) {
     Config config;
     config.Set<ExperimentalAgc>(new ExperimentalAgc(false));
-    scoped_ptr<AudioProcessing> ap(AudioProcessing::Create(config));
+    rtc::scoped_ptr<AudioProcessing> ap(AudioProcessing::Create(config));
     EnableAllAPComponents(ap.get());
     ap->Initialize(input_rate,
                    output_rate,
@@ -2325,8 +2326,8 @@
         2 * std::max(out_cb.num_frames(),
                      std::max(fwd_cb.num_frames(),
                               rev_cb.num_frames()));
-    scoped_ptr<float[]> float_data(new float[max_length]);
-    scoped_ptr<int16_t[]> int_data(new int16_t[max_length]);
+    rtc::scoped_ptr<float[]> float_data(new float[max_length]);
+    rtc::scoped_ptr<int16_t[]> int_data(new int16_t[max_length]);
 
     int analog_level = 127;
     while (ReadChunk(far_file, int_data.get(), float_data.get(), &rev_cb) &&
@@ -2432,12 +2433,12 @@
     const int ref_length = SamplesFromRate(ref_rate) * cf[i].num_output;
     const int out_length = SamplesFromRate(output_rate_) * cf[i].num_output;
     // Data from the reference file.
-    scoped_ptr<float[]> ref_data(new float[ref_length]);
+    rtc::scoped_ptr<float[]> ref_data(new float[ref_length]);
     // Data from the output file.
-    scoped_ptr<float[]> out_data(new float[out_length]);
+    rtc::scoped_ptr<float[]> out_data(new float[out_length]);
     // Data from the resampled output, in case the reference and output rates
     // don't match.
-    scoped_ptr<float[]> cmp_data(new float[ref_length]);
+    rtc::scoped_ptr<float[]> cmp_data(new float[ref_length]);
 
     PushResampler<float> resampler;
     resampler.InitializeIfNeeded(output_rate_, ref_rate, cf[i].num_output);
diff --git a/webrtc/modules/audio_processing/test/audioproc_float.cc b/webrtc/modules/audio_processing/test/audioproc_float.cc
index e1418e9..805d884 100644
--- a/webrtc/modules/audio_processing/test/audioproc_float.cc
+++ b/webrtc/modules/audio_processing/test/audioproc_float.cc
@@ -14,11 +14,11 @@
 
 #include "gflags/gflags.h"
 #include "webrtc/base/checks.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/channel_buffer.h"
 #include "webrtc/common_audio/wav_file.h"
 #include "webrtc/modules/audio_processing/include/audio_processing.h"
 #include "webrtc/modules/audio_processing/test/test_utils.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 DEFINE_string(dump, "", "The name of the debug dump file to read from.");
 DEFINE_string(c, "", "The name of the capture input file to read from.");
@@ -152,7 +152,7 @@
     config.Set<Beamforming>(new Beamforming(true, array_geometry));
   }
 
-  scoped_ptr<AudioProcessing> ap(AudioProcessing::Create(config));
+  rtc::scoped_ptr<AudioProcessing> ap(AudioProcessing::Create(config));
   if (FLAGS_dump != "") {
     CHECK_EQ(kNoErr, ap->echo_cancellation()->Enable(FLAGS_aec || FLAGS_all));
   } else if (FLAGS_aec) {
@@ -181,8 +181,8 @@
       static_cast<size_t>(c_buf.num_channels() * c_buf.num_frames());
   const size_t o_length =
       static_cast<size_t>(o_buf.num_channels() * o_buf.num_frames());
-  scoped_ptr<float[]> c_interleaved(new float[c_length]);
-  scoped_ptr<float[]> o_interleaved(new float[o_length]);
+  rtc::scoped_ptr<float[]> c_interleaved(new float[c_length]);
+  rtc::scoped_ptr<float[]> o_interleaved(new float[o_length]);
   while (c_file.ReadSamples(c_length, c_interleaved.get()) == c_length) {
     FloatS16ToFloat(c_interleaved.get(), c_length, c_interleaved.get());
     Deinterleave(c_interleaved.get(), c_buf.num_frames(),
diff --git a/webrtc/modules/audio_processing/test/process_test.cc b/webrtc/modules/audio_processing/test/process_test.cc
index d1fa032..d32dcb8 100644
--- a/webrtc/modules/audio_processing/test/process_test.cc
+++ b/webrtc/modules/audio_processing/test/process_test.cc
@@ -17,12 +17,12 @@
 
 #include <algorithm>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common.h"
 #include "webrtc/modules/audio_processing/include/audio_processing.h"
 #include "webrtc/modules/audio_processing/test/test_utils.h"
 #include "webrtc/modules/interface/module_common_types.h"
 #include "webrtc/system_wrappers/interface/cpu_features_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/tick_util.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/test/testsupport/perf_test.h"
@@ -144,7 +144,7 @@
     printf("Try `process_test --help' for more information.\n\n");
   }
 
-  scoped_ptr<AudioProcessing> apm(AudioProcessing::Create());
+  rtc::scoped_ptr<AudioProcessing> apm(AudioProcessing::Create());
   ASSERT_TRUE(apm.get() != NULL);
 
   const char* pb_filename = NULL;
@@ -489,8 +489,8 @@
   FILE* aecm_echo_path_in_file = NULL;
   FILE* aecm_echo_path_out_file = NULL;
 
-  scoped_ptr<WavWriter> output_wav_file;
-  scoped_ptr<RawFile> output_raw_file;
+  rtc::scoped_ptr<WavWriter> output_wav_file;
+  rtc::scoped_ptr<RawFile> output_raw_file;
 
   if (pb_filename) {
     pb_file = OpenFile(pb_filename, "rb");
@@ -532,7 +532,7 @@
 
     const size_t path_size =
         apm->echo_control_mobile()->echo_path_size_bytes();
-    scoped_ptr<char[]> echo_path(new char[path_size]);
+    rtc::scoped_ptr<char[]> echo_path(new char[path_size]);
     ASSERT_EQ(path_size, fread(echo_path.get(),
                                sizeof(char),
                                path_size,
@@ -574,8 +574,8 @@
   //            but for now we want to share the variables.
   if (pb_file) {
     Event event_msg;
-    scoped_ptr<ChannelBuffer<float> > reverse_cb;
-    scoped_ptr<ChannelBuffer<float> > primary_cb;
+    rtc::scoped_ptr<ChannelBuffer<float> > reverse_cb;
+    rtc::scoped_ptr<ChannelBuffer<float> > primary_cb;
     int output_sample_rate = 32000;
     AudioProcessing::ChannelLayout output_layout = AudioProcessing::kMono;
     while (ReadMessageFromFile(pb_file, &event_msg)) {
@@ -1054,7 +1054,7 @@
   if (aecm_echo_path_out_file != NULL) {
     const size_t path_size =
         apm->echo_control_mobile()->echo_path_size_bytes();
-    scoped_ptr<char[]> echo_path(new char[path_size]);
+    rtc::scoped_ptr<char[]> echo_path(new char[path_size]);
     apm->echo_control_mobile()->GetEchoPath(echo_path.get(), path_size);
     ASSERT_EQ(path_size, fwrite(echo_path.get(),
                                 sizeof(char),
diff --git a/webrtc/modules/audio_processing/test/test_utils.h b/webrtc/modules/audio_processing/test/test_utils.h
index 0bf6f27..52274d7 100644
--- a/webrtc/modules/audio_processing/test/test_utils.h
+++ b/webrtc/modules/audio_processing/test/test_utils.h
@@ -12,12 +12,12 @@
 #include <limits>
 
 #include "webrtc/audio_processing/debug.pb.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/channel_buffer.h"
 #include "webrtc/common_audio/include/audio_util.h"
 #include "webrtc/common_audio/wav_file.h"
 #include "webrtc/modules/audio_processing/include/audio_processing.h"
 #include "webrtc/modules/interface/module_common_types.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -66,7 +66,7 @@
                                   WavWriter* wav_file,
                                   RawFile* raw_file) {
   size_t length = num_channels * samples_per_channel;
-  scoped_ptr<float[]> buffer(new float[length]);
+  rtc::scoped_ptr<float[]> buffer(new float[length]);
   Interleave(data, samples_per_channel, num_channels, buffer.get());
   if (raw_file) {
     raw_file->WriteSamples(buffer.get(), length);
@@ -107,7 +107,7 @@
 void SetContainerFormat(int sample_rate_hz,
                         int num_channels,
                         AudioFrame* frame,
-                        scoped_ptr<ChannelBuffer<T> >* cb) {
+                        rtc::scoped_ptr<ChannelBuffer<T> >* cb) {
   SetFrameSampleRate(frame, sample_rate_hz);
   frame->num_channels_ = num_channels;
   cb->reset(new ChannelBuffer<T>(frame->samples_per_channel_, num_channels));
@@ -128,8 +128,9 @@
 
 // Allocates new memory in the scoped_ptr to fit the raw message and returns the
 // number of bytes read.
-static inline size_t ReadMessageBytesFromFile(FILE* file,
-                                              scoped_ptr<uint8_t[]>* bytes) {
+static inline size_t ReadMessageBytesFromFile(
+    FILE* file,
+    rtc::scoped_ptr<uint8_t[]>* bytes) {
   // The "wire format" for the size is little-endian. Assume we're running on
   // a little-endian machine.
   int32_t size = 0;
@@ -145,7 +146,7 @@
 // Returns true on success, false on error or end-of-file.
 static inline bool ReadMessageFromFile(FILE* file,
                                        ::google::protobuf::MessageLite* msg) {
-  scoped_ptr<uint8_t[]> bytes;
+  rtc::scoped_ptr<uint8_t[]> bytes;
   size_t size = ReadMessageBytesFromFile(file, &bytes);
   if (!size)
     return false;
diff --git a/webrtc/modules/audio_processing/test/unpack.cc b/webrtc/modules/audio_processing/test/unpack.cc
index ee4e263..af0f5ca 100644
--- a/webrtc/modules/audio_processing/test/unpack.cc
+++ b/webrtc/modules/audio_processing/test/unpack.cc
@@ -17,8 +17,8 @@
 
 #include "gflags/gflags.h"
 #include "webrtc/audio_processing/debug.pb.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_processing/test/test_utils.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 // TODO(andrew): unpack more of the data.
@@ -73,12 +73,12 @@
   int num_reverse_channels = 0;
   int num_input_channels = 0;
   int num_output_channels = 0;
-  scoped_ptr<WavWriter> reverse_wav_file;
-  scoped_ptr<WavWriter> input_wav_file;
-  scoped_ptr<WavWriter> output_wav_file;
-  scoped_ptr<RawFile> reverse_raw_file;
-  scoped_ptr<RawFile> input_raw_file;
-  scoped_ptr<RawFile> output_raw_file;
+  rtc::scoped_ptr<WavWriter> reverse_wav_file;
+  rtc::scoped_ptr<WavWriter> input_wav_file;
+  rtc::scoped_ptr<WavWriter> output_wav_file;
+  rtc::scoped_ptr<RawFile> reverse_raw_file;
+  rtc::scoped_ptr<RawFile> input_raw_file;
+  rtc::scoped_ptr<RawFile> output_raw_file;
   while (ReadMessageFromFile(debug_file, &event_msg)) {
     if (event_msg.type() == Event::REVERSE_STREAM) {
       if (!event_msg.has_reverse_stream()) {
@@ -103,7 +103,8 @@
         if (FLAGS_raw && !reverse_raw_file) {
           reverse_raw_file.reset(new RawFile(FLAGS_reverse_file + ".float"));
         }
-        scoped_ptr<const float*[]> data(new const float*[num_reverse_channels]);
+        rtc::scoped_ptr<const float* []> data(
+            new const float* [num_reverse_channels]);
         for (int i = 0; i < num_reverse_channels; ++i) {
           data[i] = reinterpret_cast<const float*>(msg.channel(i).data());
         }
@@ -133,7 +134,8 @@
         if (FLAGS_raw && !input_raw_file) {
           input_raw_file.reset(new RawFile(FLAGS_input_file + ".float"));
         }
-        scoped_ptr<const float*[]> data(new const float*[num_input_channels]);
+        rtc::scoped_ptr<const float* []> data(
+            new const float* [num_input_channels]);
         for (int i = 0; i < num_input_channels; ++i) {
           data[i] = reinterpret_cast<const float*>(msg.input_channel(i).data());
         }
@@ -156,7 +158,8 @@
         if (FLAGS_raw && !output_raw_file) {
           output_raw_file.reset(new RawFile(FLAGS_output_file + ".float"));
         }
-        scoped_ptr<const float*[]> data(new const float*[num_output_channels]);
+        rtc::scoped_ptr<const float* []> data(
+            new const float* [num_output_channels]);
         for (int i = 0; i < num_output_channels; ++i) {
           data[i] =
               reinterpret_cast<const float*>(msg.output_channel(i).data());
diff --git a/webrtc/modules/audio_processing/transient/click_annotate.cc b/webrtc/modules/audio_processing/transient/click_annotate.cc
index f525366..f913cfd 100644
--- a/webrtc/modules/audio_processing/transient/click_annotate.cc
+++ b/webrtc/modules/audio_processing/transient/click_annotate.cc
@@ -15,12 +15,12 @@
 
 #include "webrtc/modules/audio_processing/transient/transient_detector.h"
 #include "webrtc/modules/audio_processing/transient/file_utils.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/file_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
+using rtc::scoped_ptr;
 using webrtc::FileWrapper;
 using webrtc::TransientDetector;
-using webrtc::scoped_ptr;
 
 // Application to generate a RTP timing file.
 // Opens the PCM file and divides the signal in frames.
diff --git a/webrtc/modules/audio_processing/transient/file_utils.cc b/webrtc/modules/audio_processing/transient/file_utils.cc
index c7415bd..2325bd6 100644
--- a/webrtc/modules/audio_processing/transient/file_utils.cc
+++ b/webrtc/modules/audio_processing/transient/file_utils.cc
@@ -10,8 +10,8 @@
 
 #include "webrtc/modules/audio_processing/transient/file_utils.h"
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/file_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -83,7 +83,7 @@
     return 0;
   }
 
-  scoped_ptr<uint8_t[]> byte_array(new uint8_t[2]);
+  rtc::scoped_ptr<uint8_t[]> byte_array(new uint8_t[2]);
 
   size_t int16s_read = 0;
 
@@ -109,7 +109,7 @@
     return 0;
   }
 
-  scoped_ptr<int16_t[]> buffer16(new int16_t[length]);
+  rtc::scoped_ptr<int16_t[]> buffer16(new int16_t[length]);
 
   size_t int16s_read = ReadInt16BufferFromFile(file, length, buffer16.get());
 
@@ -127,7 +127,7 @@
     return 0;
   }
 
-  scoped_ptr<int16_t[]> buffer16(new int16_t[length]);
+  rtc::scoped_ptr<int16_t[]> buffer16(new int16_t[length]);
 
   size_t int16s_read = ReadInt16BufferFromFile(file, length, buffer16.get());
 
@@ -145,7 +145,7 @@
     return 0;
   }
 
-  scoped_ptr<uint8_t[]> byte_array(new uint8_t[4]);
+  rtc::scoped_ptr<uint8_t[]> byte_array(new uint8_t[4]);
 
   size_t floats_read = 0;
 
@@ -168,7 +168,7 @@
     return 0;
   }
 
-  scoped_ptr<uint8_t[]> byte_array(new uint8_t[8]);
+  rtc::scoped_ptr<uint8_t[]> byte_array(new uint8_t[8]);
 
   size_t doubles_read = 0;
 
@@ -191,7 +191,7 @@
     return 0;
   }
 
-  scoped_ptr<uint8_t[]> byte_array(new uint8_t[2]);
+  rtc::scoped_ptr<uint8_t[]> byte_array(new uint8_t[2]);
 
   size_t int16s_written = 0;
 
@@ -215,7 +215,7 @@
     return 0;
   }
 
-  scoped_ptr<uint8_t[]> byte_array(new uint8_t[4]);
+  rtc::scoped_ptr<uint8_t[]> byte_array(new uint8_t[4]);
 
   size_t floats_written = 0;
 
@@ -238,7 +238,7 @@
     return 0;
   }
 
-  scoped_ptr<uint8_t[]> byte_array(new uint8_t[8]);
+  rtc::scoped_ptr<uint8_t[]> byte_array(new uint8_t[8]);
 
   size_t doubles_written = 0;
 
diff --git a/webrtc/modules/audio_processing/transient/file_utils_unittest.cc b/webrtc/modules/audio_processing/transient/file_utils_unittest.cc
index 89d4da7..8507d90 100644
--- a/webrtc/modules/audio_processing/transient/file_utils_unittest.cc
+++ b/webrtc/modules/audio_processing/transient/file_utils_unittest.cc
@@ -14,8 +14,8 @@
 #include <string>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/file_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/typedefs.h"
 
@@ -85,7 +85,7 @@
 }
 
 TEST_F(TransientFileUtilsTest, ConvertFloatToByteArray) {
-  scoped_ptr<uint8_t[]> bytes(new uint8_t[4]);
+  rtc::scoped_ptr<uint8_t[]> bytes(new uint8_t[4]);
 
   EXPECT_EQ(0, ConvertFloatToByteArray(kPi, bytes.get()));
   EXPECT_EQ(0, memcmp(bytes.get(), kPiBytesf, 4));
@@ -98,7 +98,7 @@
 }
 
 TEST_F(TransientFileUtilsTest, ConvertDoubleToByteArray) {
-  scoped_ptr<uint8_t[]> bytes(new uint8_t[8]);
+  rtc::scoped_ptr<uint8_t[]> bytes(new uint8_t[8]);
 
   EXPECT_EQ(0, ConvertDoubleToByteArray(kPi, bytes.get()));
   EXPECT_EQ(0, memcmp(bytes.get(), kPiBytes, 8));
@@ -113,7 +113,7 @@
 TEST_F(TransientFileUtilsTest, ReadInt16BufferFromFile) {
   std::string test_filename = kTestFileName;
 
-  scoped_ptr<FileWrapper> file(FileWrapper::Create());
+  rtc::scoped_ptr<FileWrapper> file(FileWrapper::Create());
 
   file->OpenFile(test_filename.c_str(),
                  true,    // Read only.
@@ -123,7 +123,7 @@
       << kTestFileName.c_str();
 
   const size_t kBufferLength = 12;
-  scoped_ptr<int16_t[]> buffer(new int16_t[kBufferLength]);
+  rtc::scoped_ptr<int16_t[]> buffer(new int16_t[kBufferLength]);
 
   EXPECT_EQ(kBufferLength, ReadInt16BufferFromFile(file.get(),
                                                    kBufferLength,
@@ -151,7 +151,7 @@
 TEST_F(TransientFileUtilsTest, ReadInt16FromFileToFloatBuffer) {
   std::string test_filename = kTestFileName;
 
-  scoped_ptr<FileWrapper> file(FileWrapper::Create());
+  rtc::scoped_ptr<FileWrapper> file(FileWrapper::Create());
 
   file->OpenFile(test_filename.c_str(),
                  true,    // Read only.
@@ -161,7 +161,7 @@
       << kTestFileName.c_str();
 
   const size_t kBufferLength = 12;
-  scoped_ptr<float[]> buffer(new float[kBufferLength]);
+  rtc::scoped_ptr<float[]> buffer(new float[kBufferLength]);
 
   EXPECT_EQ(kBufferLength, ReadInt16FromFileToFloatBuffer(file.get(),
                                                           kBufferLength,
@@ -192,7 +192,7 @@
 TEST_F(TransientFileUtilsTest, ReadInt16FromFileToDoubleBuffer) {
   std::string test_filename = kTestFileName;
 
-  scoped_ptr<FileWrapper> file(FileWrapper::Create());
+  rtc::scoped_ptr<FileWrapper> file(FileWrapper::Create());
 
   file->OpenFile(test_filename.c_str(),
                  true,    // Read only.
@@ -202,7 +202,7 @@
       << kTestFileName.c_str();
 
   const size_t kBufferLength = 12;
-  scoped_ptr<double[]> buffer(new double[kBufferLength]);
+  rtc::scoped_ptr<double[]> buffer(new double[kBufferLength]);
 
   EXPECT_EQ(kBufferLength, ReadInt16FromFileToDoubleBuffer(file.get(),
                                                            kBufferLength,
@@ -232,7 +232,7 @@
 TEST_F(TransientFileUtilsTest, ReadFloatBufferFromFile) {
   std::string test_filename = kTestFileNamef;
 
-  scoped_ptr<FileWrapper> file(FileWrapper::Create());
+  rtc::scoped_ptr<FileWrapper> file(FileWrapper::Create());
 
   file->OpenFile(test_filename.c_str(),
                  true,    // Read only.
@@ -242,8 +242,7 @@
       << kTestFileNamef.c_str();
 
   const size_t kBufferLength = 3;
-  scoped_ptr<float[]> buffer(new float[kBufferLength]);
-
+  rtc::scoped_ptr<float[]> buffer(new float[kBufferLength]);
 
   EXPECT_EQ(kBufferLength, ReadFloatBufferFromFile(file.get(),
                                                    kBufferLength,
@@ -270,7 +269,7 @@
 TEST_F(TransientFileUtilsTest, ReadDoubleBufferFromFile) {
   std::string test_filename = kTestFileName;
 
-  scoped_ptr<FileWrapper> file(FileWrapper::Create());
+  rtc::scoped_ptr<FileWrapper> file(FileWrapper::Create());
 
   file->OpenFile(test_filename.c_str(),
                  true,    // Read only.
@@ -280,8 +279,7 @@
       << kTestFileName.c_str();
 
   const size_t kBufferLength = 3;
-  scoped_ptr<double[]> buffer(new double[kBufferLength]);
-
+  rtc::scoped_ptr<double[]> buffer(new double[kBufferLength]);
 
   EXPECT_EQ(kBufferLength, ReadDoubleBufferFromFile(file.get(),
                                                     kBufferLength,
@@ -306,7 +304,7 @@
 }
 
 TEST_F(TransientFileUtilsTest, WriteInt16BufferToFile) {
-  scoped_ptr<FileWrapper> file(FileWrapper::Create());
+  rtc::scoped_ptr<FileWrapper> file(FileWrapper::Create());
 
   std::string kOutFileName = test::TempFilename(test::OutputPath(),
                                                 "utils_test");
@@ -319,8 +317,8 @@
       << kOutFileName.c_str();
 
   const size_t kBufferLength = 3;
-  scoped_ptr<int16_t[]> written_buffer(new int16_t[kBufferLength]);
-  scoped_ptr<int16_t[]> read_buffer(new int16_t[kBufferLength]);
+  rtc::scoped_ptr<int16_t[]> written_buffer(new int16_t[kBufferLength]);
+  rtc::scoped_ptr<int16_t[]> read_buffer(new int16_t[kBufferLength]);
 
   written_buffer[0] = 1;
   written_buffer[1] = 2;
@@ -348,7 +346,7 @@
 }
 
 TEST_F(TransientFileUtilsTest, WriteFloatBufferToFile) {
-  scoped_ptr<FileWrapper> file(FileWrapper::Create());
+  rtc::scoped_ptr<FileWrapper> file(FileWrapper::Create());
 
   std::string kOutFileName = test::TempFilename(test::OutputPath(),
                                                 "utils_test");
@@ -361,8 +359,8 @@
       << kOutFileName.c_str();
 
   const size_t kBufferLength = 3;
-  scoped_ptr<float[]> written_buffer(new float[kBufferLength]);
-  scoped_ptr<float[]> read_buffer(new float[kBufferLength]);
+  rtc::scoped_ptr<float[]> written_buffer(new float[kBufferLength]);
+  rtc::scoped_ptr<float[]> read_buffer(new float[kBufferLength]);
 
   written_buffer[0] = kPi;
   written_buffer[1] = kE;
@@ -390,7 +388,7 @@
 }
 
 TEST_F(TransientFileUtilsTest, WriteDoubleBufferToFile) {
-  scoped_ptr<FileWrapper> file(FileWrapper::Create());
+  rtc::scoped_ptr<FileWrapper> file(FileWrapper::Create());
 
   std::string kOutFileName = test::TempFilename(test::OutputPath(),
                                                 "utils_test");
@@ -403,8 +401,8 @@
       << kOutFileName.c_str();
 
   const size_t kBufferLength = 3;
-  scoped_ptr<double[]> written_buffer(new double[kBufferLength]);
-  scoped_ptr<double[]> read_buffer(new double[kBufferLength]);
+  rtc::scoped_ptr<double[]> written_buffer(new double[kBufferLength]);
+  rtc::scoped_ptr<double[]> read_buffer(new double[kBufferLength]);
 
   written_buffer[0] = kPi;
   written_buffer[1] = kE;
@@ -435,9 +433,9 @@
   std::string test_filename = kTestFileName;
 
   double value;
-  scoped_ptr<int16_t[]> int16_buffer(new int16_t[1]);
-  scoped_ptr<double[]> double_buffer(new double[1]);
-  scoped_ptr<FileWrapper> file(FileWrapper::Create());
+  rtc::scoped_ptr<int16_t[]> int16_buffer(new int16_t[1]);
+  rtc::scoped_ptr<double[]> double_buffer(new double[1]);
+  rtc::scoped_ptr<FileWrapper> file(FileWrapper::Create());
 
   EXPECT_EQ(-1, ConvertByteArrayToDouble(NULL, &value));
   EXPECT_EQ(-1, ConvertByteArrayToDouble(kPiBytes, NULL));
diff --git a/webrtc/modules/audio_processing/transient/moving_moments.cc b/webrtc/modules/audio_processing/transient/moving_moments.cc
index e116832..aa47522 100644
--- a/webrtc/modules/audio_processing/transient/moving_moments.cc
+++ b/webrtc/modules/audio_processing/transient/moving_moments.cc
@@ -13,7 +13,7 @@
 #include <math.h>
 #include <string.h>
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
 
diff --git a/webrtc/modules/audio_processing/transient/moving_moments.h b/webrtc/modules/audio_processing/transient/moving_moments.h
index f063e7c..6e3ad5b 100644
--- a/webrtc/modules/audio_processing/transient/moving_moments.h
+++ b/webrtc/modules/audio_processing/transient/moving_moments.h
@@ -13,7 +13,7 @@
 
 #include <queue>
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
 
diff --git a/webrtc/modules/audio_processing/transient/moving_moments_unittest.cc b/webrtc/modules/audio_processing/transient/moving_moments_unittest.cc
index 14cc5a2..4d89ac6 100644
--- a/webrtc/modules/audio_processing/transient/moving_moments_unittest.cc
+++ b/webrtc/modules/audio_processing/transient/moving_moments_unittest.cc
@@ -11,7 +11,7 @@
 #include "webrtc/modules/audio_processing/transient/moving_moments.h"
 
 #include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -29,7 +29,7 @@
                                  const float* expected_mean,
                                  const float* expected_mean_squares);
 
-  scoped_ptr<MovingMoments> moving_moments_;
+  rtc::scoped_ptr<MovingMoments> moving_moments_;
   float output_mean_[kMaxOutputLength];
   float output_mean_squares_[kMaxOutputLength];
 };
diff --git a/webrtc/modules/audio_processing/transient/transient_detector.h b/webrtc/modules/audio_processing/transient/transient_detector.h
index 04691d5..3f96582 100644
--- a/webrtc/modules/audio_processing/transient/transient_detector.h
+++ b/webrtc/modules/audio_processing/transient/transient_detector.h
@@ -13,9 +13,9 @@
 
 #include <deque>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_processing/transient/moving_moments.h"
 #include "webrtc/modules/audio_processing/transient/wpd_tree.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -55,14 +55,14 @@
 
   size_t samples_per_chunk_;
 
-  scoped_ptr<WPDTree> wpd_tree_;
+  rtc::scoped_ptr<WPDTree> wpd_tree_;
   size_t tree_leaves_data_length_;
 
   // A MovingMoments object is needed for each leaf in the WPD tree.
-  scoped_ptr<MovingMoments> moving_moments_[kLeaves];
+  rtc::scoped_ptr<MovingMoments> moving_moments_[kLeaves];
 
-  scoped_ptr<float[]> first_moments_;
-  scoped_ptr<float[]> second_moments_;
+  rtc::scoped_ptr<float[]> first_moments_;
+  rtc::scoped_ptr<float[]> second_moments_;
 
   // Stores the last calculated moments from the previous detection.
   float last_first_moment_[kLeaves];
diff --git a/webrtc/modules/audio_processing/transient/transient_detector_unittest.cc b/webrtc/modules/audio_processing/transient/transient_detector_unittest.cc
index 7e53f42..16a7915 100644
--- a/webrtc/modules/audio_processing/transient/transient_detector_unittest.cc
+++ b/webrtc/modules/audio_processing/transient/transient_detector_unittest.cc
@@ -14,10 +14,10 @@
 #include <string>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_processing/transient/common.h"
 #include "webrtc/modules/audio_processing/transient/file_utils.h"
 #include "webrtc/system_wrappers/interface/file_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/typedefs.h"
 
@@ -45,7 +45,7 @@
     detect_file_name << "audio_processing/transient/detect"
                      << (sample_rate_hz / 1000) << "kHz";
 
-    scoped_ptr<FileWrapper> detect_file(FileWrapper::Create());
+    rtc::scoped_ptr<FileWrapper> detect_file(FileWrapper::Create());
 
     detect_file->OpenFile(
         test::ResourcePath(detect_file_name.str(), "dat").c_str(),
@@ -62,7 +62,7 @@
     audio_file_name << "audio_processing/transient/audio"
                     << (sample_rate_hz / 1000) << "kHz";
 
-    scoped_ptr<FileWrapper> audio_file(FileWrapper::Create());
+    rtc::scoped_ptr<FileWrapper> audio_file(FileWrapper::Create());
 
     audio_file->OpenFile(
         test::ResourcePath(audio_file_name.str(), "pcm").c_str(),
@@ -74,7 +74,7 @@
     TransientDetector detector(sample_rate_hz);
 
     const size_t buffer_length = sample_rate_hz * ts::kChunkSizeMs / 1000;
-    scoped_ptr<float[]> buffer(new float[buffer_length]);
+    rtc::scoped_ptr<float[]> buffer(new float[buffer_length]);
 
     const float kTolerance = 0.02f;
 
diff --git a/webrtc/modules/audio_processing/transient/transient_suppression_test.cc b/webrtc/modules/audio_processing/transient/transient_suppression_test.cc
index a4c2ef1..fdc5686 100644
--- a/webrtc/modules/audio_processing/transient/transient_suppression_test.cc
+++ b/webrtc/modules/audio_processing/transient/transient_suppression_test.cc
@@ -16,10 +16,10 @@
 
 #include "gflags/gflags.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/include/audio_util.h"
 #include "webrtc/modules/audio_processing/agc/agc.h"
 #include "webrtc/modules/interface/module_common_types.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/typedefs.h"
 
@@ -83,7 +83,7 @@
                  float* detection_buffer,
                  FILE* reference_file,
                  float* reference_buffer) {
-  scoped_ptr<int16_t[]> tmpbuf;
+  rtc::scoped_ptr<int16_t[]> tmpbuf;
   int16_t* read_ptr = audio_buffer;
   if (num_channels > 1) {
     tmpbuf.reset(new int16_t[num_channels * audio_buffer_size]);
@@ -105,7 +105,7 @@
     }
   }
   if (detection_file) {
-    scoped_ptr<int16_t[]> ibuf(new int16_t[detection_buffer_size]);
+    rtc::scoped_ptr<int16_t[]> ibuf(new int16_t[detection_buffer_size]);
     if (fread(ibuf.get(), sizeof(ibuf[0]), detection_buffer_size,
               detection_file) != detection_buffer_size)
       return false;
@@ -113,7 +113,7 @@
       detection_buffer[i] = ibuf[i];
   }
   if (reference_file) {
-    scoped_ptr<int16_t[]> ibuf(new int16_t[audio_buffer_size]);
+    rtc::scoped_ptr<int16_t[]> ibuf(new int16_t[audio_buffer_size]);
     if (fread(ibuf.get(), sizeof(ibuf[0]), audio_buffer_size, reference_file)
         != audio_buffer_size)
       return false;
@@ -127,7 +127,7 @@
                      size_t num_samples,
                      int num_channels,
                      const float* buffer) {
-  scoped_ptr<int16_t[]> ibuf(new int16_t[num_channels * num_samples]);
+  rtc::scoped_ptr<int16_t[]> ibuf(new int16_t[num_channels * num_samples]);
   // Interleave.
   for (int i = 0; i < num_channels; ++i) {
     for (size_t j = 0; j < num_samples; ++j) {
@@ -182,12 +182,12 @@
       FLAGS_chunk_size_ms * detection_rate_hz / 1000;
 
   // int16 and float variants of the same data.
-  scoped_ptr<int16_t[]> audio_buffer_i(
+  rtc::scoped_ptr<int16_t[]> audio_buffer_i(
       new int16_t[FLAGS_num_channels * audio_buffer_size]);
-  scoped_ptr<float[]> audio_buffer_f(
+  rtc::scoped_ptr<float[]> audio_buffer_f(
       new float[FLAGS_num_channels * audio_buffer_size]);
 
-  scoped_ptr<float[]> detection_buffer, reference_buffer;
+  rtc::scoped_ptr<float[]> detection_buffer, reference_buffer;
 
   if (detection_file)
     detection_buffer.reset(new float[detection_buffer_size]);
diff --git a/webrtc/modules/audio_processing/transient/transient_suppressor.cc b/webrtc/modules/audio_processing/transient/transient_suppressor.cc
index 7eb302b..44ea6bf 100644
--- a/webrtc/modules/audio_processing/transient/transient_suppressor.cc
+++ b/webrtc/modules/audio_processing/transient/transient_suppressor.cc
@@ -17,6 +17,7 @@
 #include <deque>
 #include <set>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/include/audio_util.h"
 #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
 #include "webrtc/modules/audio_processing/transient/common.h"
@@ -26,7 +27,6 @@
 #include "webrtc/modules/audio_processing/utility/fft4g.h"
 }
 #include "webrtc/system_wrappers/interface/logging.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
diff --git a/webrtc/modules/audio_processing/transient/transient_suppressor.h b/webrtc/modules/audio_processing/transient/transient_suppressor.h
index 3d7dba8..12e4b5e 100644
--- a/webrtc/modules/audio_processing/transient/transient_suppressor.h
+++ b/webrtc/modules/audio_processing/transient/transient_suppressor.h
@@ -14,7 +14,7 @@
 #include <deque>
 #include <set>
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/test/testsupport/gtest_prod_util.h"
 #include "webrtc/typedefs.h"
 
@@ -71,7 +71,7 @@
   void HardRestoration(float* spectral_mean);
   void SoftRestoration(float* spectral_mean);
 
-  scoped_ptr<TransientDetector> detector_;
+  rtc::scoped_ptr<TransientDetector> detector_;
 
   size_t data_length_;
   size_t detection_length_;
@@ -80,25 +80,25 @@
   size_t complex_analysis_length_;
   int num_channels_;
   // Input buffer where the original samples are stored.
-  scoped_ptr<float[]> in_buffer_;
-  scoped_ptr<float[]> detection_buffer_;
+  rtc::scoped_ptr<float[]> in_buffer_;
+  rtc::scoped_ptr<float[]> detection_buffer_;
   // Output buffer where the restored samples are stored.
-  scoped_ptr<float[]> out_buffer_;
+  rtc::scoped_ptr<float[]> out_buffer_;
 
   // Arrays for fft.
-  scoped_ptr<int[]> ip_;
-  scoped_ptr<float[]> wfft_;
+  rtc::scoped_ptr<int[]> ip_;
+  rtc::scoped_ptr<float[]> wfft_;
 
-  scoped_ptr<float[]> spectral_mean_;
+  rtc::scoped_ptr<float[]> spectral_mean_;
 
   // Stores the data for the fft.
-  scoped_ptr<float[]> fft_buffer_;
+  rtc::scoped_ptr<float[]> fft_buffer_;
 
-  scoped_ptr<float[]> magnitudes_;
+  rtc::scoped_ptr<float[]> magnitudes_;
 
   const float* window_;
 
-  scoped_ptr<float[]> mean_factor_;
+  rtc::scoped_ptr<float[]> mean_factor_;
 
   float detector_smoothed_;
 
diff --git a/webrtc/modules/audio_processing/transient/wpd_node.cc b/webrtc/modules/audio_processing/transient/wpd_node.cc
index 8854516..8114a70 100644
--- a/webrtc/modules/audio_processing/transient/wpd_node.cc
+++ b/webrtc/modules/audio_processing/transient/wpd_node.cc
@@ -14,9 +14,9 @@
 #include <math.h>
 #include <string.h>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/fir_filter.h"
 #include "webrtc/modules/audio_processing/transient/dyadic_decimator.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
diff --git a/webrtc/modules/audio_processing/transient/wpd_node.h b/webrtc/modules/audio_processing/transient/wpd_node.h
index d7c2463..f66cad9 100644
--- a/webrtc/modules/audio_processing/transient/wpd_node.h
+++ b/webrtc/modules/audio_processing/transient/wpd_node.h
@@ -11,7 +11,7 @@
 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_WPD_NODE_H_
 #define WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_WPD_NODE_H_
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -36,9 +36,9 @@
   size_t length() const { return length_; }
 
  private:
-  scoped_ptr<float[]> data_;
+  rtc::scoped_ptr<float[]> data_;
   size_t length_;
-  scoped_ptr<FIRFilter> filter_;
+  rtc::scoped_ptr<FIRFilter> filter_;
 };
 
 }  // namespace webrtc
diff --git a/webrtc/modules/audio_processing/transient/wpd_node_unittest.cc b/webrtc/modules/audio_processing/transient/wpd_node_unittest.cc
index 631a6db..cde6cba 100644
--- a/webrtc/modules/audio_processing/transient/wpd_node_unittest.cc
+++ b/webrtc/modules/audio_processing/transient/wpd_node_unittest.cc
@@ -13,7 +13,7 @@
 #include <string.h>
 
 #include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
 
diff --git a/webrtc/modules/audio_processing/transient/wpd_tree.cc b/webrtc/modules/audio_processing/transient/wpd_tree.cc
index a3c3ec0..40a37a0 100644
--- a/webrtc/modules/audio_processing/transient/wpd_tree.cc
+++ b/webrtc/modules/audio_processing/transient/wpd_tree.cc
@@ -14,9 +14,9 @@
 #include <math.h>
 #include <string.h>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_processing/transient/dyadic_decimator.h"
 #include "webrtc/modules/audio_processing/transient/wpd_node.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -32,7 +32,7 @@
          levels > 0);
   // Size is 1 more, so we can use the array as 1-based. nodes_[0] is never
   // allocated.
-  nodes_.reset(new scoped_ptr<WPDNode>[num_nodes_ + 1]);
+  nodes_.reset(new rtc::scoped_ptr<WPDNode>[num_nodes_ + 1]);
 
   // Create the first node
   const float kRootCoefficient = 1.f;  // Identity Coefficient.
diff --git a/webrtc/modules/audio_processing/transient/wpd_tree.h b/webrtc/modules/audio_processing/transient/wpd_tree.h
index e488c9d..7f0fc79 100644
--- a/webrtc/modules/audio_processing/transient/wpd_tree.h
+++ b/webrtc/modules/audio_processing/transient/wpd_tree.h
@@ -11,8 +11,8 @@
 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_WPD_TREE_H_
 #define WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_WPD_TREE_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_processing/transient/wpd_node.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -83,7 +83,7 @@
   size_t data_length_;
   int levels_;
   int num_nodes_;
-  scoped_ptr<scoped_ptr<WPDNode>[]> nodes_;
+  rtc::scoped_ptr<rtc::scoped_ptr<WPDNode>[]> nodes_;
 };
 
 }  // namespace webrtc
diff --git a/webrtc/modules/audio_processing/transient/wpd_tree_unittest.cc b/webrtc/modules/audio_processing/transient/wpd_tree_unittest.cc
index eecdd95..dd5b5c8 100644
--- a/webrtc/modules/audio_processing/transient/wpd_tree_unittest.cc
+++ b/webrtc/modules/audio_processing/transient/wpd_tree_unittest.cc
@@ -14,10 +14,10 @@
 #include <string>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_processing/transient/daubechies_8_wavelet_coeffs.h"
 #include "webrtc/modules/audio_processing/transient/file_utils.h"
 #include "webrtc/system_wrappers/interface/file_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
 namespace webrtc {
@@ -81,8 +81,8 @@
                kDaubechies8CoefficientsLength,
                kLevels);
   // Allocate and open all matlab and out files.
-  scoped_ptr<FileWrapper> matlab_files_data[kLeaves];
-  scoped_ptr<FileWrapper> out_files_data[kLeaves];
+  rtc::scoped_ptr<FileWrapper> matlab_files_data[kLeaves];
+  rtc::scoped_ptr<FileWrapper> out_files_data[kLeaves];
 
   for (int i = 0; i < kLeaves; ++i) {
     // Matlab files.
@@ -119,7 +119,7 @@
   std::string test_file_name = test::ResourcePath(
       "audio_processing/transient/ajm-macbook-1-spke16m", "pcm");
 
-  scoped_ptr<FileWrapper> test_file(FileWrapper::Create());
+  rtc::scoped_ptr<FileWrapper> test_file(FileWrapper::Create());
 
   test_file->OpenFile(test_file_name.c_str(),
                       true,    // Read only.
diff --git a/webrtc/modules/bitrate_controller/bitrate_controller_impl.h b/webrtc/modules/bitrate_controller/bitrate_controller_impl.h
index f8d8022..7ec8fe8 100644
--- a/webrtc/modules/bitrate_controller/bitrate_controller_impl.h
+++ b/webrtc/modules/bitrate_controller/bitrate_controller_impl.h
@@ -21,10 +21,10 @@
 #include <map>
 #include <utility>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/bitrate_controller/remb_suppressor.h"
 #include "webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -133,7 +133,7 @@
   bool last_enforce_min_bitrate_ GUARDED_BY(*critsect_);
   bool bitrate_observers_modified_ GUARDED_BY(*critsect_);
   uint32_t last_reserved_bitrate_bps_ GUARDED_BY(*critsect_);
-  scoped_ptr<RembSuppressor> remb_suppressor_ GUARDED_BY(*critsect_);
+  rtc::scoped_ptr<RembSuppressor> remb_suppressor_ GUARDED_BY(*critsect_);
 
   DISALLOW_IMPLICIT_CONSTRUCTORS(BitrateControllerImpl);
 };
diff --git a/webrtc/modules/desktop_capture/cropped_desktop_frame.cc b/webrtc/modules/desktop_capture/cropped_desktop_frame.cc
index 0216768..9ab6fe9 100644
--- a/webrtc/modules/desktop_capture/cropped_desktop_frame.cc
+++ b/webrtc/modules/desktop_capture/cropped_desktop_frame.cc
@@ -18,7 +18,7 @@
   CroppedDesktopFrame(DesktopFrame* frame, const DesktopRect& rect);
 
  private:
-  scoped_ptr<DesktopFrame> frame_;
+  rtc::scoped_ptr<DesktopFrame> frame_;
 
   DISALLOW_COPY_AND_ASSIGN(CroppedDesktopFrame);
 };
diff --git a/webrtc/modules/desktop_capture/cropping_window_capturer.cc b/webrtc/modules/desktop_capture/cropping_window_capturer.cc
index 6b824e8..54a1c41 100644
--- a/webrtc/modules/desktop_capture/cropping_window_capturer.cc
+++ b/webrtc/modules/desktop_capture/cropping_window_capturer.cc
@@ -74,7 +74,7 @@
 }
 
 void CroppingWindowCapturer::OnCaptureCompleted(DesktopFrame* frame) {
-  scoped_ptr<DesktopFrame> screen_frame(frame);
+  rtc::scoped_ptr<DesktopFrame> screen_frame(frame);
 
   if (!ShouldUseScreenCapturer()) {
     LOG(LS_INFO) << "Window no longer on top when ScreenCapturer finishes";
@@ -95,7 +95,7 @@
     return;
   }
 
-  scoped_ptr<DesktopFrame> window_frame(
+  rtc::scoped_ptr<DesktopFrame> window_frame(
       CreateCroppedDesktopFrame(screen_frame.release(), window_rect));
   callback_->OnCaptureCompleted(window_frame.release());
 }
diff --git a/webrtc/modules/desktop_capture/cropping_window_capturer.h b/webrtc/modules/desktop_capture/cropping_window_capturer.h
index 2a5154e..4c30066 100644
--- a/webrtc/modules/desktop_capture/cropping_window_capturer.h
+++ b/webrtc/modules/desktop_capture/cropping_window_capturer.h
@@ -11,10 +11,10 @@
 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_CROPPING_WINDOW_CAPTURER_H_
 #define WEBRTC_MODULES_DESKTOP_CAPTURE_CROPPING_WINDOW_CAPTURER_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/desktop_capture_options.h"
 #include "webrtc/modules/desktop_capture/screen_capturer.h"
 #include "webrtc/modules/desktop_capture/window_capturer.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -62,8 +62,8 @@
  private:
   DesktopCaptureOptions options_;
   DesktopCapturer::Callback* callback_;
-  scoped_ptr<WindowCapturer> window_capturer_;
-  scoped_ptr<ScreenCapturer> screen_capturer_;
+  rtc::scoped_ptr<WindowCapturer> window_capturer_;
+  rtc::scoped_ptr<ScreenCapturer> screen_capturer_;
   WindowId selected_window_;
   WindowId excluded_window_;
 };
diff --git a/webrtc/modules/desktop_capture/desktop_and_cursor_composer.cc b/webrtc/modules/desktop_capture/desktop_and_cursor_composer.cc
index 2547ba3..f5a7fe8 100644
--- a/webrtc/modules/desktop_capture/desktop_and_cursor_composer.cc
+++ b/webrtc/modules/desktop_capture/desktop_and_cursor_composer.cc
@@ -62,10 +62,10 @@
   virtual ~DesktopFrameWithCursor();
 
  private:
-  scoped_ptr<DesktopFrame> original_frame_;
+  rtc::scoped_ptr<DesktopFrame> original_frame_;
 
   DesktopVector restore_position_;
-  scoped_ptr<DesktopFrame> restore_frame_;
+  rtc::scoped_ptr<DesktopFrame> restore_frame_;
 
   DISALLOW_COPY_AND_ASSIGN(DesktopFrameWithCursor);
 };
diff --git a/webrtc/modules/desktop_capture/desktop_and_cursor_composer.h b/webrtc/modules/desktop_capture/desktop_and_cursor_composer.h
index 3fac021..d402486 100644
--- a/webrtc/modules/desktop_capture/desktop_and_cursor_composer.h
+++ b/webrtc/modules/desktop_capture/desktop_and_cursor_composer.h
@@ -11,9 +11,9 @@
 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_AND_CURSOR_COMPOSER_H_
 #define WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_AND_CURSOR_COMPOSER_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/desktop_capturer.h"
 #include "webrtc/modules/desktop_capture/mouse_cursor_monitor.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -46,12 +46,12 @@
   virtual void OnMouseCursorPosition(MouseCursorMonitor::CursorState state,
                                      const DesktopVector& position) OVERRIDE;
 
-  scoped_ptr<DesktopCapturer> desktop_capturer_;
-  scoped_ptr<MouseCursorMonitor> mouse_monitor_;
+  rtc::scoped_ptr<DesktopCapturer> desktop_capturer_;
+  rtc::scoped_ptr<MouseCursorMonitor> mouse_monitor_;
 
   DesktopCapturer::Callback* callback_;
 
-  scoped_ptr<MouseCursor> cursor_;
+  rtc::scoped_ptr<MouseCursor> cursor_;
   MouseCursorMonitor::CursorState cursor_state_;
   DesktopVector cursor_position_;
 
diff --git a/webrtc/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc b/webrtc/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc
index d2579a1..f1129ab 100644
--- a/webrtc/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc
+++ b/webrtc/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc
@@ -11,13 +11,13 @@
 #include "webrtc/modules/desktop_capture/desktop_and_cursor_composer.h"
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/desktop_capture_options.h"
 #include "webrtc/modules/desktop_capture/desktop_frame.h"
 #include "webrtc/modules/desktop_capture/mouse_cursor.h"
 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h"
 #include "webrtc/modules/desktop_capture/window_capturer.h"
 #include "webrtc/system_wrappers/interface/logging.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -89,7 +89,7 @@
  private:
   Callback* callback_;
 
-  scoped_ptr<DesktopFrame> next_frame_;
+  rtc::scoped_ptr<DesktopFrame> next_frame_;
 };
 
 class FakeMouseMonitor : public MouseCursorMonitor {
@@ -113,7 +113,7 @@
 
   virtual void Capture() OVERRIDE {
     if (changed_) {
-      scoped_ptr<DesktopFrame> image(
+      rtc::scoped_ptr<DesktopFrame> image(
           new BasicDesktopFrame(DesktopSize(kCursorWidth, kCursorHeight)));
       uint32_t* data = reinterpret_cast<uint32_t*>(image->data());
       memset(data, 0, image->stride() * kCursorHeight);
@@ -186,7 +186,7 @@
   FakeMouseMonitor* fake_cursor_;
 
   DesktopAndCursorComposer blender_;
-  scoped_ptr<DesktopFrame> frame_;
+  rtc::scoped_ptr<DesktopFrame> frame_;
 };
 
 // Verify DesktopAndCursorComposer can handle the case when the screen capturer
@@ -238,7 +238,7 @@
     DesktopVector pos(tests[i].x, tests[i].y);
     fake_cursor_->SetState(state, pos);
 
-    scoped_ptr<SharedDesktopFrame> frame(
+    rtc::scoped_ptr<SharedDesktopFrame> frame(
         SharedDesktopFrame::Wrap(CreateTestFrame()));
     fake_screen_->SetNextFrame(frame->Share());
 
diff --git a/webrtc/modules/desktop_capture/desktop_frame.h b/webrtc/modules/desktop_capture/desktop_frame.h
index 047ee63..29d5076 100644
--- a/webrtc/modules/desktop_capture/desktop_frame.h
+++ b/webrtc/modules/desktop_capture/desktop_frame.h
@@ -11,10 +11,10 @@
 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_H_
 #define WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/desktop_geometry.h"
 #include "webrtc/modules/desktop_capture/desktop_region.h"
 #include "webrtc/modules/desktop_capture/shared_memory.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -88,7 +88,7 @@
   DesktopRegion updated_region_;
   DesktopVector dpi_;
   int64_t capture_time_ms_;
-  scoped_ptr<DesktopRegion> shape_;
+  rtc::scoped_ptr<DesktopRegion> shape_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(DesktopFrame);
diff --git a/webrtc/modules/desktop_capture/desktop_frame_win.h b/webrtc/modules/desktop_capture/desktop_frame_win.h
index eb9c5a3..9530fdc 100644
--- a/webrtc/modules/desktop_capture/desktop_frame_win.h
+++ b/webrtc/modules/desktop_capture/desktop_frame_win.h
@@ -13,8 +13,8 @@
 
 #include <windows.h>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/desktop_frame.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -38,7 +38,7 @@
                   HBITMAP bitmap);
 
   HBITMAP bitmap_;
-  scoped_ptr<SharedMemory> owned_shared_memory_;
+  rtc::scoped_ptr<SharedMemory> owned_shared_memory_;
 
   DISALLOW_COPY_AND_ASSIGN(DesktopFrameWin);
 };
diff --git a/webrtc/modules/desktop_capture/differ.h b/webrtc/modules/desktop_capture/differ.h
index 0b419d2..d5e21db 100644
--- a/webrtc/modules/desktop_capture/differ.h
+++ b/webrtc/modules/desktop_capture/differ.h
@@ -13,8 +13,8 @@
 
 #include <vector>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/desktop_region.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -76,7 +76,7 @@
   int bytes_per_row_;
 
   // Diff information for each block in the image.
-  scoped_ptr<DiffInfo[]> diff_info_;
+  rtc::scoped_ptr<DiffInfo[]> diff_info_;
 
   // Dimensions and total size of diff info array.
   int diff_info_width_;
diff --git a/webrtc/modules/desktop_capture/differ_unittest.cc b/webrtc/modules/desktop_capture/differ_unittest.cc
index da1a214..019e952 100644
--- a/webrtc/modules/desktop_capture/differ_unittest.cc
+++ b/webrtc/modules/desktop_capture/differ_unittest.cc
@@ -9,9 +9,9 @@
  */
 
 #include "testing/gmock/include/gmock/gmock.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/differ.h"
 #include "webrtc/modules/desktop_capture/differ_block.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -188,7 +188,7 @@
   }
 
   // The differ class we're testing.
-  scoped_ptr<Differ> differ_;
+  rtc::scoped_ptr<Differ> differ_;
 
   // Screen/buffer info.
   int width_;
@@ -200,8 +200,8 @@
   int buffer_size_;
 
   // Previous and current screen buffers.
-  scoped_ptr<uint8_t[]> prev_;
-  scoped_ptr<uint8_t[]> curr_;
+  rtc::scoped_ptr<uint8_t[]> prev_;
+  rtc::scoped_ptr<uint8_t[]> curr_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(DifferTest);
diff --git a/webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h b/webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h
index 27143a8..bd502f0 100644
--- a/webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h
+++ b/webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h
@@ -15,9 +15,9 @@
 
 #include <set>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/mac/desktop_configuration.h"
 #include "webrtc/system_wrappers/interface/atomic32.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -56,7 +56,7 @@
   Atomic32 ref_count_;
   std::set<CGDirectDisplayID> reconfiguring_displays_;
   MacDesktopConfiguration desktop_configuration_;
-  scoped_ptr<EventWrapper> display_configuration_capture_event_;
+  rtc::scoped_ptr<EventWrapper> display_configuration_capture_event_;
 
   DISALLOW_COPY_AND_ASSIGN(DesktopConfigurationMonitor);
 };
diff --git a/webrtc/modules/desktop_capture/mouse_cursor.h b/webrtc/modules/desktop_capture/mouse_cursor.h
index 22887f9..1da98a4 100644
--- a/webrtc/modules/desktop_capture/mouse_cursor.h
+++ b/webrtc/modules/desktop_capture/mouse_cursor.h
@@ -12,8 +12,8 @@
 #define WEBRTC_MODULES_DESKTOP_CAPTURE_MOUSE_CURSOR_H_
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/desktop_geometry.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -37,7 +37,7 @@
   const DesktopVector& hotspot() const { return hotspot_; }
 
  private:
-  scoped_ptr<DesktopFrame> image_;
+  rtc::scoped_ptr<DesktopFrame> image_;
   DesktopVector hotspot_;
 
   DISALLOW_COPY_AND_ASSIGN(MouseCursor);
diff --git a/webrtc/modules/desktop_capture/mouse_cursor_monitor_mac.mm b/webrtc/modules/desktop_capture/mouse_cursor_monitor_mac.mm
index 331ee80..325feae 100644
--- a/webrtc/modules/desktop_capture/mouse_cursor_monitor_mac.mm
+++ b/webrtc/modules/desktop_capture/mouse_cursor_monitor_mac.mm
@@ -16,6 +16,7 @@
 #include <CoreFoundation/CoreFoundation.h>
 
 #include "webrtc/base/macutils.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/desktop_capture_options.h"
 #include "webrtc/modules/desktop_capture/desktop_frame.h"
 #include "webrtc/modules/desktop_capture/mac/desktop_configuration.h"
@@ -23,7 +24,6 @@
 #include "webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.h"
 #include "webrtc/modules/desktop_capture/mouse_cursor.h"
 #include "webrtc/system_wrappers/interface/logging.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/scoped_refptr.h"
 
 namespace webrtc {
@@ -52,7 +52,7 @@
   ScreenId screen_id_;
   Callback* callback_;
   Mode mode_;
-  scoped_ptr<MouseCursor> last_cursor_;
+  rtc::scoped_ptr<MouseCursor> last_cursor_;
   scoped_refptr<FullScreenChromeWindowDetector>
       full_screen_chrome_window_detector_;
 };
@@ -268,14 +268,15 @@
 
   // Create a MouseCursor that describes the cursor and pass it to
   // the client.
-  scoped_ptr<DesktopFrame> image(
+  rtc::scoped_ptr<DesktopFrame> image(
       new BasicDesktopFrame(DesktopSize(size.width(), size.height())));
   memcpy(image->data(), src_data,
          size.width() * size.height() * DesktopFrame::kBytesPerPixel);
 
   CFRelease(image_data_ref);
 
-  scoped_ptr<MouseCursor> cursor(new MouseCursor(image.release(), hotspot));
+  rtc::scoped_ptr<MouseCursor> cursor(
+      new MouseCursor(image.release(), hotspot));
   last_cursor_.reset(MouseCursor::CopyOf(*cursor));
 
   callback_->OnMouseCursor(cursor.release());
diff --git a/webrtc/modules/desktop_capture/mouse_cursor_monitor_unittest.cc b/webrtc/modules/desktop_capture/mouse_cursor_monitor_unittest.cc
index 5a541d0..36963a9 100644
--- a/webrtc/modules/desktop_capture/mouse_cursor_monitor_unittest.cc
+++ b/webrtc/modules/desktop_capture/mouse_cursor_monitor_unittest.cc
@@ -11,12 +11,12 @@
 #include "webrtc/modules/desktop_capture/mouse_cursor_monitor.h"
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/desktop_capture_options.h"
 #include "webrtc/modules/desktop_capture/desktop_frame.h"
 #include "webrtc/modules/desktop_capture/mouse_cursor.h"
 #include "webrtc/modules/desktop_capture/window_capturer.h"
 #include "webrtc/system_wrappers/interface/logging.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -40,7 +40,7 @@
   }
 
  protected:
-  scoped_ptr<MouseCursor> cursor_image_;
+  rtc::scoped_ptr<MouseCursor> cursor_image_;
   MouseCursorMonitor::CursorState state_;
   DesktopVector position_;
   bool position_received_;
@@ -62,8 +62,10 @@
 #endif
 
 TEST_F(MouseCursorMonitorTest, MAYBE(FromScreen)) {
-  scoped_ptr<MouseCursorMonitor> capturer(MouseCursorMonitor::CreateForScreen(
-      DesktopCaptureOptions::CreateDefault(), webrtc::kFullDesktopScreenId));
+  rtc::scoped_ptr<MouseCursorMonitor> capturer(
+      MouseCursorMonitor::CreateForScreen(
+          DesktopCaptureOptions::CreateDefault(),
+          webrtc::kFullDesktopScreenId));
   assert(capturer.get());
   capturer->Init(this, MouseCursorMonitor::SHAPE_AND_POSITION);
   capturer->Capture();
@@ -84,7 +86,8 @@
   DesktopCaptureOptions options = DesktopCaptureOptions::CreateDefault();
 
   // First get list of windows.
-  scoped_ptr<WindowCapturer> window_capturer(WindowCapturer::Create(options));
+  rtc::scoped_ptr<WindowCapturer> window_capturer(
+      WindowCapturer::Create(options));
 
   // If window capturing is not supported then skip this test.
   if (!window_capturer.get())
@@ -98,7 +101,7 @@
     cursor_image_.reset();
     position_received_ = false;
 
-    scoped_ptr<MouseCursorMonitor> capturer(
+    rtc::scoped_ptr<MouseCursorMonitor> capturer(
         MouseCursorMonitor::CreateForWindow(
             DesktopCaptureOptions::CreateDefault(), windows[i].id));
     assert(capturer.get());
@@ -113,8 +116,10 @@
 
 // Make sure that OnMouseCursorPosition() is not called in the SHAPE_ONLY mode.
 TEST_F(MouseCursorMonitorTest, MAYBE(ShapeOnly)) {
-  scoped_ptr<MouseCursorMonitor> capturer(MouseCursorMonitor::CreateForScreen(
-      DesktopCaptureOptions::CreateDefault(), webrtc::kFullDesktopScreenId));
+  rtc::scoped_ptr<MouseCursorMonitor> capturer(
+      MouseCursorMonitor::CreateForScreen(
+          DesktopCaptureOptions::CreateDefault(),
+          webrtc::kFullDesktopScreenId));
   assert(capturer.get());
   capturer->Init(this, MouseCursorMonitor::SHAPE_ONLY);
   capturer->Capture();
diff --git a/webrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc b/webrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc
index fd0b222..8421161 100644
--- a/webrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc
+++ b/webrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc
@@ -93,7 +93,7 @@
   if (last_cursor_ != cursor_info.hCursor) {
     last_cursor_ = cursor_info.hCursor;
     // Note that |cursor_info.hCursor| does not need to be freed.
-    scoped_ptr<MouseCursor> cursor(
+    rtc::scoped_ptr<MouseCursor> cursor(
         CreateMouseCursorFromHCursor(desktop_dc_, cursor_info.hCursor));
     if (cursor.get())
       callback_->OnMouseCursor(cursor.release());
diff --git a/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.cc b/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.cc
index f5c454e..b116474 100644
--- a/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.cc
+++ b/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.cc
@@ -14,12 +14,12 @@
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/desktop_capture_options.h"
 #include "webrtc/modules/desktop_capture/desktop_frame.h"
 #include "webrtc/modules/desktop_capture/mouse_cursor.h"
 #include "webrtc/modules/desktop_capture/x11/x_error_trap.h"
 #include "webrtc/system_wrappers/interface/logging.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace {
 
@@ -84,7 +84,7 @@
   int xfixes_event_base_;
   int xfixes_error_base_;
 
-  scoped_ptr<MouseCursor> cursor_shape_;
+  rtc::scoped_ptr<MouseCursor> cursor_shape_;
 };
 
 MouseCursorMonitorX11::MouseCursorMonitorX11(
@@ -190,8 +190,8 @@
        return;
    }
 
-  scoped_ptr<DesktopFrame> image(
-      new BasicDesktopFrame(DesktopSize(img->width, img->height)));
+   rtc::scoped_ptr<DesktopFrame> image(
+       new BasicDesktopFrame(DesktopSize(img->width, img->height)));
 
   // Xlib stores 32-bit data in longs, even if longs are 64-bits long.
   unsigned long* src = img->pixels;
diff --git a/webrtc/modules/desktop_capture/screen_capture_frame_queue.h b/webrtc/modules/desktop_capture/screen_capture_frame_queue.h
index 69f1bdf..f3b11cf 100644
--- a/webrtc/modules/desktop_capture/screen_capture_frame_queue.h
+++ b/webrtc/modules/desktop_capture/screen_capture_frame_queue.h
@@ -11,8 +11,8 @@
 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURE_FRAME_QUEUE_H_
 #define WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURE_FRAME_QUEUE_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -64,7 +64,7 @@
   int current_;
 
   static const int kQueueLength = 2;
-  scoped_ptr<SharedDesktopFrame> frames_[kQueueLength];
+  rtc::scoped_ptr<SharedDesktopFrame> frames_[kQueueLength];
 
   DISALLOW_COPY_AND_ASSIGN(ScreenCaptureFrameQueue);
 };
diff --git a/webrtc/modules/desktop_capture/screen_capturer.h b/webrtc/modules/desktop_capture/screen_capturer.h
index f37733c..fbfb0e5 100644
--- a/webrtc/modules/desktop_capture/screen_capturer.h
+++ b/webrtc/modules/desktop_capture/screen_capturer.h
@@ -13,9 +13,9 @@
 
 #include <vector>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/desktop_capture_types.h"
 #include "webrtc/modules/desktop_capture/desktop_capturer.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
diff --git a/webrtc/modules/desktop_capture/screen_capturer_helper.h b/webrtc/modules/desktop_capture/screen_capturer_helper.h
index 07eda69..a8be989 100644
--- a/webrtc/modules/desktop_capture/screen_capturer_helper.h
+++ b/webrtc/modules/desktop_capture/screen_capturer_helper.h
@@ -11,10 +11,10 @@
 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_HELPER_H_
 #define WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_HELPER_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/desktop_geometry.h"
 #include "webrtc/modules/desktop_capture/desktop_region.h"
 #include "webrtc/system_wrappers/interface/rw_lock_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -70,7 +70,7 @@
   DesktopRegion invalid_region_;
 
   // A lock protecting |invalid_region_| across threads.
-  scoped_ptr<RWLockWrapper> invalid_region_lock_;
+  rtc::scoped_ptr<RWLockWrapper> invalid_region_lock_;
 
   // The size of the most recently captured screen.
   DesktopSize size_most_recent_;
diff --git a/webrtc/modules/desktop_capture/screen_capturer_helper_unittest.cc b/webrtc/modules/desktop_capture/screen_capturer_helper_unittest.cc
index f7f1386..1ebc0af 100644
--- a/webrtc/modules/desktop_capture/screen_capturer_helper_unittest.cc
+++ b/webrtc/modules/desktop_capture/screen_capturer_helper_unittest.cc
@@ -11,7 +11,7 @@
 #include "webrtc/modules/desktop_capture/screen_capturer_helper.h"
 
 #include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
 
diff --git a/webrtc/modules/desktop_capture/screen_capturer_mac.mm b/webrtc/modules/desktop_capture/screen_capturer_mac.mm
index d4200e2..af98e73 100644
--- a/webrtc/modules/desktop_capture/screen_capturer_mac.mm
+++ b/webrtc/modules/desktop_capture/screen_capturer_mac.mm
@@ -21,6 +21,7 @@
 #include <OpenGL/OpenGL.h>
 
 #include "webrtc/base/macutils.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/desktop_capture_options.h"
 #include "webrtc/modules/desktop_capture/desktop_frame.h"
 #include "webrtc/modules/desktop_capture/desktop_geometry.h"
@@ -31,7 +32,6 @@
 #include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h"
 #include "webrtc/modules/desktop_capture/screen_capturer_helper.h"
 #include "webrtc/system_wrappers/interface/logging.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/tick_util.h"
 
 namespace webrtc {
@@ -301,7 +301,7 @@
   virtual ~InvertedDesktopFrame() {}
 
  private:
-  scoped_ptr<DesktopFrame> original_frame_;
+  rtc::scoped_ptr<DesktopFrame> original_frame_;
 
   DISALLOW_COPY_AND_ASSIGN(InvertedDesktopFrame);
 };
@@ -957,7 +957,7 @@
 }
 
 DesktopFrame* ScreenCapturerMac::CreateFrame() {
-  scoped_ptr<DesktopFrame> frame(
+  rtc::scoped_ptr<DesktopFrame> frame(
       new BasicDesktopFrame(screen_pixel_bounds_.size()));
 
   frame->set_dpi(DesktopVector(kStandardDPI * dip_to_pixel_scale_,
@@ -972,7 +972,7 @@
   if (!options.configuration_monitor())
     return NULL;
 
-  scoped_ptr<ScreenCapturerMac> capturer(
+  rtc::scoped_ptr<ScreenCapturerMac> capturer(
       new ScreenCapturerMac(options.configuration_monitor()));
   if (!capturer->Init())
     capturer.reset();
diff --git a/webrtc/modules/desktop_capture/screen_capturer_mac_unittest.cc b/webrtc/modules/desktop_capture/screen_capturer_mac_unittest.cc
index a51a479..c99138d 100644
--- a/webrtc/modules/desktop_capture/screen_capturer_mac_unittest.cc
+++ b/webrtc/modules/desktop_capture/screen_capturer_mac_unittest.cc
@@ -15,12 +15,12 @@
 #include <ostream>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/desktop_frame.h"
 #include "webrtc/modules/desktop_capture/desktop_geometry.h"
 #include "webrtc/modules/desktop_capture/desktop_region.h"
 #include "webrtc/modules/desktop_capture/mac/desktop_configuration.h"
 #include "webrtc/modules/desktop_capture/screen_capturer_mock_objects.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 using ::testing::_;
 using ::testing::AnyNumber;
@@ -42,13 +42,13 @@
     capturer_.reset(ScreenCapturer::Create());
   }
 
-  scoped_ptr<ScreenCapturer> capturer_;
+  rtc::scoped_ptr<ScreenCapturer> capturer_;
   MockScreenCapturerCallback callback_;
 };
 
 void ScreenCapturerMacTest::CaptureDoneCallback1(
     DesktopFrame* frame) {
-  scoped_ptr<DesktopFrame> owned_frame(frame);
+  rtc::scoped_ptr<DesktopFrame> owned_frame(frame);
 
   MacDesktopConfiguration config = MacDesktopConfiguration::GetCurrent(
       MacDesktopConfiguration::BottomLeftOrigin);
@@ -60,7 +60,7 @@
 
 void ScreenCapturerMacTest::CaptureDoneCallback2(
     DesktopFrame* frame) {
-  scoped_ptr<DesktopFrame> owned_frame(frame);
+  rtc::scoped_ptr<DesktopFrame> owned_frame(frame);
 
   MacDesktopConfiguration config = MacDesktopConfiguration::GetCurrent(
       MacDesktopConfiguration::BottomLeftOrigin);
diff --git a/webrtc/modules/desktop_capture/screen_capturer_unittest.cc b/webrtc/modules/desktop_capture/screen_capturer_unittest.cc
index 1a4b9cf..34eab7e 100644
--- a/webrtc/modules/desktop_capture/screen_capturer_unittest.cc
+++ b/webrtc/modules/desktop_capture/screen_capturer_unittest.cc
@@ -36,7 +36,7 @@
   }
 
  protected:
-  scoped_ptr<ScreenCapturer> capturer_;
+  rtc::scoped_ptr<ScreenCapturer> capturer_;
   MockScreenCapturerCallback callback_;
 };
 
diff --git a/webrtc/modules/desktop_capture/screen_capturer_win.cc b/webrtc/modules/desktop_capture/screen_capturer_win.cc
index 5950795..1f33155 100644
--- a/webrtc/modules/desktop_capture/screen_capturer_win.cc
+++ b/webrtc/modules/desktop_capture/screen_capturer_win.cc
@@ -18,7 +18,8 @@
 
 // static
 ScreenCapturer* ScreenCapturer::Create(const DesktopCaptureOptions& options) {
-  scoped_ptr<ScreenCapturer> gdi_capturer(new ScreenCapturerWinGdi(options));
+  rtc::scoped_ptr<ScreenCapturer> gdi_capturer(
+      new ScreenCapturerWinGdi(options));
 
   if (options.allow_use_magnification_api())
     return new ScreenCapturerWinMagnifier(gdi_capturer.Pass());
diff --git a/webrtc/modules/desktop_capture/screen_capturer_x11.cc b/webrtc/modules/desktop_capture/screen_capturer_x11.cc
index 0064faa..0a758f9 100644
--- a/webrtc/modules/desktop_capture/screen_capturer_x11.cc
+++ b/webrtc/modules/desktop_capture/screen_capturer_x11.cc
@@ -18,6 +18,7 @@
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/desktop_capture_options.h"
 #include "webrtc/modules/desktop_capture/desktop_frame.h"
 #include "webrtc/modules/desktop_capture/differ.h"
@@ -25,7 +26,6 @@
 #include "webrtc/modules/desktop_capture/screen_capturer_helper.h"
 #include "webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.h"
 #include "webrtc/system_wrappers/interface/logging.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/tick_util.h"
 
 // TODO(sergeyu): Move this to a header where it can be shared.
@@ -119,7 +119,7 @@
   DesktopRegion last_invalid_region_;
 
   // |Differ| for use when polling for changes.
-  scoped_ptr<Differ> differ_;
+  rtc::scoped_ptr<Differ> differ_;
 
   DISALLOW_COPY_AND_ASSIGN(ScreenCapturerLinux);
 };
@@ -260,7 +260,7 @@
   // Note that we can't reallocate other buffers at this point, since the caller
   // may still be reading from them.
   if (!queue_.current_frame()) {
-    scoped_ptr<DesktopFrame> frame(
+    rtc::scoped_ptr<DesktopFrame> frame(
         new BasicDesktopFrame(x_server_pixel_buffer_.window_size()));
     queue_.ReplaceCurrentFrame(frame.release());
   }
@@ -442,7 +442,7 @@
   if (!options.x_display())
     return NULL;
 
-  scoped_ptr<ScreenCapturerLinux> capturer(new ScreenCapturerLinux());
+  rtc::scoped_ptr<ScreenCapturerLinux> capturer(new ScreenCapturerLinux());
   if (!capturer->Init(options))
     capturer.reset();
   return capturer.release();
diff --git a/webrtc/modules/desktop_capture/shared_desktop_frame.cc b/webrtc/modules/desktop_capture/shared_desktop_frame.cc
index 29a5919..591b622 100644
--- a/webrtc/modules/desktop_capture/shared_desktop_frame.cc
+++ b/webrtc/modules/desktop_capture/shared_desktop_frame.cc
@@ -10,8 +10,8 @@
 
 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h"
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/atomic32.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -39,7 +39,7 @@
   virtual ~Core() {}
 
   Atomic32 ref_count_;
-  scoped_ptr<DesktopFrame> frame_;
+  rtc::scoped_ptr<DesktopFrame> frame_;
 
   DISALLOW_COPY_AND_ASSIGN(Core);
 };
diff --git a/webrtc/modules/desktop_capture/win/cursor.cc b/webrtc/modules/desktop_capture/win/cursor.cc
index 2e108f6..35c5190 100644
--- a/webrtc/modules/desktop_capture/win/cursor.cc
+++ b/webrtc/modules/desktop_capture/win/cursor.cc
@@ -12,12 +12,12 @@
 
 #include <algorithm>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/win/scoped_gdi_object.h"
 #include "webrtc/modules/desktop_capture/desktop_frame.h"
 #include "webrtc/modules/desktop_capture/desktop_geometry.h"
 #include "webrtc/modules/desktop_capture/mouse_cursor.h"
 #include "webrtc/system_wrappers/interface/logging.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -136,7 +136,7 @@
 
   int width = bitmap_info.bmWidth;
   int height = bitmap_info.bmHeight;
-  scoped_ptr<uint32_t[]> mask_data(new uint32_t[width * height]);
+  rtc::scoped_ptr<uint32_t[]> mask_data(new uint32_t[width * height]);
 
   // Get pixel data from |scoped_mask| converting it to 32bpp along the way.
   // GetDIBits() sets the alpha component of every pixel to 0.
@@ -163,7 +163,7 @@
   }
 
   uint32_t* mask_plane = mask_data.get();
-  scoped_ptr<DesktopFrame> image(
+  rtc::scoped_ptr<DesktopFrame> image(
       new BasicDesktopFrame(DesktopSize(width, height)));
   bool has_alpha = false;
 
diff --git a/webrtc/modules/desktop_capture/win/cursor_unittest.cc b/webrtc/modules/desktop_capture/win/cursor_unittest.cc
index b046ace..32bab13 100644
--- a/webrtc/modules/desktop_capture/win/cursor_unittest.cc
+++ b/webrtc/modules/desktop_capture/win/cursor_unittest.cc
@@ -9,13 +9,13 @@
  */
 
 #include "testing/gmock/include/gmock/gmock.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/desktop_frame.h"
 #include "webrtc/modules/desktop_capture/desktop_geometry.h"
 #include "webrtc/modules/desktop_capture/mouse_cursor.h"
 #include "webrtc/modules/desktop_capture/win/cursor.h"
 #include "webrtc/modules/desktop_capture/win/cursor_unittest_resources.h"
 #include "webrtc/modules/desktop_capture/win/scoped_gdi_object.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -34,7 +34,7 @@
 
   // Convert |cursor| to |mouse_shape|.
   HDC dc = GetDC(NULL);
-  scoped_ptr<MouseCursor> mouse_shape(
+  rtc::scoped_ptr<MouseCursor> mouse_shape(
       CreateMouseCursorFromHCursor(dc, cursor));
   ReleaseDC(NULL, dc);
 
@@ -62,7 +62,7 @@
 
   // Get the pixels from |scoped_color|.
   int size = width * height;
-  scoped_ptr<uint32_t[]> data(new uint32_t[size]);
+  rtc::scoped_ptr<uint32_t[]> data(new uint32_t[size]);
   EXPECT_TRUE(GetBitmapBits(scoped_color, size * sizeof(uint32_t), data.get()));
 
   // Compare the 32bpp image in |mouse_shape| with the one loaded from |right|.
diff --git a/webrtc/modules/desktop_capture/win/desktop.h b/webrtc/modules/desktop_capture/win/desktop.h
index fda56ca..0f3e64d 100644
--- a/webrtc/modules/desktop_capture/win/desktop.h
+++ b/webrtc/modules/desktop_capture/win/desktop.h
@@ -15,7 +15,7 @@
 #include <string>
 
 #include "webrtc/base/constructormagic.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
 
diff --git a/webrtc/modules/desktop_capture/win/scoped_thread_desktop.cc b/webrtc/modules/desktop_capture/win/scoped_thread_desktop.cc
index 09648d7..5666fc8 100644
--- a/webrtc/modules/desktop_capture/win/scoped_thread_desktop.cc
+++ b/webrtc/modules/desktop_capture/win/scoped_thread_desktop.cc
@@ -42,7 +42,7 @@
 bool ScopedThreadDesktop::SetThreadDesktop(Desktop* desktop) {
   Revert();
 
-  scoped_ptr<Desktop> scoped_desktop(desktop);
+  rtc::scoped_ptr<Desktop> scoped_desktop(desktop);
 
   if (initial_->IsSame(*desktop))
     return true;
diff --git a/webrtc/modules/desktop_capture/win/scoped_thread_desktop.h b/webrtc/modules/desktop_capture/win/scoped_thread_desktop.h
index f12731d..7566e6a 100644
--- a/webrtc/modules/desktop_capture/win/scoped_thread_desktop.h
+++ b/webrtc/modules/desktop_capture/win/scoped_thread_desktop.h
@@ -14,7 +14,7 @@
 #include <windows.h>
 
 #include "webrtc/base/constructormagic.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -40,10 +40,10 @@
 
  private:
   // The desktop handle assigned to the calling thread by Set
-  scoped_ptr<Desktop> assigned_;
+  rtc::scoped_ptr<Desktop> assigned_;
 
   // The desktop handle assigned to the calling thread at creation.
-  scoped_ptr<Desktop> initial_;
+  rtc::scoped_ptr<Desktop> initial_;
 
   DISALLOW_COPY_AND_ASSIGN(ScopedThreadDesktop);
 };
diff --git a/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc b/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc
index e6c0605..352433e 100644
--- a/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc
+++ b/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc
@@ -159,7 +159,7 @@
 void ScreenCapturerWinGdi::PrepareCaptureResources() {
   // Switch to the desktop receiving user input if different from the current
   // one.
-  scoped_ptr<Desktop> input_desktop(Desktop::GetInputDesktop());
+  rtc::scoped_ptr<Desktop> input_desktop(Desktop::GetInputDesktop());
   if (input_desktop.get() != NULL && !desktop_.IsSame(*input_desktop)) {
     // Release GDI resources otherwise SetThreadDesktop will fail.
     if (desktop_dc_) {
@@ -241,7 +241,7 @@
         DesktopFrame::kBytesPerPixel;
     SharedMemory* shared_memory = callback_->CreateSharedMemory(buffer_size);
 
-    scoped_ptr<DesktopFrame> buffer;
+    rtc::scoped_ptr<DesktopFrame> buffer;
     buffer.reset(
         DesktopFrameWin::Create(size, shared_memory, desktop_dc_));
     queue_.ReplaceCurrentFrame(buffer.release());
diff --git a/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.h b/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.h
index 2d48182..34de7de 100644
--- a/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.h
+++ b/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.h
@@ -15,10 +15,10 @@
 
 #include <windows.h>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h"
 #include "webrtc/modules/desktop_capture/screen_capturer_helper.h"
 #include "webrtc/modules/desktop_capture/win/scoped_thread_desktop.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -73,7 +73,7 @@
   DesktopRect desktop_dc_rect_;
 
   // Class to calculate the difference between two screen bitmaps.
-  scoped_ptr<Differ> differ_;
+  rtc::scoped_ptr<Differ> differ_;
 
   HMODULE dwmapi_library_;
   DwmEnableCompositionFunc composition_func_;
diff --git a/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc b/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc
index e0c9199..d812004 100644
--- a/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc
+++ b/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc
@@ -36,7 +36,7 @@
 Atomic32 ScreenCapturerWinMagnifier::tls_index_(TLS_OUT_OF_INDEXES);
 
 ScreenCapturerWinMagnifier::ScreenCapturerWinMagnifier(
-    scoped_ptr<ScreenCapturer> fallback_capturer)
+    rtc::scoped_ptr<ScreenCapturer> fallback_capturer)
     : fallback_capturer_(fallback_capturer.Pass()),
       fallback_capturer_started_(false),
       callback_(NULL),
@@ -95,7 +95,7 @@
   }
   // Switch to the desktop receiving user input if different from the current
   // one.
-  scoped_ptr<Desktop> input_desktop(Desktop::GetInputDesktop());
+  rtc::scoped_ptr<Desktop> input_desktop(Desktop::GetInputDesktop());
   if (input_desktop.get() != NULL && !desktop_.IsSame(*input_desktop)) {
     // Release GDI resources otherwise SetThreadDesktop will fail.
     if (desktop_dc_) {
@@ -425,7 +425,7 @@
         size.width() * size.height() * DesktopFrame::kBytesPerPixel;
     SharedMemory* shared_memory = callback_->CreateSharedMemory(buffer_size);
 
-    scoped_ptr<DesktopFrame> buffer;
+    rtc::scoped_ptr<DesktopFrame> buffer;
     if (shared_memory) {
       buffer.reset(new SharedMemoryDesktopFrame(
           size, size.width() * DesktopFrame::kBytesPerPixel, shared_memory));
diff --git a/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h b/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h
index 11278dd..53caaa2 100644
--- a/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h
+++ b/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h
@@ -16,12 +16,12 @@
 #include <wincodec.h>
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h"
 #include "webrtc/modules/desktop_capture/screen_capturer.h"
 #include "webrtc/modules/desktop_capture/screen_capturer_helper.h"
 #include "webrtc/modules/desktop_capture/win/scoped_thread_desktop.h"
 #include "webrtc/system_wrappers/interface/atomic32.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -39,7 +39,7 @@
   // screen is being captured, or the OS does not support Magnification API, or
   // the magnifier capturer fails (e.g. in Windows8 Metro mode).
   explicit ScreenCapturerWinMagnifier(
-      scoped_ptr<ScreenCapturer> fallback_capturer);
+      rtc::scoped_ptr<ScreenCapturer> fallback_capturer);
   virtual ~ScreenCapturerWinMagnifier();
 
   // Overridden from ScreenCapturer:
@@ -104,7 +104,7 @@
 
   static Atomic32 tls_index_;
 
-  scoped_ptr<ScreenCapturer> fallback_capturer_;
+  rtc::scoped_ptr<ScreenCapturer> fallback_capturer_;
   bool fallback_capturer_started_;
   Callback* callback_;
   ScreenId current_screen_id_;
@@ -119,7 +119,7 @@
   ScreenCaptureFrameQueue queue_;
 
   // Class to calculate the difference between two screen bitmaps.
-  scoped_ptr<Differ> differ_;
+  rtc::scoped_ptr<Differ> differ_;
 
   // Used to suppress duplicate logging of SetThreadExecutionState errors.
   bool set_thread_execution_state_failed_;
diff --git a/webrtc/modules/desktop_capture/window_capturer_unittest.cc b/webrtc/modules/desktop_capture/window_capturer_unittest.cc
index 9ac7d18..ac62c96 100644
--- a/webrtc/modules/desktop_capture/window_capturer_unittest.cc
+++ b/webrtc/modules/desktop_capture/window_capturer_unittest.cc
@@ -11,11 +11,11 @@
 #include "webrtc/modules/desktop_capture/window_capturer.h"
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/desktop_capture_options.h"
 #include "webrtc/modules/desktop_capture/desktop_frame.h"
 #include "webrtc/modules/desktop_capture/desktop_region.h"
 #include "webrtc/system_wrappers/interface/logging.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -40,8 +40,8 @@
   }
 
  protected:
-  scoped_ptr<WindowCapturer> capturer_;
-  scoped_ptr<DesktopFrame> frame_;
+  rtc::scoped_ptr<WindowCapturer> capturer_;
+  rtc::scoped_ptr<DesktopFrame> frame_;
 };
 
 // Verify that we can enumerate windows.
diff --git a/webrtc/modules/desktop_capture/window_capturer_win.cc b/webrtc/modules/desktop_capture/window_capturer_win.cc
index 3cb1048..5d6bf64 100644
--- a/webrtc/modules/desktop_capture/window_capturer_win.cc
+++ b/webrtc/modules/desktop_capture/window_capturer_win.cc
@@ -12,11 +12,11 @@
 
 #include <assert.h>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/win32.h"
 #include "webrtc/modules/desktop_capture/desktop_frame_win.h"
 #include "webrtc/modules/desktop_capture/win/window_capture_utils.h"
 #include "webrtc/system_wrappers/interface/logging.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -199,8 +199,8 @@
     return;
   }
 
-  scoped_ptr<DesktopFrameWin> frame(DesktopFrameWin::Create(
-      cropped_rect.size(), NULL, window_dc));
+  rtc::scoped_ptr<DesktopFrameWin> frame(
+      DesktopFrameWin::Create(cropped_rect.size(), NULL, window_dc));
   if (!frame.get()) {
     ReleaseDC(window_, window_dc);
     callback_->OnCaptureCompleted(NULL);
diff --git a/webrtc/modules/desktop_capture/window_capturer_x11.cc b/webrtc/modules/desktop_capture/window_capturer_x11.cc
index 4945423..0a90b0c 100755
--- a/webrtc/modules/desktop_capture/window_capturer_x11.cc
+++ b/webrtc/modules/desktop_capture/window_capturer_x11.cc
@@ -19,13 +19,13 @@
 
 #include <algorithm>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/desktop_capture/desktop_capture_options.h"
 #include "webrtc/modules/desktop_capture/desktop_frame.h"
 #include "webrtc/modules/desktop_capture/x11/shared_x_display.h"
 #include "webrtc/modules/desktop_capture/x11/x_error_trap.h"
 #include "webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.h"
 #include "webrtc/system_wrappers/interface/logging.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/scoped_refptr.h"
 
 namespace webrtc {
diff --git a/webrtc/modules/pacing/include/paced_sender.h b/webrtc/modules/pacing/include/paced_sender.h
index 76d8b60..efd4217 100644
--- a/webrtc/modules/pacing/include/paced_sender.h
+++ b/webrtc/modules/pacing/include/paced_sender.h
@@ -14,9 +14,9 @@
 #include <list>
 #include <set>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/modules/interface/module.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -138,25 +138,26 @@
   Clock* const clock_;
   Callback* const callback_;
 
-  scoped_ptr<CriticalSectionWrapper> critsect_;
+  rtc::scoped_ptr<CriticalSectionWrapper> critsect_;
   bool enabled_ GUARDED_BY(critsect_);
   bool paused_ GUARDED_BY(critsect_);
   bool probing_enabled_;
   // This is the media budget, keeping track of how many bits of media
   // we can pace out during the current interval.
-  scoped_ptr<paced_sender::IntervalBudget> media_budget_ GUARDED_BY(critsect_);
+  rtc::scoped_ptr<paced_sender::IntervalBudget> media_budget_
+      GUARDED_BY(critsect_);
   // This is the padding budget, keeping track of how many bits of padding we're
   // allowed to send out during the current interval. This budget will be
   // utilized when there's no media to send.
-  scoped_ptr<paced_sender::IntervalBudget> padding_budget_
+  rtc::scoped_ptr<paced_sender::IntervalBudget> padding_budget_
       GUARDED_BY(critsect_);
 
-  scoped_ptr<BitrateProber> prober_ GUARDED_BY(critsect_);
+  rtc::scoped_ptr<BitrateProber> prober_ GUARDED_BY(critsect_);
   int bitrate_bps_ GUARDED_BY(critsect_);
 
   int64_t time_last_update_us_ GUARDED_BY(critsect_);
 
-  scoped_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_);
+  rtc::scoped_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_);
   uint64_t packet_counter_;
 };
 }  // namespace webrtc
diff --git a/webrtc/modules/pacing/paced_sender_unittest.cc b/webrtc/modules/pacing/paced_sender_unittest.cc
index 29b856c..e82a49e 100644
--- a/webrtc/modules/pacing/paced_sender_unittest.cc
+++ b/webrtc/modules/pacing/paced_sender_unittest.cc
@@ -130,7 +130,7 @@
 
   SimulatedClock clock_;
   MockPacedSenderCallback callback_;
-  scoped_ptr<PacedSender> send_bucket_;
+  rtc::scoped_ptr<PacedSender> send_bucket_;
 };
 
 TEST_F(PacedSenderTest, QueuePacket) {
diff --git a/webrtc/modules/remote_bitrate_estimator/bwe_simulations.cc b/webrtc/modules/remote_bitrate_estimator/bwe_simulations.cc
index 6cc67a1..de28c9a 100644
--- a/webrtc/modules/remote_bitrate_estimator/bwe_simulations.cc
+++ b/webrtc/modules/remote_bitrate_estimator/bwe_simulations.cc
@@ -205,8 +205,8 @@
   VerboseLogging(true);
   const int kAllFlowIds[] = {0, 1, 2};
   const size_t kNumFlows = sizeof(kAllFlowIds) / sizeof(kAllFlowIds[0]);
-  scoped_ptr<AdaptiveVideoSource> sources[kNumFlows];
-  scoped_ptr<PacketSender> senders[kNumFlows];
+  rtc::scoped_ptr<AdaptiveVideoSource> sources[kNumFlows];
+  rtc::scoped_ptr<PacketSender> senders[kNumFlows];
   for (size_t i = 0; i < kNumFlows; ++i) {
     // Streams started 20 seconds apart to give them different advantage when
     // competing for the bandwidth.
@@ -218,7 +218,7 @@
   ChokeFilter choke(&uplink_, CreateFlowIds(kAllFlowIds, kNumFlows));
   choke.SetCapacity(1000);
 
-  scoped_ptr<RateCounterFilter> rate_counters[kNumFlows];
+  rtc::scoped_ptr<RateCounterFilter> rate_counters[kNumFlows];
   for (size_t i = 0; i < kNumFlows; ++i) {
     rate_counters[i].reset(new RateCounterFilter(
         &uplink_, CreateFlowIds(&kAllFlowIds[i], 1), "receiver_input"));
@@ -240,8 +240,8 @@
   VerboseLogging(true);
   const int kAllFlowIds[] = {0, 1, 2};
   const size_t kNumFlows = sizeof(kAllFlowIds) / sizeof(kAllFlowIds[0]);
-  scoped_ptr<PeriodicKeyFrameSource> sources[kNumFlows];
-  scoped_ptr<PacedVideoSender> senders[kNumFlows];
+  rtc::scoped_ptr<PeriodicKeyFrameSource> sources[kNumFlows];
+  rtc::scoped_ptr<PacedVideoSender> senders[kNumFlows];
 
   for (size_t i = 0; i < kNumFlows; ++i) {
     // Streams started 20 seconds apart to give them different advantage when
@@ -255,7 +255,7 @@
   ChokeFilter choke(&uplink_, CreateFlowIds(kAllFlowIds, kNumFlows));
   choke.SetCapacity(1000);
 
-  scoped_ptr<RateCounterFilter> rate_counters[kNumFlows];
+  rtc::scoped_ptr<RateCounterFilter> rate_counters[kNumFlows];
   for (size_t i = 0; i < kNumFlows; ++i) {
     rate_counters[i].reset(new RateCounterFilter(
         &uplink_, CreateFlowIds(&kAllFlowIds[i], 1), "receiver_input"));
diff --git a/webrtc/modules/remote_bitrate_estimator/inter_arrival_unittest.cc b/webrtc/modules/remote_bitrate_estimator/inter_arrival_unittest.cc
index 6389f11..64f7cca 100644
--- a/webrtc/modules/remote_bitrate_estimator/inter_arrival_unittest.cc
+++ b/webrtc/modules/remote_bitrate_estimator/inter_arrival_unittest.cc
@@ -10,9 +10,9 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
 #include "webrtc/modules/remote_bitrate_estimator/inter_arrival.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 namespace testing {
@@ -199,8 +199,8 @@
     EXPECT_EQ(expected_packet_size_delta, delta_packet_size);
   }
 
-  scoped_ptr<InterArrival> inter_arrival_rtp_;
-  scoped_ptr<InterArrival> inter_arrival_ast_;
+  rtc::scoped_ptr<InterArrival> inter_arrival_rtp_;
+  rtc::scoped_ptr<InterArrival> inter_arrival_ast_;
 };
 
 TEST_F(InterArrivalTest, FirstPacket) {
diff --git a/webrtc/modules/remote_bitrate_estimator/overuse_detector_unittest.cc b/webrtc/modules/remote_bitrate_estimator/overuse_detector_unittest.cc
index 5646534..59a3056 100644
--- a/webrtc/modules/remote_bitrate_estimator/overuse_detector_unittest.cc
+++ b/webrtc/modules/remote_bitrate_estimator/overuse_detector_unittest.cc
@@ -14,11 +14,11 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
 #include "webrtc/modules/remote_bitrate_estimator/inter_arrival.h"
 #include "webrtc/modules/remote_bitrate_estimator/overuse_detector.h"
 #include "webrtc/modules/remote_bitrate_estimator/overuse_estimator.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/gtest_disable.h"
 
 namespace webrtc {
@@ -112,9 +112,9 @@
   int64_t receive_time_ms_;
   uint32_t rtp_timestamp_;
   OverUseDetectorOptions options_;
-  scoped_ptr<OveruseDetector> overuse_detector_;
-  scoped_ptr<OveruseEstimator> overuse_estimator_;
-  scoped_ptr<InterArrival> inter_arrival_;
+  rtc::scoped_ptr<OveruseDetector> overuse_detector_;
+  rtc::scoped_ptr<OveruseEstimator> overuse_estimator_;
+  rtc::scoped_ptr<InterArrival> inter_arrival_;
 };
 
 TEST_F(OveruseDetectorTest, GaussianRandom) {
diff --git a/webrtc/modules/remote_bitrate_estimator/rate_statistics.h b/webrtc/modules/remote_bitrate_estimator/rate_statistics.h
index d1d4a6f..fc8ff08 100644
--- a/webrtc/modules/remote_bitrate_estimator/rate_statistics.h
+++ b/webrtc/modules/remote_bitrate_estimator/rate_statistics.h
@@ -11,7 +11,7 @@
 #ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_RATE_STATISTICS_H_
 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_RATE_STATISTICS_H_
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -34,7 +34,7 @@
   // Counters are kept in buckets (circular buffer), with one bucket
   // per millisecond.
   const int num_buckets_;
-  scoped_ptr<size_t[]> buckets_;
+  rtc::scoped_ptr<size_t[]> buckets_;
 
   // Total count recorded in buckets.
   size_t accumulated_count_;
diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc
index e32ef72..c20683d 100644
--- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc
+++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc
@@ -12,6 +12,7 @@
 #include <map>
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
 #include "webrtc/modules/remote_bitrate_estimator/inter_arrival.h"
@@ -22,7 +23,6 @@
 #include "webrtc/system_wrappers/interface/clock.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/interface/logging.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -179,15 +179,15 @@
   bool IsBitrateImproving(int probe_bitrate_bps) const
       EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get());
 
-  scoped_ptr<CriticalSectionWrapper> crit_sect_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
   RemoteBitrateObserver* observer_ GUARDED_BY(crit_sect_.get());
   Clock* clock_;
   Ssrcs ssrcs_ GUARDED_BY(crit_sect_.get());
-  scoped_ptr<InterArrival> inter_arrival_ GUARDED_BY(crit_sect_.get());
+  rtc::scoped_ptr<InterArrival> inter_arrival_ GUARDED_BY(crit_sect_.get());
   OveruseEstimator estimator_ GUARDED_BY(crit_sect_.get());
   OveruseDetector detector_ GUARDED_BY(crit_sect_.get());
   RateStatistics incoming_bitrate_ GUARDED_BY(crit_sect_.get());
-  scoped_ptr<RemoteRateControl> remote_rate_ GUARDED_BY(crit_sect_.get());
+  rtc::scoped_ptr<RemoteRateControl> remote_rate_ GUARDED_BY(crit_sect_.get());
   int64_t last_process_time_;
   std::vector<int> recent_propagation_delta_ms_ GUARDED_BY(crit_sect_.get());
   std::vector<int64_t> recent_update_time_ms_ GUARDED_BY(crit_sect_.get());
diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc
index c3de19b..f9eef2a 100644
--- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc
+++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc
@@ -10,6 +10,7 @@
 #include <map>
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/modules/remote_bitrate_estimator/rate_statistics.h"
 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
@@ -20,7 +21,6 @@
 #include "webrtc/system_wrappers/interface/clock.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/interface/logging.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -75,9 +75,9 @@
   Clock* clock_;
   SsrcOveruseEstimatorMap overuse_detectors_ GUARDED_BY(crit_sect_.get());
   RateStatistics incoming_bitrate_ GUARDED_BY(crit_sect_.get());
-  scoped_ptr<RemoteRateControl> remote_rate_ GUARDED_BY(crit_sect_.get());
+  rtc::scoped_ptr<RemoteRateControl> remote_rate_ GUARDED_BY(crit_sect_.get());
   RemoteBitrateObserver* observer_ GUARDED_BY(crit_sect_.get());
-  scoped_ptr<CriticalSectionWrapper> crit_sect_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
   int64_t last_process_time_;
   int64_t process_interval_ms_ GUARDED_BY(crit_sect_.get());
 
diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.h b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.h
index c192d6f..83cd97f 100644
--- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.h
+++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.h
@@ -17,9 +17,9 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
 #include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 namespace testing {
@@ -207,9 +207,9 @@
   static const int kArrivalTimeClockOffsetMs = 60000;
 
   SimulatedClock clock_;  // Time at the receiver.
-  scoped_ptr<testing::TestBitrateObserver> bitrate_observer_;
-  scoped_ptr<RemoteBitrateEstimator> bitrate_estimator_;
-  scoped_ptr<testing::StreamGenerator> stream_generator_;
+  rtc::scoped_ptr<testing::TestBitrateObserver> bitrate_observer_;
+  rtc::scoped_ptr<RemoteBitrateEstimator> bitrate_estimator_;
+  rtc::scoped_ptr<testing::StreamGenerator> stream_generator_;
 
   DISALLOW_COPY_AND_ASSIGN(RemoteBitrateEstimatorTest);
 };
diff --git a/webrtc/modules/remote_bitrate_estimator/test/bwe_test.cc b/webrtc/modules/remote_bitrate_estimator/test/bwe_test.cc
index 384fa94..64406c7 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/bwe_test.cc
+++ b/webrtc/modules/remote_bitrate_estimator/test/bwe_test.cc
@@ -11,12 +11,12 @@
 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test.h"
 
 #include "webrtc/base/common.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/interface/module_common_types.h"
 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h"
 #include "webrtc/modules/remote_bitrate_estimator/test/packet_receiver.h"
 #include "webrtc/modules/remote_bitrate_estimator/test/packet_sender.h"
 #include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 using std::string;
 using std::vector;
diff --git a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_baselinefile.cc b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_baselinefile.cc
index 48384fe..dbb5ade 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_baselinefile.cc
+++ b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_baselinefile.cc
@@ -16,9 +16,9 @@
 #include <vector>
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_fileutils.h"
 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
 namespace webrtc {
@@ -44,7 +44,7 @@
   BaseLineFileVerify(const std::string& filepath, bool allow_missing_file)
       : reader_(),
         fail_to_read_response_(false) {
-    scoped_ptr<ResourceFileReader> reader;
+    rtc::scoped_ptr<ResourceFileReader> reader;
     reader.reset(ResourceFileReader::Create(filepath, "bin"));
     if (!reader.get()) {
       printf("WARNING: Missing baseline file for BWE test: %s.bin\n",
@@ -91,7 +91,7 @@
   }
 
  private:
-  scoped_ptr<ResourceFileReader> reader_;
+  rtc::scoped_ptr<ResourceFileReader> reader_;
   bool fail_to_read_response_;
 
   DISALLOW_IMPLICIT_CONSTRUCTORS(BaseLineFileVerify);
@@ -122,7 +122,7 @@
         printf("WARNING: Cannot create output dir: %s\n", dir_path.c_str());
         return false;
       }
-      scoped_ptr<OutputFileWriter> writer;
+      rtc::scoped_ptr<OutputFileWriter> writer;
       writer.reset(OutputFileWriter::Create(filepath_, "bin"));
       if (!writer.get()) {
         printf("WARNING: Cannot create output file: %s.bin\n",
@@ -142,7 +142,7 @@
   }
 
  private:
-  scoped_ptr<BaseLineFileInterface> verifier_;
+  rtc::scoped_ptr<BaseLineFileInterface> verifier_;
   std::vector<uint32_t> output_content_;
   std::string filepath_;
 
@@ -155,7 +155,7 @@
   std::replace(filepath.begin(), filepath.end(), '/', '_');
   filepath = std::string(kResourceSubDir) + "/" + filepath;
 
-  scoped_ptr<BaseLineFileInterface> result;
+  rtc::scoped_ptr<BaseLineFileInterface> result;
   result.reset(new BaseLineFileVerify(filepath, !write_output_file));
   if (write_output_file) {
     // Takes ownership of the |verifier| instance.
diff --git a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_fileutils.cc b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_fileutils.cc
index 0d2021e..5744c9c 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_fileutils.cc
+++ b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_fileutils.cc
@@ -17,8 +17,8 @@
 #endif
 #include <assert.h>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
 namespace webrtc {
diff --git a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h
index f03597e..902e48f 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h
+++ b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h
@@ -21,6 +21,7 @@
 #include <string>
 #include <vector>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
 #include "webrtc/modules/interface/module_common_types.h"
 #include "webrtc/modules/pacing/include/paced_sender.h"
@@ -29,7 +30,6 @@
 #include "webrtc/modules/remote_bitrate_estimator/test/packet.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
 #include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -224,7 +224,7 @@
   virtual void RunFor(int64_t time_ms, Packets* in_out);
 
  private:
-  scoped_ptr<RateCounter> rate_counter_;
+  rtc::scoped_ptr<RateCounter> rate_counter_;
   Stats<double> packets_per_second_stats_;
   Stats<double> kbps_stats_;
   std::string name_;
@@ -314,7 +314,7 @@
  private:
   uint32_t kbps_;
   int64_t last_send_time_us_;
-  scoped_ptr<DelayCapHelper> delay_cap_helper_;
+  rtc::scoped_ptr<DelayCapHelper> delay_cap_helper_;
 
   DISALLOW_IMPLICIT_CONSTRUCTORS(ChokeFilter);
 };
@@ -348,9 +348,9 @@
   TimeList delivery_times_us_;
   TimeList::const_iterator next_delivery_it_;
   int64_t local_time_us_;
-  scoped_ptr<RateCounter> rate_counter_;
+  rtc::scoped_ptr<RateCounter> rate_counter_;
   std::string name_;
-  scoped_ptr<DelayCapHelper> delay_cap_helper_;
+  rtc::scoped_ptr<DelayCapHelper> delay_cap_helper_;
   Stats<double> packets_per_second_stats_;
   Stats<double> kbps_stats_;
 
diff --git a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h
index 340c992..728e98e 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h
+++ b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h
@@ -99,8 +99,8 @@
 #include <string>
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 #define BWE_TEST_LOGGING_GLOBAL_CONTEXT(name) \
     do { \
@@ -212,7 +212,7 @@
   void PopState();
 
   static Logging g_Logging;
-  scoped_ptr<CriticalSectionWrapper> crit_sect_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
   ThreadMap thread_map_;
 
   DISALLOW_COPY_AND_ASSIGN(Logging);
diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/nada.h b/webrtc/modules/remote_bitrate_estimator/test/estimators/nada.h
index 5d76712..353fac4 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/estimators/nada.h
+++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/nada.h
@@ -32,7 +32,7 @@
  private:
   SimulatedClock clock_;
   int64_t last_feedback_ms_;
-  scoped_ptr<ReceiveStatistics> recv_stats_;
+  rtc::scoped_ptr<ReceiveStatistics> recv_stats_;
   int64_t baseline_delay_ms_;
   int64_t delay_signal_ms_;
   int64_t last_congestion_signal_ms_;
diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/remb.h b/webrtc/modules/remote_bitrate_estimator/test/estimators/remb.h
index a8cbf89..a88d8a7 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/estimators/remb.h
+++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/remb.h
@@ -37,8 +37,8 @@
   int Process() override;
 
  protected:
-  scoped_ptr<BitrateController> bitrate_controller_;
-  scoped_ptr<RtcpBandwidthObserver> feedback_observer_;
+  rtc::scoped_ptr<BitrateController> bitrate_controller_;
+  rtc::scoped_ptr<RtcpBandwidthObserver> feedback_observer_;
 
  private:
   Clock* clock_;
@@ -67,9 +67,9 @@
   std::string estimate_log_prefix_;
   bool plot_estimate_;
   SimulatedClock clock_;
-  scoped_ptr<ReceiveStatistics> recv_stats_;
+  rtc::scoped_ptr<ReceiveStatistics> recv_stats_;
   int64_t latest_estimate_bps_;
-  scoped_ptr<RemoteBitrateEstimator> estimator_;
+  rtc::scoped_ptr<RemoteBitrateEstimator> estimator_;
 
   DISALLOW_IMPLICIT_CONSTRUCTORS(RembReceiver);
 };
diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.h b/webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.h
index e31e311..68d4805 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.h
+++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.h
@@ -32,9 +32,9 @@
   int Process() override;
 
  protected:
-  scoped_ptr<BitrateController> bitrate_controller_;
-  scoped_ptr<RemoteBitrateEstimator> rbe_;
-  scoped_ptr<RtcpBandwidthObserver> feedback_observer_;
+  rtc::scoped_ptr<BitrateController> bitrate_controller_;
+  rtc::scoped_ptr<RemoteBitrateEstimator> rbe_;
+  rtc::scoped_ptr<RtcpBandwidthObserver> feedback_observer_;
 
  private:
   Clock* const clock_;
diff --git a/webrtc/modules/remote_bitrate_estimator/test/packet_receiver.h b/webrtc/modules/remote_bitrate_estimator/test/packet_receiver.h
index 50d1770..18fd978 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/packet_receiver.h
+++ b/webrtc/modules/remote_bitrate_estimator/test/packet_receiver.h
@@ -14,9 +14,9 @@
 #include <string>
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/remote_bitrate_estimator/test/bwe.h"
 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 namespace testing {
@@ -43,7 +43,7 @@
   std::string delay_log_prefix_;
   int64_t last_delay_plot_ms_;
   bool plot_delay_;
-  scoped_ptr<BweReceiver> bwe_receiver_;
+  rtc::scoped_ptr<BweReceiver> bwe_receiver_;
 
  private:
   DISALLOW_IMPLICIT_CONSTRUCTORS(PacketReceiver);
diff --git a/webrtc/modules/remote_bitrate_estimator/test/packet_sender.h b/webrtc/modules/remote_bitrate_estimator/test/packet_sender.h
index 643bbce..e5cbbcb 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/packet_sender.h
+++ b/webrtc/modules/remote_bitrate_estimator/test/packet_sender.h
@@ -15,10 +15,10 @@
 #include <string>
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/interface/module.h"
 #include "webrtc/modules/remote_bitrate_estimator/test/bwe.h"
 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 namespace testing {
@@ -55,7 +55,7 @@
 
   SimulatedClock clock_;
   VideoSource* source_;
-  scoped_ptr<BweSender> bwe_;
+  rtc::scoped_ptr<BweSender> bwe_;
   int64_t start_of_run_ms_;
   std::list<Module*> modules_;
 
diff --git a/webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp_play.cc b/webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp_play.cc
index a83efd9..1c505ad8 100644
--- a/webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp_play.cc
+++ b/webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp_play.cc
@@ -11,11 +11,11 @@
 #include <stdio.h>
 
 #include "webrtc/base/format_macros.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
 #include "webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/rtp_file_reader.h"
 
 class Observer : public webrtc::RemoteBitrateObserver {
@@ -57,9 +57,9 @@
                                   &parser, &estimator, &estimator_used)) {
     return -1;
   }
-  webrtc::scoped_ptr<webrtc::test::RtpFileReader> rtp_reader(reader);
-  webrtc::scoped_ptr<webrtc::RtpHeaderParser> rtp_parser(parser);
-  webrtc::scoped_ptr<webrtc::RemoteBitrateEstimator> rbe(estimator);
+  rtc::scoped_ptr<webrtc::test::RtpFileReader> rtp_reader(reader);
+  rtc::scoped_ptr<webrtc::RtpHeaderParser> rtp_parser(parser);
+  rtc::scoped_ptr<webrtc::RemoteBitrateEstimator> rbe(estimator);
 
   // Process the file.
   int packet_counter = 0;
diff --git a/webrtc/modules/remote_bitrate_estimator/tools/rtp_to_text.cc b/webrtc/modules/remote_bitrate_estimator/tools/rtp_to_text.cc
index bba8d6c..f2ff7df 100644
--- a/webrtc/modules/remote_bitrate_estimator/tools/rtp_to_text.cc
+++ b/webrtc/modules/remote_bitrate_estimator/tools/rtp_to_text.cc
@@ -12,10 +12,10 @@
 #include <sstream>
 
 #include "webrtc/base/format_macros.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/rtp_file_reader.h"
 
 int main(int argc, char** argv) {
@@ -37,8 +37,8 @@
     return -1;
   }
   bool arrival_time_only = (argc >= 5 && strncmp(argv[4], "-t", 2) == 0);
-  webrtc::scoped_ptr<webrtc::test::RtpFileReader> rtp_reader(reader);
-  webrtc::scoped_ptr<webrtc::RtpHeaderParser> rtp_parser(parser);
+  rtc::scoped_ptr<webrtc::test::RtpFileReader> rtp_reader(reader);
+  rtc::scoped_ptr<webrtc::RtpHeaderParser> rtp_parser(parser);
   fprintf(stdout, "seqnum timestamp ts_offset abs_sendtime recvtime "
           "markerbit ssrc size original_size\n");
   int packet_counter = 0;
diff --git a/webrtc/modules/rtp_rtcp/interface/remote_ntp_time_estimator.h b/webrtc/modules/rtp_rtcp/interface/remote_ntp_time_estimator.h
index 80f1803..63949f7 100644
--- a/webrtc/modules/rtp_rtcp/interface/remote_ntp_time_estimator.h
+++ b/webrtc/modules/rtp_rtcp/interface/remote_ntp_time_estimator.h
@@ -11,8 +11,8 @@
 #ifndef WEBRTC_MODULES_RTP_RTCP_INTERFACE_REMOTE_NTP_TIME_ESTIMATOR_H_
 #define WEBRTC_MODULES_RTP_RTCP_INTERFACE_REMOTE_NTP_TIME_ESTIMATOR_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/rtp_to_ntp.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -40,7 +40,7 @@
 
  private:
   Clock* clock_;
-  scoped_ptr<TimestampExtrapolator> ts_extrapolator_;
+  rtc::scoped_ptr<TimestampExtrapolator> ts_extrapolator_;
   RtcpList rtcp_list_;
   int64_t last_timing_log_ms_;
   DISALLOW_COPY_AND_ASSIGN(RemoteNtpTimeEstimator);
diff --git a/webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h b/webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h
index f58eaea..bc1ba2b 100644
--- a/webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h
+++ b/webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h
@@ -11,9 +11,9 @@
 #ifndef WEBRTC_MODULES_RTP_RTCP_INTERFACE_RTP_PAYLOAD_REGISTRY_H_
 #define WEBRTC_MODULES_RTP_RTCP_INTERFACE_RTP_PAYLOAD_REGISTRY_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -149,9 +149,9 @@
 
   bool IsRtxInternal(const RTPHeader& header) const;
 
-  scoped_ptr<CriticalSectionWrapper> crit_sect_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
   RtpUtility::PayloadTypeMap payload_type_map_;
-  scoped_ptr<RTPPayloadStrategy> rtp_payload_strategy_;
+  rtc::scoped_ptr<RTPPayloadStrategy> rtp_payload_strategy_;
   int8_t  red_payload_type_;
   int8_t ulpfec_payload_type_;
   int8_t incoming_payload_type_;
diff --git a/webrtc/modules/rtp_rtcp/source/bitrate.h b/webrtc/modules/rtp_rtcp/source/bitrate.h
index 086db2a..393d05d 100644
--- a/webrtc/modules/rtp_rtcp/source/bitrate.h
+++ b/webrtc/modules/rtp_rtcp/source/bitrate.h
@@ -15,9 +15,9 @@
 
 #include <list>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -60,7 +60,7 @@
   Clock* clock_;
 
  private:
-  scoped_ptr<CriticalSectionWrapper> crit_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_;
   uint32_t packet_rate_;
   uint32_t bitrate_;
   uint8_t bitrate_next_idx_;
diff --git a/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc b/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc
index c64a3c4..e2aa2e5 100644
--- a/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc
+++ b/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc
@@ -12,11 +12,11 @@
 
 #include <assert.h>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_video.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/interface/logging.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 // RFC 5109
 namespace webrtc {
diff --git a/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.h b/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.h
index d8b9f42..2f4b0fb 100644
--- a/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.h
+++ b/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.h
@@ -13,10 +13,10 @@
 
 // This header is included to get the nested declaration of Packet structure.
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/interface/fec_receiver.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
 #include "webrtc/modules/rtp_rtcp/source/forward_error_correction.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -38,7 +38,7 @@
   virtual FecPacketCounter GetPacketCounter() const OVERRIDE;
 
  private:
-  scoped_ptr<CriticalSectionWrapper> crit_sect_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
   RtpData* recovered_packet_callback_;
   ForwardErrorCorrection* fec_;
   // TODO(holmer): In the current version received_packet_list_ is never more
diff --git a/webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc b/webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc
index 6c53a37..31baf4e 100644
--- a/webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc
@@ -14,11 +14,11 @@
 
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/interface/fec_receiver.h"
 #include "webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h"
 #include "webrtc/modules/rtp_rtcp/source/fec_test_helper.h"
 #include "webrtc/modules/rtp_rtcp/source/forward_error_correction.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 using ::testing::_;
 using ::testing::Args;
@@ -82,9 +82,9 @@
   }
 
   MockRtpData rtp_data_callback_;
-  scoped_ptr<ForwardErrorCorrection> fec_;
-  scoped_ptr<FecReceiver> receiver_fec_;
-  scoped_ptr<FrameGenerator> generator_;
+  rtc::scoped_ptr<ForwardErrorCorrection> fec_;
+  rtc::scoped_ptr<FecReceiver> receiver_fec_;
+  rtc::scoped_ptr<FrameGenerator> generator_;
 };
 
 void DeletePackets(std::list<Packet*>* packets) {
diff --git a/webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc b/webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc
index 44251ea..e7022b5 100644
--- a/webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc
@@ -14,6 +14,7 @@
 #include <set>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
 #include "webrtc/modules/rtp_rtcp/interface/receive_statistics.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
@@ -21,7 +22,6 @@
 #include "webrtc/modules/rtp_rtcp/interface/rtp_receiver.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 using namespace webrtc;
 
@@ -118,7 +118,7 @@
     uint8_t restored_packet[1500] = {0};
     uint8_t* restored_packet_ptr = restored_packet;
     RTPHeader header;
-    scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
+    rtc::scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
     if (!parser->Parse(ptr, len, &header)) {
       return -1;
     }
@@ -288,11 +288,11 @@
     delete rtp_rtcp_module_;
   }
 
-  scoped_ptr<ReceiveStatistics> receive_statistics_;
+  rtc::scoped_ptr<ReceiveStatistics> receive_statistics_;
   RTPPayloadRegistry rtp_payload_registry_;
-  scoped_ptr<RtpReceiver> rtp_receiver_;
+  rtc::scoped_ptr<RtpReceiver> rtp_receiver_;
   RtpRtcp* rtp_rtcp_module_;
-  scoped_ptr<TestRtpFeedback> rtp_feedback_;
+  rtc::scoped_ptr<TestRtpFeedback> rtp_feedback_;
   RtxLoopBackTransport transport_;
   VerifyingRtxReceiver receiver_;
   uint8_t  payload_data[65000];
diff --git a/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.cc b/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.cc
index 4a7da02..3846558 100644
--- a/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.cc
+++ b/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.cc
@@ -12,10 +12,10 @@
 
 #include <math.h>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/source/bitrate.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
diff --git a/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.h b/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.h
index ab80a74..7828036 100644
--- a/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.h
+++ b/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.h
@@ -15,9 +15,9 @@
 
 #include <algorithm>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/source/bitrate.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -62,7 +62,7 @@
   void NotifyRtcpCallback() LOCKS_EXCLUDED(stream_lock_.get());
 
   Clock* clock_;
-  scoped_ptr<CriticalSectionWrapper> stream_lock_;
+  rtc::scoped_ptr<CriticalSectionWrapper> stream_lock_;
   Bitrate incoming_bitrate_;
   uint32_t ssrc_;
   int max_reordering_threshold_;  // In number of packets or sequence numbers.
@@ -136,7 +136,7 @@
   typedef std::map<uint32_t, StreamStatisticianImpl*> StatisticianImplMap;
 
   Clock* clock_;
-  scoped_ptr<CriticalSectionWrapper> receive_statistics_lock_;
+  rtc::scoped_ptr<CriticalSectionWrapper> receive_statistics_lock_;
   int64_t last_rate_update_ms_;
   StatisticianImplMap statisticians_;
 
diff --git a/webrtc/modules/rtp_rtcp/source/receive_statistics_unittest.cc b/webrtc/modules/rtp_rtcp/source/receive_statistics_unittest.cc
index ccba608..7da5285 100644
--- a/webrtc/modules/rtp_rtcp/source/receive_statistics_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/receive_statistics_unittest.cc
@@ -10,9 +10,9 @@
 
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/interface/receive_statistics.h"
 #include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -36,7 +36,7 @@
 
  protected:
   SimulatedClock clock_;
-  scoped_ptr<ReceiveStatistics> receive_statistics_;
+  rtc::scoped_ptr<ReceiveStatistics> receive_statistics_;
   RTPHeader header1_;
   RTPHeader header2_;
 };
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc
index 1a2f25a..cb89287 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc
@@ -79,12 +79,12 @@
   OverUseDetectorOptions over_use_detector_options_;
   Clock* system_clock_;
   ModuleRtpRtcpImpl* dummy_rtp_rtcp_impl_;
-  scoped_ptr<ReceiveStatistics> receive_statistics_;
+  rtc::scoped_ptr<ReceiveStatistics> receive_statistics_;
   RTCPSender* rtcp_sender_;
   RTCPReceiver* rtcp_receiver_;
   TestTransport* test_transport_;
   MockRemoteBitrateObserver remote_bitrate_observer_;
-  scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
+  rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
 };
 
 void RtcpFormatRembTest::SetUp() {
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_receiver_help.h b/webrtc/modules/rtp_rtcp/source/rtcp_receiver_help.h
index 73ac7a5..a7f3c9f 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_receiver_help.h
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_receiver_help.h
@@ -13,10 +13,10 @@
 
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"  // RTCPReportBlock
 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h"
 #include "webrtc/modules/rtp_rtcp/source/tmmbr_help.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
index fcd4df8..f90c598 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
@@ -143,7 +143,7 @@
   TestTransport* test_transport_;
   RTCPHelp::RTCPPacketInformation rtcp_packet_info_;
   MockRemoteBitrateObserver remote_bitrate_observer_;
-  scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
+  rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
 };
 
 
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_sender.h b/webrtc/modules/rtp_rtcp/source/rtcp_sender.h
index 13bdade..6722ea2 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_sender.h
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender.h
@@ -15,6 +15,7 @@
 #include <sstream>
 #include <string>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h"
 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
@@ -23,7 +24,6 @@
 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
 #include "webrtc/modules/rtp_rtcp/source/tmmbr_help.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc
index d548e26..5563b0d 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc
@@ -326,15 +326,15 @@
 
   OverUseDetectorOptions over_use_detector_options_;
   SimulatedClock clock_;
-  scoped_ptr<RTPPayloadRegistry> rtp_payload_registry_;
-  scoped_ptr<RtpReceiver> rtp_receiver_;
+  rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry_;
+  rtc::scoped_ptr<RtpReceiver> rtp_receiver_;
   ModuleRtpRtcpImpl* rtp_rtcp_impl_;
   RTCPSender* rtcp_sender_;
   RTCPReceiver* rtcp_receiver_;
   TestTransport* test_transport_;
   MockRemoteBitrateObserver remote_bitrate_observer_;
-  scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
-  scoped_ptr<ReceiveStatistics> receive_statistics_;
+  rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
+  rtc::scoped_ptr<ReceiveStatistics> receive_statistics_;
 
   enum {kMaxPacketLength = 1500};
   uint8_t packet_[kMaxPacketLength];
@@ -374,7 +374,7 @@
                                                      codec_inst.maxBitrate));
 
   // Make sure RTP packet has been received.
-  scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
+  rtc::scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
   RTPHeader header;
   EXPECT_TRUE(parser->Parse(packet_, packet_length, &header));
   PayloadUnion payload_specific;
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc
index eb690ea..caae400 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc
@@ -12,10 +12,10 @@
 
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/interface/module_common_types.h"
 #include "webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_format.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 namespace {
@@ -72,7 +72,7 @@
 void TestFua(size_t frame_size,
              size_t max_payload_size,
              const std::vector<size_t>& expected_sizes) {
-  scoped_ptr<uint8_t[]> frame;
+  rtc::scoped_ptr<uint8_t[]> frame;
   frame.reset(new uint8_t[frame_size]);
   frame[0] = 0x05;  // F=0, NRI=0, Type=5.
   for (size_t i = 0; i < frame_size - kNalHeaderSize; ++i) {
@@ -82,11 +82,11 @@
   fragmentation.VerifyAndAllocateFragmentationHeader(1);
   fragmentation.fragmentationOffset[0] = 0;
   fragmentation.fragmentationLength[0] = frame_size;
-  scoped_ptr<RtpPacketizer> packetizer(RtpPacketizer::Create(
+  rtc::scoped_ptr<RtpPacketizer> packetizer(RtpPacketizer::Create(
       kRtpVideoH264, max_payload_size, NULL, kFrameEmpty));
   packetizer->SetPayloadData(frame.get(), frame_size, &fragmentation);
 
-  scoped_ptr<uint8_t[]> packet(new uint8_t[max_payload_size]);
+  rtc::scoped_ptr<uint8_t[]> packet(new uint8_t[max_payload_size]);
   size_t length = 0;
   bool last = false;
   size_t offset = kNalHeaderSize;
@@ -156,7 +156,7 @@
   fragmentation.VerifyAndAllocateFragmentationHeader(1);
   fragmentation.fragmentationOffset[0] = 0;
   fragmentation.fragmentationLength[0] = sizeof(frame);
-  scoped_ptr<RtpPacketizer> packetizer(
+  rtc::scoped_ptr<RtpPacketizer> packetizer(
       RtpPacketizer::Create(kRtpVideoH264, kMaxPayloadSize, NULL, kFrameEmpty));
   packetizer->SetPayloadData(frame, sizeof(frame), &fragmentation);
   uint8_t packet[kMaxPayloadSize] = {0};
@@ -185,7 +185,7 @@
   frame[fragmentation.fragmentationOffset[0]] = 0x01;
   frame[fragmentation.fragmentationOffset[1]] = 0x01;
 
-  scoped_ptr<RtpPacketizer> packetizer(
+  rtc::scoped_ptr<RtpPacketizer> packetizer(
       RtpPacketizer::Create(kRtpVideoH264, kMaxPayloadSize, NULL, kFrameEmpty));
   packetizer->SetPayloadData(frame, kFrameSize, &fragmentation);
 
@@ -222,7 +222,7 @@
   fragmentation.fragmentationOffset[2] = 4;
   fragmentation.fragmentationLength[2] =
       kNalHeaderSize + kFrameSize - kPayloadOffset;
-  scoped_ptr<RtpPacketizer> packetizer(
+  rtc::scoped_ptr<RtpPacketizer> packetizer(
       RtpPacketizer::Create(kRtpVideoH264, kMaxPayloadSize, NULL, kFrameEmpty));
   packetizer->SetPayloadData(frame, kFrameSize, &fragmentation);
 
@@ -257,7 +257,7 @@
   fragmentation.fragmentationOffset[2] = 4;
   fragmentation.fragmentationLength[2] =
       kNalHeaderSize + kFrameSize - kPayloadOffset;
-  scoped_ptr<RtpPacketizer> packetizer(
+  rtc::scoped_ptr<RtpPacketizer> packetizer(
       RtpPacketizer::Create(kRtpVideoH264, kMaxPayloadSize, NULL, kFrameEmpty));
   packetizer->SetPayloadData(frame, kFrameSize, &fragmentation);
 
@@ -305,7 +305,7 @@
       frame[nalu_offset + j] = i + j;
     }
   }
-  scoped_ptr<RtpPacketizer> packetizer(
+  rtc::scoped_ptr<RtpPacketizer> packetizer(
       RtpPacketizer::Create(kRtpVideoH264, kMaxPayloadSize, NULL, kFrameEmpty));
   packetizer->SetPayloadData(frame, kFrameSize, &fragmentation);
 
@@ -394,7 +394,7 @@
                 ::testing::ElementsAreArray(data, length));
   }
 
-  scoped_ptr<RtpDepacketizer> depacketizer_;
+  rtc::scoped_ptr<RtpDepacketizer> depacketizer_;
 };
 
 TEST_F(RtpDepacketizerH264Test, TestSingleNalu) {
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
index 5cde808..804dc09 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
@@ -421,7 +421,7 @@
                 ::testing::ElementsAreArray(data, length));
   }
 
-  scoped_ptr<RtpDepacketizer> depacketizer_;
+  rtc::scoped_ptr<RtpDepacketizer> depacketizer_;
 };
 
 TEST_F(RtpDepacketizerVp8Test, BasicHeader) {
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_header_parser.cc b/webrtc/modules/rtp_rtcp/source/rtp_header_parser.cc
index 3fc2666..9a4cb64 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_header_parser.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_header_parser.cc
@@ -9,10 +9,10 @@
  */
 #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -31,7 +31,7 @@
   virtual bool DeregisterRtpHeaderExtension(RTPExtensionType type) OVERRIDE;
 
  private:
-  scoped_ptr<CriticalSectionWrapper> critical_section_;
+  rtc::scoped_ptr<CriticalSectionWrapper> critical_section_;
   RtpHeaderExtensionMap rtp_header_extension_map_ GUARDED_BY(critical_section_);
 };
 
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_packet_history.h b/webrtc/modules/rtp_rtcp/source/rtp_packet_history.h
index b6da99a..212aa21 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_packet_history.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_packet_history.h
@@ -85,7 +85,7 @@
 
  private:
   Clock* clock_;
-  scoped_ptr<CriticalSectionWrapper> critsect_;
+  rtc::scoped_ptr<CriticalSectionWrapper> critsect_;
   bool store_ GUARDED_BY(critsect_);
   uint32_t prev_index_ GUARDED_BY(critsect_);
   size_t max_packet_length_ GUARDED_BY(critsect_);
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc
index b2c846c..3dd3d7d 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc
@@ -12,9 +12,9 @@
 
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/source/mock/mock_rtp_payload_strategy.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -57,7 +57,7 @@
     return returned_payload_on_heap;
   }
 
-  scoped_ptr<RTPPayloadRegistry> rtp_payload_registry_;
+  rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry_;
   testing::NiceMock<MockRTPPayloadStrategy>* mock_payload_strategy_;
 };
 
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.h b/webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.h
index 2c6af68..9ca87f6 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.h
@@ -13,11 +13,11 @@
 
 #include <set>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_receiver.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.h b/webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.h
index 9e58b1a..3b2bbf6 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.h
@@ -11,11 +11,11 @@
 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_IMPL_H_
 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_IMPL_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_receiver.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -80,13 +80,13 @@
 
   Clock* clock_;
   RTPPayloadRegistry* rtp_payload_registry_;
-  scoped_ptr<RTPReceiverStrategy> rtp_media_receiver_;
+  rtc::scoped_ptr<RTPReceiverStrategy> rtp_media_receiver_;
 
   int32_t id_;
 
   RtpFeedback* cb_rtp_feedback_;
 
-  scoped_ptr<CriticalSectionWrapper> critical_section_rtp_receiver_;
+  rtc::scoped_ptr<CriticalSectionWrapper> critical_section_rtp_receiver_;
   int64_t last_receive_time_;
   size_t last_received_payload_length_;
 
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h b/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h
index 0eb23e5..b34ad38 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h
@@ -11,11 +11,11 @@
 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_STRATEGY_H_
 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_STRATEGY_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -99,7 +99,7 @@
   // packet.
   RTPReceiverStrategy(RtpData* data_callback);
 
-  scoped_ptr<CriticalSectionWrapper> crit_sect_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
   PayloadUnion last_payload_;
   RtpData* data_callback_;
 };
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc b/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc
index 90dfc92..5555019 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc
@@ -68,7 +68,7 @@
   }
 
   // We are not allowed to hold a critical section when calling below functions.
-  scoped_ptr<RtpDepacketizer> depacketizer(
+  rtc::scoped_ptr<RtpDepacketizer> depacketizer(
       RtpDepacketizer::Create(rtp_header->type.Video.codec));
   if (depacketizer.get() == NULL) {
     LOG(LS_ERROR) << "Failed to create depacketizer.";
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.h b/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.h
index 177f303..c355e80 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.h
@@ -11,11 +11,11 @@
 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_VIDEO_H_
 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_VIDEO_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
 #include "webrtc/modules/rtp_rtcp/source/bitrate.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h
index 8a3d7ec..2b88aef 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h
@@ -14,11 +14,11 @@
 #include <list>
 #include <vector>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
 #include "webrtc/modules/rtp_rtcp/source/rtcp_receiver.h"
 #include "webrtc/modules/rtp_rtcp/source/rtcp_sender.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_sender.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/gtest_prod_util.h"
 
 namespace webrtc {
@@ -395,7 +395,7 @@
   RtcpRttStats* rtt_stats_;
 
   // The processed RTT from RtcpRttStats.
-  scoped_ptr<CriticalSectionWrapper> critical_section_rtt_;
+  rtc::scoped_ptr<CriticalSectionWrapper> critical_section_rtt_;
   int64_t rtt_ms_;
 };
 
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
index 94a2025..e32a535 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
@@ -68,7 +68,7 @@
   }
   virtual int SendPacket(int /*ch*/, const void* data, size_t len) OVERRIDE {
     RTPHeader header;
-    scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
+    rtc::scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
     EXPECT_TRUE(parser->Parse(static_cast<const uint8_t*>(data), len, &header));
     ++rtp_packets_sent_;
     last_rtp_header_ = header;
@@ -117,10 +117,10 @@
 
   RtcpPacketTypeCounter packets_sent_;
   RtcpPacketTypeCounter packets_received_;
-  scoped_ptr<ReceiveStatistics> receive_statistics_;
+  rtc::scoped_ptr<ReceiveStatistics> receive_statistics_;
   SendTransport transport_;
   RtcpRttStatsTestImpl rtt_stats_;
-  scoped_ptr<ModuleRtpRtcpImpl> impl_;
+  rtc::scoped_ptr<ModuleRtpRtcpImpl> impl_;
   uint32_t remote_ssrc_;
 
   void SetRemoteSsrc(uint32_t ssrc) {
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender.h b/webrtc/modules/rtp_rtcp/source/rtp_sender.h
index e6a3295..1fa46d1 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender.h
@@ -328,18 +328,18 @@
   Clock* clock_;
   int64_t clock_delta_ms_;
 
-  scoped_ptr<BitrateAggregator> bitrates_;
+  rtc::scoped_ptr<BitrateAggregator> bitrates_;
   Bitrate total_bitrate_sent_;
 
   int32_t id_;
 
   const bool audio_configured_;
-  scoped_ptr<RTPSenderAudio> audio_;
-  scoped_ptr<RTPSenderVideo> video_;
+  rtc::scoped_ptr<RTPSenderAudio> audio_;
+  rtc::scoped_ptr<RTPSenderVideo> video_;
 
   PacedSender *paced_sender_;
   int64_t last_capture_time_ms_sent_;
-  scoped_ptr<CriticalSectionWrapper> send_critsect_;
+  rtc::scoped_ptr<CriticalSectionWrapper> send_critsect_;
 
   Transport *transport_;
   bool sending_media_ GUARDED_BY(send_critsect_);
@@ -362,7 +362,7 @@
   RTPPacketHistory packet_history_;
 
   // Statistics
-  scoped_ptr<CriticalSectionWrapper> statistics_crit_;
+  rtc::scoped_ptr<CriticalSectionWrapper> statistics_crit_;
   SendDelayMap send_delays_ GUARDED_BY(statistics_crit_);
   FrameCounts frame_counts_ GUARDED_BY(statistics_crit_);
   StreamDataCounters rtp_stats_ GUARDED_BY(statistics_crit_);
@@ -395,7 +395,7 @@
   // SetTargetBitrateKbps or GetTargetBitrateKbps. Also remember
   // that by the time the function returns there is no guarantee
   // that the target bitrate is still valid.
-  scoped_ptr<CriticalSectionWrapper> target_bitrate_critsect_;
+  rtc::scoped_ptr<CriticalSectionWrapper> target_bitrate_critsect_;
   uint32_t target_bitrate_ GUARDED_BY(target_bitrate_critsect_);
 };
 
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h b/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h
index c2f20ec..762668a 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h
@@ -78,7 +78,7 @@
  RTPSender* const _rtpSender;
  RtpAudioFeedback* const _audioFeedback;
 
- scoped_ptr<CriticalSectionWrapper> _sendAudioCritsect;
+ rtc::scoped_ptr<CriticalSectionWrapper> _sendAudioCritsect;
 
  uint16_t _packetSizeSamples GUARDED_BY(_sendAudioCritsect);
 
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc
index cd4b747..8787ad6 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc
@@ -14,13 +14,13 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/pacing/include/mock/mock_paced_sender.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_sender.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/mock_transport.h"
 #include "webrtc/typedefs.h"
 
@@ -101,7 +101,7 @@
 
   SimulatedClock fake_clock_;
   MockPacedSender mock_paced_sender_;
-  scoped_ptr<RTPSender> rtp_sender_;
+  rtc::scoped_ptr<RTPSender> rtp_sender_;
   int payload_;
   LoopbackTransportTest transport_;
   const bool kMarkerBit;
@@ -553,7 +553,7 @@
   rtp_header_len += 4;  // 4 extra bytes common to all extension headers.
 
   // Create and set up parser.
-  scoped_ptr<webrtc::RtpHeaderParser> rtp_parser(
+  rtc::scoped_ptr<webrtc::RtpHeaderParser> rtp_parser(
       webrtc::RtpHeaderParser::Create());
   ASSERT_TRUE(rtp_parser.get() != NULL);
   rtp_parser->RegisterRtpHeaderExtension(kRtpExtensionTransmissionTimeOffset,
@@ -671,7 +671,7 @@
   rtp_sender_->SetRtxSsrc(1234);
 
   // Create and set up parser.
-  scoped_ptr<webrtc::RtpHeaderParser> rtp_parser(
+  rtc::scoped_ptr<webrtc::RtpHeaderParser> rtp_parser(
       webrtc::RtpHeaderParser::Create());
   ASSERT_TRUE(rtp_parser.get() != NULL);
   rtp_parser->RegisterRtpHeaderExtension(kRtpExtensionTransmissionTimeOffset,
@@ -1097,7 +1097,7 @@
                                              capture_time_ms+2000,
                                              0, NULL, 0,
                                              NULL));
-  scoped_ptr<webrtc::RtpHeaderParser> rtp_parser(
+  rtc::scoped_ptr<webrtc::RtpHeaderParser> rtp_parser(
       webrtc::RtpHeaderParser::Create());
   ASSERT_TRUE(rtp_parser.get() != NULL);
   webrtc::RTPHeader rtp_header;
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc
index f82496a..bfcb5e2 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc
@@ -313,7 +313,7 @@
   const uint8_t* data = payloadData;
   size_t max_payload_length = _rtpSender.MaxDataPayloadLength();
 
-  scoped_ptr<RtpPacketizer> packetizer(RtpPacketizer::Create(
+  rtc::scoped_ptr<RtpPacketizer> packetizer(RtpPacketizer::Create(
       videoType, max_payload_length, rtpTypeHdr, frameType));
 
   // TODO(changbin): we currently don't support to configure the codec to
diff --git a/webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc b/webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc
index 8c1c73e..d265c86 100644
--- a/webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc
+++ b/webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc
@@ -38,7 +38,7 @@
     }
   }
   RTPHeader header;
-  scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
+  rtc::scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
   if (!parser->Parse(static_cast<const uint8_t*>(data), len, &header)) {
     return -1;
   }
@@ -102,9 +102,9 @@
   }
 
   int test_id;
-  scoped_ptr<RTPPayloadRegistry> rtp_payload_registry_;
-  scoped_ptr<RtpReceiver> rtp_receiver_;
-  scoped_ptr<RtpRtcp> module_;
+  rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry_;
+  rtc::scoped_ptr<RtpReceiver> rtp_receiver_;
+  rtc::scoped_ptr<RtpRtcp> module_;
   uint32_t test_ssrc_;
   uint32_t test_timestamp_;
   uint16_t test_sequence_number_;
diff --git a/webrtc/modules/rtp_rtcp/test/testAPI/test_api.h b/webrtc/modules/rtp_rtcp/test/testAPI/test_api.h
index 558b352..677d3b1 100644
--- a/webrtc/modules/rtp_rtcp/test/testAPI/test_api.h
+++ b/webrtc/modules/rtp_rtcp/test/testAPI/test_api.h
@@ -9,6 +9,7 @@
  */
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
 #include "webrtc/modules/rtp_rtcp/interface/receive_statistics.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
@@ -16,7 +17,6 @@
 #include "webrtc/modules/rtp_rtcp/interface/rtp_receiver.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
diff --git a/webrtc/modules/rtp_rtcp/test/testAPI/test_api_audio.cc b/webrtc/modules/rtp_rtcp/test/testAPI/test_api_audio.cc
index 6e8ed7f..c8b83d3 100644
--- a/webrtc/modules/rtp_rtcp/test/testAPI/test_api_audio.cc
+++ b/webrtc/modules/rtp_rtcp/test/testAPI/test_api_audio.cc
@@ -147,12 +147,12 @@
   int test_id;
   RtpRtcp* module1;
   RtpRtcp* module2;
-  scoped_ptr<ReceiveStatistics> receive_statistics1_;
-  scoped_ptr<ReceiveStatistics> receive_statistics2_;
-  scoped_ptr<RtpReceiver> rtp_receiver1_;
-  scoped_ptr<RtpReceiver> rtp_receiver2_;
-  scoped_ptr<RTPPayloadRegistry> rtp_payload_registry1_;
-  scoped_ptr<RTPPayloadRegistry> rtp_payload_registry2_;
+  rtc::scoped_ptr<ReceiveStatistics> receive_statistics1_;
+  rtc::scoped_ptr<ReceiveStatistics> receive_statistics2_;
+  rtc::scoped_ptr<RtpReceiver> rtp_receiver1_;
+  rtc::scoped_ptr<RtpReceiver> rtp_receiver2_;
+  rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry1_;
+  rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry2_;
   VerifyingAudioReceiver* data_receiver1;
   VerifyingAudioReceiver* data_receiver2;
   LoopBackTransport* transport1;
diff --git a/webrtc/modules/rtp_rtcp/test/testAPI/test_api_rtcp.cc b/webrtc/modules/rtp_rtcp/test/testAPI/test_api_rtcp.cc
index 78c065e..10b561d 100644
--- a/webrtc/modules/rtp_rtcp/test/testAPI/test_api_rtcp.cc
+++ b/webrtc/modules/rtp_rtcp/test/testAPI/test_api_rtcp.cc
@@ -179,14 +179,14 @@
   }
 
   int test_id;
-  scoped_ptr<TestRtpFeedback> rtp_feedback1_;
-  scoped_ptr<TestRtpFeedback> rtp_feedback2_;
-  scoped_ptr<ReceiveStatistics> receive_statistics1_;
-  scoped_ptr<ReceiveStatistics> receive_statistics2_;
-  scoped_ptr<RTPPayloadRegistry> rtp_payload_registry1_;
-  scoped_ptr<RTPPayloadRegistry> rtp_payload_registry2_;
-  scoped_ptr<RtpReceiver> rtp_receiver1_;
-  scoped_ptr<RtpReceiver> rtp_receiver2_;
+  rtc::scoped_ptr<TestRtpFeedback> rtp_feedback1_;
+  rtc::scoped_ptr<TestRtpFeedback> rtp_feedback2_;
+  rtc::scoped_ptr<ReceiveStatistics> receive_statistics1_;
+  rtc::scoped_ptr<ReceiveStatistics> receive_statistics2_;
+  rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry1_;
+  rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry2_;
+  rtc::scoped_ptr<RtpReceiver> rtp_receiver1_;
+  rtc::scoped_ptr<RtpReceiver> rtp_receiver2_;
   RtpRtcp* module1;
   RtpRtcp* module2;
   TestRtpReceiver* receiver;
diff --git a/webrtc/modules/rtp_rtcp/test/testAPI/test_api_video.cc b/webrtc/modules/rtp_rtcp/test/testAPI/test_api_video.cc
index c60ed8f..e8d4320 100644
--- a/webrtc/modules/rtp_rtcp/test/testAPI/test_api_video.cc
+++ b/webrtc/modules/rtp_rtcp/test/testAPI/test_api_video.cc
@@ -130,9 +130,9 @@
   }
 
   int test_id_;
-  scoped_ptr<ReceiveStatistics> receive_statistics_;
+  rtc::scoped_ptr<ReceiveStatistics> receive_statistics_;
   RTPPayloadRegistry rtp_payload_registry_;
-  scoped_ptr<RtpReceiver> rtp_receiver_;
+  rtc::scoped_ptr<RtpReceiver> rtp_receiver_;
   RtpRtcp* video_module_;
   LoopBackTransport* transport_;
   TestRtpReceiver* receiver_;
@@ -173,7 +173,7 @@
                                          kPadSize);
       ++seq_num;
       RTPHeader header;
-      scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
+      rtc::scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
       EXPECT_TRUE(parser->Parse(padding_packet, packet_size, &header));
       PayloadUnion payload_specific;
       EXPECT_TRUE(rtp_payload_registry_.GetPayloadSpecifics(header.payloadType,
diff --git a/webrtc/modules/rtp_rtcp/test/testFec/test_packet_masks_metrics.cc b/webrtc/modules/rtp_rtcp/test/testFec/test_packet_masks_metrics.cc
index 2fb0968..843a7f7 100644
--- a/webrtc/modules/rtp_rtcp/test/testFec/test_packet_masks_metrics.cc
+++ b/webrtc/modules/rtp_rtcp/test/testFec/test_packet_masks_metrics.cc
@@ -46,9 +46,9 @@
 #include <math.h>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.h"
 #include "webrtc/modules/rtp_rtcp/test/testFec/average_residual_loss_xor_codes.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
 namespace webrtc {
@@ -198,7 +198,7 @@
   int RecoveredMediaPackets(int num_media_packets,
                             int num_fec_packets,
                             uint8_t* state) {
-    scoped_ptr<uint8_t[]> state_tmp(
+    rtc::scoped_ptr<uint8_t[]> state_tmp(
         new uint8_t[num_media_packets + num_fec_packets]);
     memcpy(state_tmp.get(), state, num_media_packets + num_fec_packets);
     int num_recovered_packets = 0;
@@ -392,7 +392,7 @@
   // (which containes the code size parameters/protection length).
   void ComputeMetricsForCode(CodeType code_type,
                              int code_index) {
-    scoped_ptr<double[]> prob_weight(new double[kNumLossModels]);
+    rtc::scoped_ptr<double[]> prob_weight(new double[kNumLossModels]);
     memset(prob_weight.get() , 0, sizeof(double) * kNumLossModels);
     MetricsFecCode metrics_code;
     SetMetricsZero(&metrics_code);
@@ -400,7 +400,7 @@
     int num_media_packets = code_params_[code_index].num_media_packets;
     int num_fec_packets = code_params_[code_index].num_fec_packets;
     int tot_num_packets = num_media_packets + num_fec_packets;
-    scoped_ptr<uint8_t[]> state(new uint8_t[tot_num_packets]);
+    rtc::scoped_ptr<uint8_t[]> state(new uint8_t[tot_num_packets]);
     memset(state.get() , 0, tot_num_packets);
 
     int num_loss_configurations = static_cast<int>(pow(2.0f, tot_num_packets));
diff --git a/webrtc/modules/utility/source/coder.h b/webrtc/modules/utility/source/coder.h
index 0363690..a821246 100644
--- a/webrtc/modules/utility/source/coder.h
+++ b/webrtc/modules/utility/source/coder.h
@@ -11,9 +11,9 @@
 #ifndef WEBRTC_MODULES_UTILITY_SOURCE_CODER_H_
 #define WEBRTC_MODULES_UTILITY_SOURCE_CODER_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -51,7 +51,7 @@
         const RTPFragmentationHeader* fragmentation) OVERRIDE;
 
 private:
-    scoped_ptr<AudioCodingModule> _acm;
+ rtc::scoped_ptr<AudioCodingModule> _acm;
 
     CodecInst _receiveCodec;
 
diff --git a/webrtc/modules/utility/source/file_player_impl.h b/webrtc/modules/utility/source/file_player_impl.h
index e1ba420..3093ce2 100644
--- a/webrtc/modules/utility/source/file_player_impl.h
+++ b/webrtc/modules/utility/source/file_player_impl.h
@@ -101,7 +101,7 @@
 private:
     int32_t SetUpVideoDecoder();
 
-    scoped_ptr<VideoCoder> video_decoder_;
+    rtc::scoped_ptr<VideoCoder> video_decoder_;
     VideoCodec video_codec_info_;
     int32_t _decodedVideoFrames;
 
diff --git a/webrtc/modules/utility/source/frame_scaler.h b/webrtc/modules/utility/source/frame_scaler.h
index cec5bfe..0aaafa4 100644
--- a/webrtc/modules/utility/source/frame_scaler.h
+++ b/webrtc/modules/utility/source/frame_scaler.h
@@ -15,10 +15,10 @@
 
 #ifdef WEBRTC_MODULE_UTILITY_VIDEO
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_video/interface/i420_video_frame.h"
 #include "webrtc/engine_configurations.h"
 #include "webrtc/modules/interface/module_common_types.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -37,7 +37,7 @@
                             int out_height);
 
  private:
-    scoped_ptr<Scaler> scaler_;
+  rtc::scoped_ptr<Scaler> scaler_;
     I420VideoFrame scaled_frame_;
 };
 
diff --git a/webrtc/modules/video_capture/test/video_capture_unittest.cc b/webrtc/modules/video_capture/test/video_capture_unittest.cc
index ba2dbd6..04a93a8 100644
--- a/webrtc/modules/video_capture/test/video_capture_unittest.cc
+++ b/webrtc/modules/video_capture/test/video_capture_unittest.cc
@@ -14,6 +14,7 @@
 #include <sstream>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_video/interface/i420_video_frame.h"
 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
 #include "webrtc/modules/utility/interface/process_thread.h"
@@ -21,15 +22,14 @@
 #include "webrtc/modules/video_capture/include/video_capture.h"
 #include "webrtc/modules/video_capture/include/video_capture_factory.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/scoped_refptr.h"
 #include "webrtc/system_wrappers/interface/sleep.h"
 #include "webrtc/system_wrappers/interface/tick_util.h"
 #include "webrtc/test/testsupport/gtest_disable.h"
 
+using rtc::scoped_ptr;
 using webrtc::CriticalSectionWrapper;
 using webrtc::CriticalSectionScoped;
-using webrtc::scoped_ptr;
 using webrtc::SleepMs;
 using webrtc::TickTime;
 using webrtc::VideoCaptureAlarm;
@@ -472,7 +472,7 @@
   size_t length = webrtc::CalcBufferSize(webrtc::kI420,
                                          test_frame_.width(),
                                          test_frame_.height());
-  webrtc::scoped_ptr<uint8_t[]> test_buffer(new uint8_t[length]);
+  scoped_ptr<uint8_t[]> test_buffer(new uint8_t[length]);
   webrtc::ExtractBuffer(test_frame_, length, test_buffer.get());
   EXPECT_EQ(0, capture_input_interface_->IncomingFrame(test_buffer.get(),
       length, capture_callback_.capability(), 0));
@@ -559,7 +559,7 @@
      size_t length = webrtc::CalcBufferSize(webrtc::kI420,
                                             test_frame_.width(),
                                             test_frame_.height());
-     webrtc::scoped_ptr<uint8_t[]> test_buffer(new uint8_t[length]);
+     scoped_ptr<uint8_t[]> test_buffer(new uint8_t[length]);
      webrtc::ExtractBuffer(test_frame_, length, test_buffer.get());
      EXPECT_EQ(0, capture_input_interface_->IncomingFrame(test_buffer.get(),
        length, capture_callback_.capability(), 0));
@@ -575,7 +575,7 @@
     size_t length = webrtc::CalcBufferSize(webrtc::kI420,
                                            test_frame_.width(),
                                            test_frame_.height());
-    webrtc::scoped_ptr<uint8_t[]> test_buffer(new uint8_t[length]);
+    scoped_ptr<uint8_t[]> test_buffer(new uint8_t[length]);
     webrtc::ExtractBuffer(test_frame_, length, test_buffer.get());
     EXPECT_EQ(0, capture_input_interface_->IncomingFrame(test_buffer.get(),
       length, capture_callback_.capability(), 0));
@@ -593,7 +593,7 @@
   size_t length = webrtc::CalcBufferSize(webrtc::kI420,
                                          test_frame_.width(),
                                          test_frame_.height());
-  webrtc::scoped_ptr<uint8_t[]> test_buffer(new uint8_t[length]);
+  scoped_ptr<uint8_t[]> test_buffer(new uint8_t[length]);
   webrtc::ExtractBuffer(test_frame_, length, test_buffer.get());
   EXPECT_EQ(0, capture_input_interface_->IncomingFrame(test_buffer.get(),
     length, capture_callback_.capability(), 0));
diff --git a/webrtc/modules/video_coding/codecs/test/videoprocessor.cc b/webrtc/modules/video_coding/codecs/test/videoprocessor.cc
index df04ba5..d6d8946 100644
--- a/webrtc/modules/video_coding/codecs/test/videoprocessor.cc
+++ b/webrtc/modules/video_coding/codecs/test/videoprocessor.cc
@@ -271,7 +271,7 @@
         assert(false);
     }
   }
-  scoped_ptr<uint8_t[]> copied_buffer(new uint8_t[encoded_image._length]);
+  rtc::scoped_ptr<uint8_t[]> copied_buffer(new uint8_t[encoded_image._length]);
   memcpy(copied_buffer.get(), encoded_image._buffer, encoded_image._length);
   EncodedImage copied_image;
   memcpy(&copied_image, &encoded_image, sizeof(copied_image));
@@ -337,7 +337,7 @@
     }
     // TODO(mikhal): Extracting the buffer for now - need to update test.
     size_t length = CalcBufferSize(kI420, up_image.width(), up_image.height());
-    scoped_ptr<uint8_t[]> image_buffer(new uint8_t[length]);
+    rtc::scoped_ptr<uint8_t[]> image_buffer(new uint8_t[length]);
     int extracted_length = ExtractBuffer(up_image, length, image_buffer.get());
     assert(extracted_length > 0);
     // Update our copy of the last successful frame:
@@ -351,7 +351,7 @@
     // Update our copy of the last successful frame:
     // TODO(mikhal): Add as a member function, so won't be allocated per frame.
     size_t length = CalcBufferSize(kI420, image.width(), image.height());
-    scoped_ptr<uint8_t[]> image_buffer(new uint8_t[length]);
+    rtc::scoped_ptr<uint8_t[]> image_buffer(new uint8_t[length]);
     int extracted_length = ExtractBuffer(image, length, image_buffer.get());
     assert(extracted_length > 0);
     memcpy(last_successful_frame_buffer_, image_buffer.get(), extracted_length);
diff --git a/webrtc/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc b/webrtc/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc
index 5c7b70a..fdf378f 100644
--- a/webrtc/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc
+++ b/webrtc/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc
@@ -11,10 +11,10 @@
 #include "gtest/gtest.h"
 #include "vpx/vpx_encoder.h"
 #include "vpx/vp8cx.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
 #include "webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h"
 #include "webrtc/modules/video_coding/utility/include/mock/mock_frame_dropper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 using ::testing::_;
 using ::testing::NiceMock;
@@ -93,7 +93,7 @@
 
   NiceMock<MockFrameDropper> tl0_frame_dropper_;
   NiceMock<MockFrameDropper> tl1_frame_dropper_;
-  scoped_ptr<ScreenshareLayersFT> layers_;
+  rtc::scoped_ptr<ScreenshareLayersFT> layers_;
 };
 
 TEST_F(ScreenshareLayerTest, 1Layer) {
diff --git a/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h b/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h
index ca900e0..2d8a47d 100644
--- a/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h
+++ b/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h
@@ -14,8 +14,8 @@
 
 #include <vector>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -97,8 +97,8 @@
 
   bool Initialized() const;
 
-  scoped_ptr<VideoEncoderFactory> factory_;
-  scoped_ptr<Config> screensharing_extra_options_;
+  rtc::scoped_ptr<VideoEncoderFactory> factory_;
+  rtc::scoped_ptr<Config> screensharing_extra_options_;
   VideoCodec codec_;
   std::vector<StreamInfo> streaminfos_;
   EncodedImageCallback* encoded_complete_callback_;
diff --git a/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter_unittest.cc b/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter_unittest.cc
index 36a30a3..762c507 100644
--- a/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter_unittest.cc
+++ b/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter_unittest.cc
@@ -281,8 +281,8 @@
   }
 
  protected:
-  scoped_ptr<TestSimulcastEncoderAdapterFakeHelper> helper_;
-  scoped_ptr<VP8Encoder> adapter_;
+  rtc::scoped_ptr<TestSimulcastEncoderAdapterFakeHelper> helper_;
+  rtc::scoped_ptr<VP8Encoder> adapter_;
   VideoCodec codec_;
 };
 
diff --git a/webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h b/webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h
index a4b982d..b2029b1 100644
--- a/webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h
+++ b/webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h
@@ -14,6 +14,7 @@
 #include <algorithm>
 #include <vector>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common.h"
 #include "webrtc/experiments.h"
 #include "webrtc/common_video/interface/i420_video_frame.h"
@@ -21,7 +22,6 @@
 #include "webrtc/modules/video_coding/codecs/interface/mock/mock_video_codec_interface.h"
 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
 #include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 #include "gtest/gtest.h"
 
@@ -987,9 +987,9 @@
     }
   }
 
-  scoped_ptr<VP8Encoder> encoder_;
+  rtc::scoped_ptr<VP8Encoder> encoder_;
   MockEncodedImageCallback encoder_callback_;
-  scoped_ptr<VP8Decoder> decoder_;
+  rtc::scoped_ptr<VP8Decoder> decoder_;
   MockDecodedImageCallback decoder_callback_;
   VideoCodec settings_;
   I420VideoFrame input_frame_;
diff --git a/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc b/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
index 5d44b48..e2e56e4 100644
--- a/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
+++ b/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
@@ -11,9 +11,9 @@
 #include <stdio.h>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/tick_util.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/test/testsupport/gtest_disable.h"
@@ -41,7 +41,7 @@
 
  private:
   EncodedImage* const encoded_frame_;
-  scoped_ptr<uint8_t[]> frame_buffer_;
+  rtc::scoped_ptr<uint8_t[]> frame_buffer_;
   bool encode_complete_;
 };
 
@@ -177,13 +177,13 @@
   const int kWidth = 172;
   const int kHeight = 144;
 
-  scoped_ptr<Vp8UnitTestEncodeCompleteCallback> encode_complete_callback_;
-  scoped_ptr<Vp8UnitTestDecodeCompleteCallback> decode_complete_callback_;
-  scoped_ptr<uint8_t[]> source_buffer_;
+  rtc::scoped_ptr<Vp8UnitTestEncodeCompleteCallback> encode_complete_callback_;
+  rtc::scoped_ptr<Vp8UnitTestDecodeCompleteCallback> decode_complete_callback_;
+  rtc::scoped_ptr<uint8_t[]> source_buffer_;
   FILE* source_file_;
   I420VideoFrame input_frame_;
-  scoped_ptr<VideoEncoder> encoder_;
-  scoped_ptr<VideoDecoder> decoder_;
+  rtc::scoped_ptr<VideoEncoder> encoder_;
+  rtc::scoped_ptr<VideoDecoder> decoder_;
   EncodedImage encoded_frame_;
   I420VideoFrame decoded_frame_;
   size_t length_source_frame_;
@@ -257,13 +257,13 @@
   EXPECT_EQ(0, encoder_->Encode(input_frame_, NULL, NULL));
   EXPECT_EQ(0, decoder_->Decode(encoded_frame_, false, NULL));
   size_t length = CalcBufferSize(kI420, kWidth, kHeight);
-  scoped_ptr<uint8_t[]> first_frame_buffer(new uint8_t[length]);
+  rtc::scoped_ptr<uint8_t[]> first_frame_buffer(new uint8_t[length]);
   ExtractBuffer(decoded_frame_, length, first_frame_buffer.get());
 
   EXPECT_EQ(0, decoder_->Reset());
 
   EXPECT_EQ(0, decoder_->Decode(encoded_frame_, false, NULL));
-  scoped_ptr<uint8_t[]> second_frame_buffer(new uint8_t[length]);
+  rtc::scoped_ptr<uint8_t[]> second_frame_buffer(new uint8_t[length]);
   ExtractBuffer(decoded_frame_, length, second_frame_buffer.get());
 
   EXPECT_EQ(
diff --git a/webrtc/modules/video_coding/codecs/vp8/vp8_sequence_coder.cc b/webrtc/modules/video_coding/codecs/vp8/vp8_sequence_coder.cc
index 39da34b..84b17e4 100644
--- a/webrtc/modules/video_coding/codecs/vp8/vp8_sequence_coder.cc
+++ b/webrtc/modules/video_coding/codecs/vp8/vp8_sequence_coder.cc
@@ -9,11 +9,11 @@
  */
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_video/interface/i420_video_frame.h"
 #include "webrtc/common_video/interface/video_image.h"
 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/tick_util.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/test/testsupport/metrics/video_metrics.h"
@@ -142,7 +142,7 @@
   EXPECT_EQ(0, decoder->InitDecode(&inst, 1));
   webrtc::I420VideoFrame input_frame;
   size_t length = webrtc::CalcBufferSize(webrtc::kI420, width, height);
-  webrtc::scoped_ptr<uint8_t[]> frame_buffer(new uint8_t[length]);
+  rtc::scoped_ptr<uint8_t[]> frame_buffer(new uint8_t[length]);
 
   int half_width = (width + 1) / 2;
   // Set and register callbacks.
diff --git a/webrtc/modules/video_coding/main/source/codec_database.h b/webrtc/modules/video_coding/main/source/codec_database.h
index 1aa8f4d..762a909 100644
--- a/webrtc/modules/video_coding/main/source/codec_database.h
+++ b/webrtc/modules/video_coding/main/source/codec_database.h
@@ -13,11 +13,11 @@
 
 #include <map>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
 #include "webrtc/modules/video_coding/main/interface/video_coding.h"
 #include "webrtc/modules/video_coding/main/source/generic_decoder.h"
 #include "webrtc/modules/video_coding/main/source/generic_encoder.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -28,7 +28,7 @@
                     int number_of_cores,
                     bool require_key_frame);
 
-  scoped_ptr<VideoCodec> settings;
+  rtc::scoped_ptr<VideoCodec> settings;
   int number_of_cores;
   bool require_key_frame;
 };
diff --git a/webrtc/modules/video_coding/main/source/generic_encoder.h b/webrtc/modules/video_coding/main/source/generic_encoder.h
index e547a47..1fefc40 100644
--- a/webrtc/modules/video_coding/main/source/generic_encoder.h
+++ b/webrtc/modules/video_coding/main/source/generic_encoder.h
@@ -16,7 +16,7 @@
 
 #include <stdio.h>
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
 class CriticalSectionWrapper;
diff --git a/webrtc/modules/video_coding/main/source/jitter_buffer.h b/webrtc/modules/video_coding/main/source/jitter_buffer.h
index 7857aaa..d2cbc27 100644
--- a/webrtc/modules/video_coding/main/source/jitter_buffer.h
+++ b/webrtc/modules/video_coding/main/source/jitter_buffer.h
@@ -293,7 +293,7 @@
   bool running_;
   CriticalSectionWrapper* crit_sect_;
   // Event to signal when we have a frame ready for decoder.
-  scoped_ptr<EventWrapper> frame_event_;
+  rtc::scoped_ptr<EventWrapper> frame_event_;
   // Number of allocated frames.
   int max_number_of_frames_;
   UnorderedFrameList free_frames_ GUARDED_BY(crit_sect_);
diff --git a/webrtc/modules/video_coding/main/source/jitter_buffer_unittest.cc b/webrtc/modules/video_coding/main/source/jitter_buffer_unittest.cc
index 8ebd587..42523e9 100644
--- a/webrtc/modules/video_coding/main/source/jitter_buffer_unittest.cc
+++ b/webrtc/modules/video_coding/main/source/jitter_buffer_unittest.cc
@@ -111,10 +111,10 @@
   uint32_t timestamp_;
   int size_;
   uint8_t data_[1500];
-  scoped_ptr<VCMPacket> packet_;
-  scoped_ptr<SimulatedClock> clock_;
+  rtc::scoped_ptr<VCMPacket> packet_;
+  rtc::scoped_ptr<SimulatedClock> clock_;
   NullEventFactory event_factory_;
-  scoped_ptr<VCMJitterBuffer> jitter_buffer_;
+  rtc::scoped_ptr<VCMJitterBuffer> jitter_buffer_;
 };
 
 
@@ -218,7 +218,7 @@
 
   VCMJitterBuffer* jitter_buffer_;
   StreamGenerator* stream_generator_;
-  scoped_ptr<SimulatedClock> clock_;
+  rtc::scoped_ptr<SimulatedClock> clock_;
   NullEventFactory event_factory_;
   size_t max_nack_list_size_;
   int oldest_packet_to_nack_;
diff --git a/webrtc/modules/video_coding/main/source/media_optimization.h b/webrtc/modules/video_coding/main/source/media_optimization.h
index aa21921..3083342 100644
--- a/webrtc/modules/video_coding/main/source/media_optimization.h
+++ b/webrtc/modules/video_coding/main/source/media_optimization.h
@@ -13,12 +13,12 @@
 
 #include <list>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/interface/module_common_types.h"
 #include "webrtc/modules/video_coding/main/interface/video_coding.h"
 #include "webrtc/modules/video_coding/main/source/media_opt_util.h"
 #include "webrtc/modules/video_coding/main/source/qm_select.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -140,7 +140,7 @@
   uint32_t SentFrameRateInternal() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
 
   // Protect all members.
-  scoped_ptr<CriticalSectionWrapper> crit_sect_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
 
   Clock* clock_ GUARDED_BY(crit_sect_);
   int32_t max_bit_rate_ GUARDED_BY(crit_sect_);
@@ -148,8 +148,9 @@
   uint16_t codec_width_ GUARDED_BY(crit_sect_);
   uint16_t codec_height_ GUARDED_BY(crit_sect_);
   float user_frame_rate_ GUARDED_BY(crit_sect_);
-  scoped_ptr<FrameDropper> frame_dropper_ GUARDED_BY(crit_sect_);
-  scoped_ptr<VCMLossProtectionLogic> loss_prot_logic_ GUARDED_BY(crit_sect_);
+  rtc::scoped_ptr<FrameDropper> frame_dropper_ GUARDED_BY(crit_sect_);
+  rtc::scoped_ptr<VCMLossProtectionLogic> loss_prot_logic_
+      GUARDED_BY(crit_sect_);
   uint8_t fraction_lost_ GUARDED_BY(crit_sect_);
   uint32_t send_statistics_[4] GUARDED_BY(crit_sect_);
   uint32_t send_statistics_zero_encode_ GUARDED_BY(crit_sect_);
@@ -163,8 +164,8 @@
   uint32_t avg_sent_framerate_ GUARDED_BY(crit_sect_);
   uint32_t key_frame_cnt_ GUARDED_BY(crit_sect_);
   uint32_t delta_frame_cnt_ GUARDED_BY(crit_sect_);
-  scoped_ptr<VCMContentMetricsProcessing> content_ GUARDED_BY(crit_sect_);
-  scoped_ptr<VCMQmResolution> qm_resolution_ GUARDED_BY(crit_sect_);
+  rtc::scoped_ptr<VCMContentMetricsProcessing> content_ GUARDED_BY(crit_sect_);
+  rtc::scoped_ptr<VCMQmResolution> qm_resolution_ GUARDED_BY(crit_sect_);
   int64_t last_qm_update_time_ GUARDED_BY(crit_sect_);
   int64_t last_change_time_ GUARDED_BY(crit_sect_);  // Content/user triggered.
   int num_layers_ GUARDED_BY(crit_sect_);
diff --git a/webrtc/modules/video_coding/main/source/receiver.h b/webrtc/modules/video_coding/main/source/receiver.h
index 0e1f01a..b27e35c 100644
--- a/webrtc/modules/video_coding/main/source/receiver.h
+++ b/webrtc/modules/video_coding/main/source/receiver.h
@@ -90,7 +90,7 @@
   Clock* const clock_;
   VCMJitterBuffer jitter_buffer_;
   VCMTiming* timing_;
-  scoped_ptr<EventWrapper> render_wait_event_;
+  rtc::scoped_ptr<EventWrapper> render_wait_event_;
   VCMReceiverState state_;
   int max_video_delay_ms_;
 
diff --git a/webrtc/modules/video_coding/main/source/receiver_unittest.cc b/webrtc/modules/video_coding/main/source/receiver_unittest.cc
index 6135a93..e5b6804 100644
--- a/webrtc/modules/video_coding/main/source/receiver_unittest.cc
+++ b/webrtc/modules/video_coding/main/source/receiver_unittest.cc
@@ -89,11 +89,11 @@
     return true;
   }
 
-  scoped_ptr<SimulatedClock> clock_;
+  rtc::scoped_ptr<SimulatedClock> clock_;
   VCMTiming timing_;
   NullEventFactory event_factory_;
   VCMReceiver receiver_;
-  scoped_ptr<StreamGenerator> stream_generator_;
+  rtc::scoped_ptr<StreamGenerator> stream_generator_;
   uint8_t data_buffer_[kDataBufferSize];
 };
 
diff --git a/webrtc/modules/video_coding/main/source/video_coding_impl.cc b/webrtc/modules/video_coding/main/source/video_coding_impl.cc
index eab45f0..ff2ab93 100644
--- a/webrtc/modules/video_coding/main/source/video_coding_impl.cc
+++ b/webrtc/modules/video_coding/main/source/video_coding_impl.cc
@@ -65,7 +65,7 @@
   }
 
  private:
-  scoped_ptr<CriticalSectionWrapper> cs_;
+  rtc::scoped_ptr<CriticalSectionWrapper> cs_;
   EncodedImageCallback* callback_ GUARDED_BY(cs_);
 };
 
@@ -362,9 +362,9 @@
   EncodedImageCallbackWrapper post_encode_callback_;
   // TODO(tommi): Change sender_ and receiver_ to be non pointers
   // (construction is 1 alloc instead of 3).
-  scoped_ptr<vcm::VideoSender> sender_;
-  scoped_ptr<vcm::VideoReceiver> receiver_;
-  scoped_ptr<EventFactory> own_event_factory_;
+  rtc::scoped_ptr<vcm::VideoSender> sender_;
+  rtc::scoped_ptr<vcm::VideoReceiver> receiver_;
+  rtc::scoped_ptr<EventFactory> own_event_factory_;
 };
 }  // namespace
 
diff --git a/webrtc/modules/video_coding/main/source/video_coding_impl.h b/webrtc/modules/video_coding/main/source/video_coding_impl.h
index 8faa1e4..df38ad7 100644
--- a/webrtc/modules/video_coding/main/source/video_coding_impl.h
+++ b/webrtc/modules/video_coding/main/source/video_coding_impl.h
@@ -127,9 +127,9 @@
  private:
   Clock* clock_;
 
-  scoped_ptr<DebugRecorder> recorder_;
+  rtc::scoped_ptr<DebugRecorder> recorder_;
 
-  scoped_ptr<CriticalSectionWrapper> process_crit_sect_;
+  rtc::scoped_ptr<CriticalSectionWrapper> process_crit_sect_;
   CriticalSectionWrapper* _sendCritSect;
   VCMGenericEncoder* _encoder;
   VCMEncodedFrameCallback _encodedFrameCallback;
@@ -221,7 +221,7 @@
   };
 
   Clock* const clock_;
-  scoped_ptr<CriticalSectionWrapper> process_crit_sect_;
+  rtc::scoped_ptr<CriticalSectionWrapper> process_crit_sect_;
   CriticalSectionWrapper* _receiveCritSect;
   bool _receiverInited GUARDED_BY(_receiveCritSect);
   VCMTiming _timing;
diff --git a/webrtc/modules/video_coding/main/source/video_coding_robustness_unittest.cc b/webrtc/modules/video_coding/main/source/video_coding_robustness_unittest.cc
index a7f909e..40a754e 100644
--- a/webrtc/modules/video_coding/main/source/video_coding_robustness_unittest.cc
+++ b/webrtc/modules/video_coding/main/source/video_coding_robustness_unittest.cc
@@ -80,7 +80,7 @@
   MockPacketRequestCallback request_callback_;
   NiceMock<MockVideoDecoder> decoder_;
   NiceMock<MockVideoDecoder> decoderCopy_;
-  scoped_ptr<SimulatedClock> clock_;
+  rtc::scoped_ptr<SimulatedClock> clock_;
   NullEventFactory event_factory_;
 };
 
diff --git a/webrtc/modules/video_coding/main/source/video_receiver_unittest.cc b/webrtc/modules/video_coding/main/source/video_receiver_unittest.cc
index ec5ba93..209a45c 100644
--- a/webrtc/modules/video_coding/main/source/video_receiver_unittest.cc
+++ b/webrtc/modules/video_coding/main/source/video_receiver_unittest.cc
@@ -11,13 +11,13 @@
 #include <vector>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/video_coding/codecs/interface/mock/mock_video_codec_interface.h"
 #include "webrtc/modules/video_coding/main/interface/mock/mock_vcm_callbacks.h"
 #include "webrtc/modules/video_coding/main/interface/video_coding.h"
 #include "webrtc/modules/video_coding/main/source/video_coding_impl.h"
 #include "webrtc/modules/video_coding/main/test/test_util.h"
 #include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 using ::testing::_;
 using ::testing::NiceMock;
@@ -79,7 +79,7 @@
   NiceMock<MockVideoDecoder> decoder_;
   NiceMock<MockPacketRequestCallback> packet_request_callback_;
 
-  scoped_ptr<VideoReceiver> receiver_;
+  rtc::scoped_ptr<VideoReceiver> receiver_;
 };
 
 TEST_F(TestVideoReceiver, PaddingOnlyFrames) {
diff --git a/webrtc/modules/video_coding/main/source/video_sender.cc b/webrtc/modules/video_coding/main/source/video_sender.cc
index a805045..684a1a4 100644
--- a/webrtc/modules/video_coding/main/source/video_sender.cc
+++ b/webrtc/modules/video_coding/main/source/video_sender.cc
@@ -55,7 +55,7 @@
   }
 
  private:
-  scoped_ptr<CriticalSectionWrapper> cs_;
+  rtc::scoped_ptr<CriticalSectionWrapper> cs_;
   FILE* file_ GUARDED_BY(cs_);
 };
 
diff --git a/webrtc/modules/video_coding/main/source/video_sender_unittest.cc b/webrtc/modules/video_coding/main/source/video_sender_unittest.cc
index 4be71ab..6666e4b 100644
--- a/webrtc/modules/video_coding/main/source/video_sender_unittest.cc
+++ b/webrtc/modules/video_coding/main/source/video_sender_unittest.cc
@@ -11,6 +11,7 @@
 #include <vector>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common.h"
 #include "webrtc/modules/video_coding/codecs/interface/mock/mock_video_codec_interface.h"
 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h"
@@ -20,7 +21,6 @@
 #include "webrtc/modules/video_coding/main/source/video_coding_impl.h"
 #include "webrtc/modules/video_coding/main/test/test_util.h"
 #include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/frame_generator.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/test/testsupport/gtest_disable.h"
@@ -76,7 +76,7 @@
   }
 
  private:
-  scoped_ptr<I420VideoFrame> frame_;
+  rtc::scoped_ptr<I420VideoFrame> frame_;
 };
 
 class PacketizationCallback : public VCMPacketizationCallback {
@@ -185,8 +185,8 @@
   SimulatedClock clock_;
   PacketizationCallback packetization_callback_;
   MockEncodedImageCallback post_encode_callback_;
-  scoped_ptr<VideoSender> sender_;
-  scoped_ptr<FrameGenerator> generator_;
+  rtc::scoped_ptr<VideoSender> sender_;
+  rtc::scoped_ptr<FrameGenerator> generator_;
 };
 
 class TestVideoSenderWithMockEncoder : public TestVideoSender {
diff --git a/webrtc/modules/video_coding/main/test/mt_rx_tx_test.cc b/webrtc/modules/video_coding/main/test/mt_rx_tx_test.cc
index acbc5c9..e78fedc 100644
--- a/webrtc/modules/video_coding/main/test/mt_rx_tx_test.cc
+++ b/webrtc/modules/video_coding/main/test/mt_rx_tx_test.cc
@@ -156,11 +156,10 @@
     configuration.audio = false;
     configuration.outgoing_transport = outgoingTransport;
     RtpRtcp* rtp = RtpRtcp::CreateRtpRtcp(configuration);
-    scoped_ptr<RTPPayloadRegistry> registry(new RTPPayloadRegistry(
-        RTPPayloadStrategy::CreateStrategy(false)));
-    scoped_ptr<RtpReceiver> rtp_receiver(
-        RtpReceiver::CreateVideoReceiver(-1, Clock::GetRealTimeClock(),
-                                         &dataCallback, NULL, registry.get()));
+    rtc::scoped_ptr<RTPPayloadRegistry> registry(
+        new RTPPayloadRegistry(RTPPayloadStrategy::CreateStrategy(false)));
+    rtc::scoped_ptr<RtpReceiver> rtp_receiver(RtpReceiver::CreateVideoReceiver(
+        -1, Clock::GetRealTimeClock(), &dataCallback, NULL, registry.get()));
 
     // registering codecs for the RTP module
     VideoCodec video_codec;
diff --git a/webrtc/modules/video_coding/main/test/mt_test_common.cc b/webrtc/modules/video_coding/main/test/mt_test_common.cc
index dec649f..5d84696 100644
--- a/webrtc/modules/video_coding/main/test/mt_test_common.cc
+++ b/webrtc/modules/video_coding/main/test/mt_test_common.cc
@@ -92,7 +92,7 @@
         _rtpPackets.pop_front();
         // Send to receive side
         RTPHeader header;
-        scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
+        rtc::scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
         if (!parser->Parse(packet->data, packet->length, &header)) {
           delete packet;
           return -1;
diff --git a/webrtc/modules/video_coding/main/test/rtp_player.cc b/webrtc/modules/video_coding/main/test/rtp_player.cc
index 5057f7d..c7a2f66 100644
--- a/webrtc/modules/video_coding/main/test/rtp_player.cc
+++ b/webrtc/modules/video_coding/main/test/rtp_player.cc
@@ -14,6 +14,7 @@
 
 #include <map>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_receiver.h"
@@ -22,7 +23,6 @@
 #include "webrtc/modules/video_coding/main/test/test_util.h"
 #include "webrtc/system_wrappers/interface/clock.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/rtp_file_reader.h"
 
 #if 1
@@ -60,7 +60,7 @@
   uint16_t seq_num() const { return seq_num_; }
 
  private:
-  scoped_ptr<uint8_t[]> data_;
+  rtc::scoped_ptr<uint8_t[]> data_;
   size_t length_;
   int64_t resend_time_ms_;
   uint32_t ssrc_;
@@ -175,7 +175,7 @@
   typedef RtpPacketList::iterator RtpPacketIterator;
   typedef RtpPacketList::const_iterator ConstRtpPacketIterator;
 
-  scoped_ptr<CriticalSectionWrapper> crit_sect_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
   FILE* debug_file_;
   int loss_count_;
   RtpPacketList packets_;
@@ -208,7 +208,7 @@
     }
     DEBUG_LOG1("Registering handler for ssrc=%08x", ssrc);
 
-    scoped_ptr<Handler> handler(
+    rtc::scoped_ptr<Handler> handler(
         new Handler(ssrc, payload_types_, lost_packets));
     handler->payload_sink_.reset(payload_sink_factory_->Create(handler.get()));
     if (handler->payload_sink_.get() == NULL) {
@@ -295,10 +295,10 @@
       return payload_types_;
     }
 
-    scoped_ptr<RtpHeaderParser> rtp_header_parser_;
-    scoped_ptr<RTPPayloadRegistry> rtp_payload_registry_;
-    scoped_ptr<RtpReceiver> rtp_module_;
-    scoped_ptr<PayloadSinkInterface> payload_sink_;
+    rtc::scoped_ptr<RtpHeaderParser> rtp_header_parser_;
+    rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry_;
+    rtc::scoped_ptr<RtpReceiver> rtp_module_;
+    rtc::scoped_ptr<PayloadSinkInterface> payload_sink_;
 
    private:
     uint32_t ssrc_;
@@ -321,22 +321,25 @@
 class RtpPlayerImpl : public RtpPlayerInterface {
  public:
   RtpPlayerImpl(PayloadSinkFactoryInterface* payload_sink_factory,
-      const PayloadTypes& payload_types, Clock* clock,
-      scoped_ptr<test::RtpFileReader>* packet_source,
-      float loss_rate, int64_t rtt_ms, bool reordering)
-    : ssrc_handlers_(payload_sink_factory, payload_types),
-      clock_(clock),
-      next_rtp_time_(0),
-      first_packet_(true),
-      first_packet_rtp_time_(0),
-      first_packet_time_ms_(0),
-      loss_rate_(loss_rate),
-      lost_packets_(clock, rtt_ms),
-      resend_packet_count_(0),
-      no_loss_startup_(100),
-      end_of_file_(false),
-      reordering_(false),
-      reorder_buffer_() {
+                const PayloadTypes& payload_types,
+                Clock* clock,
+                rtc::scoped_ptr<test::RtpFileReader>* packet_source,
+                float loss_rate,
+                int64_t rtt_ms,
+                bool reordering)
+      : ssrc_handlers_(payload_sink_factory, payload_types),
+        clock_(clock),
+        next_rtp_time_(0),
+        first_packet_(true),
+        first_packet_rtp_time_(0),
+        first_packet_time_ms_(0),
+        loss_rate_(loss_rate),
+        lost_packets_(clock, rtt_ms),
+        resend_packet_count_(0),
+        no_loss_startup_(100),
+        end_of_file_(false),
+        reordering_(false),
+        reorder_buffer_() {
     assert(clock);
     assert(packet_source);
     assert(packet_source->get());
@@ -421,7 +424,8 @@
     assert(data);
     assert(length > 0);
 
-    scoped_ptr<RtpHeaderParser> rtp_header_parser(RtpHeaderParser::Create());
+    rtc::scoped_ptr<RtpHeaderParser> rtp_header_parser(
+        RtpHeaderParser::Create());
     if (!rtp_header_parser->IsRtcp(data, length)) {
       RTPHeader header;
       if (!rtp_header_parser->Parse(data, length, &header)) {
@@ -449,7 +453,7 @@
 
   SsrcHandlers ssrc_handlers_;
   Clock* clock_;
-  scoped_ptr<test::RtpFileReader> packet_source_;
+  rtc::scoped_ptr<test::RtpFileReader> packet_source_;
   test::RtpPacket next_packet_;
   uint32_t next_rtp_time_;
   bool first_packet_;
@@ -461,7 +465,7 @@
   uint32_t no_loss_startup_;
   bool end_of_file_;
   bool reordering_;
-  scoped_ptr<RawRtpPacket> reorder_buffer_;
+  rtc::scoped_ptr<RawRtpPacket> reorder_buffer_;
 
   DISALLOW_IMPLICIT_CONSTRUCTORS(RtpPlayerImpl);
 };
@@ -470,8 +474,9 @@
     PayloadSinkFactoryInterface* payload_sink_factory, Clock* clock,
     const PayloadTypes& payload_types, float loss_rate, int64_t rtt_ms,
     bool reordering) {
-  scoped_ptr<test::RtpFileReader> packet_source(test::RtpFileReader::Create(
-      test::RtpFileReader::kRtpDump, input_filename));
+  rtc::scoped_ptr<test::RtpFileReader> packet_source(
+      test::RtpFileReader::Create(test::RtpFileReader::kRtpDump,
+                                  input_filename));
   if (packet_source.get() == NULL) {
     packet_source.reset(test::RtpFileReader::Create(test::RtpFileReader::kPcap,
                                                     input_filename));
@@ -480,8 +485,9 @@
     }
   }
 
-  scoped_ptr<RtpPlayerImpl> impl(new RtpPlayerImpl(payload_sink_factory,
-      payload_types, clock, &packet_source, loss_rate, rtt_ms, reordering));
+  rtc::scoped_ptr<RtpPlayerImpl> impl(
+      new RtpPlayerImpl(payload_sink_factory, payload_types, clock,
+                        &packet_source, loss_rate, rtt_ms, reordering));
   return impl.release();
 }
 }  // namespace rtpplayer
diff --git a/webrtc/modules/video_coding/main/test/test_callbacks.cc b/webrtc/modules/video_coding/main/test/test_callbacks.cc
index 58468b2..8a17a69 100644
--- a/webrtc/modules/video_coding/main/test/test_callbacks.cc
+++ b/webrtc/modules/video_coding/main/test/test_callbacks.cc
@@ -292,7 +292,7 @@
         assert(_rtp);  // We must have a configured RTP module for this test.
         // Send to receive side
         RTPHeader header;
-        scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
+        rtc::scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
         if (!parser->Parse(packet->data, packet->length, &header)) {
           delete packet;
           return -1;
diff --git a/webrtc/modules/video_coding/main/test/vcm_payload_sink_factory.cc b/webrtc/modules/video_coding/main/test/vcm_payload_sink_factory.cc
index 76d5478..3f2d609 100644
--- a/webrtc/modules/video_coding/main/test/vcm_payload_sink_factory.cc
+++ b/webrtc/modules/video_coding/main/test/vcm_payload_sink_factory.cc
@@ -28,12 +28,9 @@
  public:
   VcmPayloadSink(VcmPayloadSinkFactory* factory,
                  RtpStreamInterface* stream,
-                 scoped_ptr<VideoCodingModule>* vcm,
-                 scoped_ptr<FileOutputFrameReceiver>* frame_receiver)
-      : factory_(factory),
-        stream_(stream),
-        vcm_(),
-        frame_receiver_() {
+                 rtc::scoped_ptr<VideoCodingModule>* vcm,
+                 rtc::scoped_ptr<FileOutputFrameReceiver>* frame_receiver)
+      : factory_(factory), stream_(stream), vcm_(), frame_receiver_() {
     assert(factory);
     assert(stream);
     assert(vcm);
@@ -97,8 +94,8 @@
  private:
   VcmPayloadSinkFactory* factory_;
   RtpStreamInterface* stream_;
-  scoped_ptr<VideoCodingModule> vcm_;
-  scoped_ptr<FileOutputFrameReceiver> frame_receiver_;
+  rtc::scoped_ptr<VideoCodingModule> vcm_;
+  rtc::scoped_ptr<FileOutputFrameReceiver> frame_receiver_;
 
   DISALLOW_IMPLICIT_CONSTRUCTORS(VcmPayloadSink);
 };
@@ -134,7 +131,7 @@
   assert(stream);
   CriticalSectionScoped cs(crit_sect_.get());
 
-  scoped_ptr<VideoCodingModule> vcm(
+  rtc::scoped_ptr<VideoCodingModule> vcm(
       VideoCodingModule::Create(clock_, null_event_factory_.get()));
   if (vcm.get() == NULL) {
     return NULL;
@@ -165,9 +162,9 @@
   vcm->SetMinimumPlayoutDelay(min_playout_delay_ms_);
   vcm->SetNackSettings(kMaxNackListSize, kMaxPacketAgeToNack, 0);
 
-  scoped_ptr<FileOutputFrameReceiver> frame_receiver(
+  rtc::scoped_ptr<FileOutputFrameReceiver> frame_receiver(
       new FileOutputFrameReceiver(base_out_filename_, stream->ssrc()));
-  scoped_ptr<VcmPayloadSink> sink(
+  rtc::scoped_ptr<VcmPayloadSink> sink(
       new VcmPayloadSink(this, stream, &vcm, &frame_receiver));
 
   sinks_.push_back(sink.get());
diff --git a/webrtc/modules/video_coding/main/test/vcm_payload_sink_factory.h b/webrtc/modules/video_coding/main/test/vcm_payload_sink_factory.h
index 0817423..ca0ed56 100644
--- a/webrtc/modules/video_coding/main/test/vcm_payload_sink_factory.h
+++ b/webrtc/modules/video_coding/main/test/vcm_payload_sink_factory.h
@@ -12,9 +12,9 @@
 #include <vector>
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/video_coding/main/interface/video_coding_defines.h"
 #include "webrtc/modules/video_coding/main/test/rtp_player.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 class NullEventFactory;
 
@@ -53,8 +53,8 @@
   int64_t rtt_ms_;
   uint32_t render_delay_ms_;
   uint32_t min_playout_delay_ms_;
-  scoped_ptr<NullEventFactory> null_event_factory_;
-  scoped_ptr<CriticalSectionWrapper> crit_sect_;
+  rtc::scoped_ptr<NullEventFactory> null_event_factory_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
   Sinks sinks_;
 
   DISALLOW_IMPLICIT_CONSTRUCTORS(VcmPayloadSinkFactory);
diff --git a/webrtc/modules/video_coding/main/test/video_rtp_play.cc b/webrtc/modules/video_coding/main/test/video_rtp_play.cc
index 5f8ea35..1cf27c7 100644
--- a/webrtc/modules/video_coding/main/test/video_rtp_play.cc
+++ b/webrtc/modules/video_coding/main/test/video_rtp_play.cc
@@ -50,9 +50,10 @@
   webrtc::rtpplayer::VcmPayloadSinkFactory factory(output_file, &clock,
       kConfigProtectionEnabled, kConfigProtectionMethod, kConfigRttMs,
       kConfigRenderDelayMs, kConfigMinPlayoutDelayMs);
-  webrtc::scoped_ptr<webrtc::rtpplayer::RtpPlayerInterface> rtp_player(
+  rtc::scoped_ptr<webrtc::rtpplayer::RtpPlayerInterface> rtp_player(
       webrtc::rtpplayer::Create(args.inputFile, &factory, &clock, payload_types,
-          kConfigLossRate, kConfigRttMs, kConfigReordering));
+                                kConfigLossRate, kConfigRttMs,
+                                kConfigReordering));
   if (rtp_player.get() == NULL) {
     return -1;
   }
diff --git a/webrtc/modules/video_coding/main/test/video_rtp_play_mt.cc b/webrtc/modules/video_coding/main/test/video_rtp_play_mt.cc
index f334db5..41ae349 100644
--- a/webrtc/modules/video_coding/main/test/video_rtp_play_mt.cc
+++ b/webrtc/modules/video_coding/main/test/video_rtp_play_mt.cc
@@ -38,7 +38,7 @@
   assert(obj);
   RtpPlayerInterface* rtp_player = static_cast<RtpPlayerInterface*>(obj);
 
-  webrtc::scoped_ptr<webrtc::EventWrapper> wait_event(
+  rtc::scoped_ptr<webrtc::EventWrapper> wait_event(
       webrtc::EventWrapper::Create());
   if (wait_event.get() == NULL) {
     return false;
@@ -82,7 +82,7 @@
   VcmPayloadSinkFactory factory(output_file, clock, kConfigProtectionEnabled,
       kConfigProtectionMethod, kConfigRttMs, kConfigRenderDelayMs,
       kConfigMinPlayoutDelayMs);
-  webrtc::scoped_ptr<RtpPlayerInterface> rtp_player(webrtc::rtpplayer::Create(
+  rtc::scoped_ptr<RtpPlayerInterface> rtp_player(webrtc::rtpplayer::Create(
       args.inputFile, &factory, clock, payload_types, kConfigLossRate,
       kConfigRttMs, kConfigReordering));
   if (rtp_player.get() == NULL) {
@@ -90,31 +90,33 @@
   }
 
   {
-    webrtc::scoped_ptr<webrtc::ThreadWrapper> player_thread(
+    rtc::scoped_ptr<webrtc::ThreadWrapper> player_thread(
         webrtc::ThreadWrapper::CreateThread(PlayerThread, rtp_player.get(),
-            webrtc::kNormalPriority, "PlayerThread"));
+                                            webrtc::kNormalPriority,
+                                            "PlayerThread"));
     if (player_thread.get() == NULL) {
       printf("Unable to start RTP reader thread\n");
       return -1;
     }
 
-    webrtc::scoped_ptr<webrtc::ThreadWrapper> processing_thread(
+    rtc::scoped_ptr<webrtc::ThreadWrapper> processing_thread(
         webrtc::ThreadWrapper::CreateThread(ProcessingThread, &factory,
-            webrtc::kNormalPriority, "ProcessingThread"));
+                                            webrtc::kNormalPriority,
+                                            "ProcessingThread"));
     if (processing_thread.get() == NULL) {
       printf("Unable to start processing thread\n");
       return -1;
     }
 
-    webrtc::scoped_ptr<webrtc::ThreadWrapper> decode_thread(
-        webrtc::ThreadWrapper::CreateThread(DecodeThread, &factory,
-            webrtc::kNormalPriority, "DecodeThread"));
+    rtc::scoped_ptr<webrtc::ThreadWrapper> decode_thread(
+        webrtc::ThreadWrapper::CreateThread(
+            DecodeThread, &factory, webrtc::kNormalPriority, "DecodeThread"));
     if (decode_thread.get() == NULL) {
       printf("Unable to start decode thread\n");
       return -1;
     }
 
-    webrtc::scoped_ptr<webrtc::EventWrapper> wait_event(
+    rtc::scoped_ptr<webrtc::EventWrapper> wait_event(
         webrtc::EventWrapper::Create());
     if (wait_event.get() == NULL) {
       printf("Unable to create wait event\n");
diff --git a/webrtc/modules/video_processing/main/test/unit_test/brightness_detection_test.cc b/webrtc/modules/video_processing/main/test/unit_test/brightness_detection_test.cc
index c53c1fb..69f7fd8 100644
--- a/webrtc/modules/video_processing/main/test/unit_test/brightness_detection_test.cc
+++ b/webrtc/modules/video_processing/main/test/unit_test/brightness_detection_test.cc
@@ -19,7 +19,7 @@
     uint32_t frameNum = 0;
     int32_t brightnessWarning = 0;
     uint32_t warningCount = 0;
-    scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
+    rtc::scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
     while (fread(video_buffer.get(), 1, frame_length_, source_file_) ==
            frame_length_)
     {
diff --git a/webrtc/modules/video_processing/main/test/unit_test/color_enhancement_test.cc b/webrtc/modules/video_processing/main/test/unit_test/color_enhancement_test.cc
index c1cd462..80f230d 100644
--- a/webrtc/modules/video_processing/main/test/unit_test/color_enhancement_test.cc
+++ b/webrtc/modules/video_processing/main/test/unit_test/color_enhancement_test.cc
@@ -39,7 +39,7 @@
     ASSERT_TRUE(modFile != NULL) << "Could not open output file.\n";
 
     uint32_t frameNum = 0;
-    scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
+    rtc::scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
     while (fread(video_buffer.get(), 1, frame_length_, source_file_) ==
         frame_length_)
     {
@@ -86,7 +86,7 @@
                                    width_, half_width_, half_width_);
 
     // Compare frame-by-frame.
-    scoped_ptr<uint8_t[]> ref_buffer(new uint8_t[frame_length_]);
+    rtc::scoped_ptr<uint8_t[]> ref_buffer(new uint8_t[frame_length_]);
     while (fread(video_buffer.get(), 1, frame_length_, modFile) ==
         frame_length_)
     {
@@ -114,7 +114,7 @@
     // Verify that all color pixels are enhanced, and no luminance values are
     // altered.
 
-    scoped_ptr<uint8_t[]> testFrame(new uint8_t[frame_length_]);
+    rtc::scoped_ptr<uint8_t[]> testFrame(new uint8_t[frame_length_]);
 
     // Use value 128 as probe value, since we know that this will be changed
     // in the enhancement.
diff --git a/webrtc/modules/video_processing/main/test/unit_test/content_metrics_test.cc b/webrtc/modules/video_processing/main/test/unit_test/content_metrics_test.cc
index c0d1ab4..ca71d55 100644
--- a/webrtc/modules/video_processing/main/test/unit_test/content_metrics_test.cc
+++ b/webrtc/modules/video_processing/main/test/unit_test/content_metrics_test.cc
@@ -23,7 +23,7 @@
   ca__c.Initialize(width_,height_);
   ca__sse.Initialize(width_,height_);
 
-  scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
+  rtc::scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
   while (fread(video_buffer.get(), 1, frame_length_, source_file_)
        == frame_length_) {
     // Using ConvertToI420 to add stride to the image.
diff --git a/webrtc/modules/video_processing/main/test/unit_test/deflickering_test.cc b/webrtc/modules/video_processing/main/test/unit_test/deflickering_test.cc
index 1bf53fc..01e98d1 100644
--- a/webrtc/modules/video_processing/main/test/unit_test/deflickering_test.cc
+++ b/webrtc/modules/video_processing/main/test/unit_test/deflickering_test.cc
@@ -43,7 +43,7 @@
         "Could not open output file: " << output_file << "\n";
 
     printf("\nRun time [us / frame]:\n");
-    scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
+    rtc::scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
     for (uint32_t run_idx = 0; run_idx < NumRuns; run_idx++)
     {
         TickTime t0;
diff --git a/webrtc/modules/video_processing/main/test/unit_test/video_processing_unittest.cc b/webrtc/modules/video_processing/main/test/unit_test/video_processing_unittest.cc
index dcf1842..6c77911 100644
--- a/webrtc/modules/video_processing/main/test/unit_test/video_processing_unittest.cc
+++ b/webrtc/modules/video_processing/main/test/unit_test/video_processing_unittest.cc
@@ -103,7 +103,7 @@
 
 TEST_F(VideoProcessingModuleTest, HandleBadStats) {
   VideoProcessingModule::FrameStats stats;
-  scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
+  rtc::scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
   ASSERT_EQ(frame_length_, fread(video_buffer.get(), 1, frame_length_,
                                  source_file_));
   EXPECT_EQ(0, ConvertToI420(kI420, video_buffer.get(), 0, 0,
@@ -140,7 +140,7 @@
   I420VideoFrame video_frame2;
   VideoProcessingModule::FrameStats stats;
   // Only testing non-static functions here.
-  scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
+  rtc::scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
   ASSERT_EQ(frame_length_, fread(video_buffer.get(), 1, frame_length_,
                                 source_file_));
   EXPECT_EQ(0, ConvertToI420(kI420, video_buffer.get(), 0, 0,
@@ -170,7 +170,7 @@
 
 TEST_F(VideoProcessingModuleTest, FrameStats) {
   VideoProcessingModule::FrameStats stats;
-  scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
+  rtc::scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
   ASSERT_EQ(frame_length_, fread(video_buffer.get(), 1, frame_length_,
                                  source_file_));
   EXPECT_EQ(0, ConvertToI420(kI420, video_buffer.get(), 0, 0,
@@ -230,7 +230,7 @@
   vpm_->EnableTemporalDecimation(false);
 
   // Reading test frame
-  scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
+  rtc::scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
   ASSERT_EQ(frame_length_, fread(video_buffer.get(), 1, frame_length_,
                                  source_file_));
   // Using ConvertToI420 to add stride to the image.
diff --git a/webrtc/modules/video_render/ios/video_render_ios_gles20.h b/webrtc/modules/video_render/ios/video_render_ios_gles20.h
index c4d87f0..9df1624 100644
--- a/webrtc/modules/video_render/ios/video_render_ios_gles20.h
+++ b/webrtc/modules/video_render/ios/video_render_ios_gles20.h
@@ -14,9 +14,9 @@
 #include <list>
 #include <map>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/video_render/ios/video_render_ios_channel.h"
 #include "webrtc/modules/video_render/ios/video_render_ios_view.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -62,7 +62,7 @@
   int SwapAndDisplayBuffers();
 
  private:
-  scoped_ptr<CriticalSectionWrapper> gles_crit_sec_;
+  rtc::scoped_ptr<CriticalSectionWrapper> gles_crit_sec_;
   EventWrapper* screen_update_event_;
   ThreadWrapper* screen_update_thread_;
 
diff --git a/webrtc/modules/video_render/ios/video_render_ios_impl.h b/webrtc/modules/video_render/ios/video_render_ios_impl.h
index fdcfe34..7e3029c 100644
--- a/webrtc/modules/video_render/ios/video_render_ios_impl.h
+++ b/webrtc/modules/video_render/ios/video_render_ios_impl.h
@@ -98,7 +98,7 @@
   bool full_screen_;
 
   CriticalSectionWrapper* crit_sec_;
-  webrtc::scoped_ptr<VideoRenderIosGles20> ptr_ios_render_;
+  rtc::scoped_ptr<VideoRenderIosGles20> ptr_ios_render_;
 };
 }  // namespace webrtc
 #endif  // WEBRTC_MODULES_VIDEO_RENDER_IOS_VIDEO_RENDER_IOS_IMPL_H_
diff --git a/webrtc/modules/video_render/ios/video_render_ios_view.mm b/webrtc/modules/video_render/ios/video_render_ios_view.mm
index 2e00e09..6c1ae31 100644
--- a/webrtc/modules/video_render/ios/video_render_ios_view.mm
+++ b/webrtc/modules/video_render/ios/video_render_ios_view.mm
@@ -19,7 +19,7 @@
 
 @implementation VideoRenderIosView {
   EAGLContext* _context;
-  webrtc::scoped_ptr<webrtc::OpenGles20> _gles_renderer20;
+  rtc::scoped_ptr<webrtc::OpenGles20> _gles_renderer20;
   int _frameBufferWidth;
   int _frameBufferHeight;
   unsigned int _defaultFrameBuffer;
diff --git a/webrtc/system_wrappers/interface/clock.h b/webrtc/system_wrappers/interface/clock.h
index ed65006..4da3203 100644
--- a/webrtc/system_wrappers/interface/clock.h
+++ b/webrtc/system_wrappers/interface/clock.h
@@ -11,8 +11,8 @@
 #ifndef WEBRTC_SYSTEM_WRAPPERS_INTERFACE_CLOCK_H_
 #define WEBRTC_SYSTEM_WRAPPERS_INTERFACE_CLOCK_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/rw_lock_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -77,7 +77,7 @@
 
  private:
   int64_t time_us_;
-  scoped_ptr<RWLockWrapper> lock_;
+  rtc::scoped_ptr<RWLockWrapper> lock_;
 };
 
 };  // namespace webrtc
diff --git a/webrtc/system_wrappers/interface/data_log_impl.h b/webrtc/system_wrappers/interface/data_log_impl.h
index 0e5feef..e5ec6e5 100644
--- a/webrtc/system_wrappers/interface/data_log_impl.h
+++ b/webrtc/system_wrappers/interface/data_log_impl.h
@@ -22,7 +22,7 @@
 #include <string>
 #include <vector>
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -139,7 +139,7 @@
 
   // Collection of tables indexed by the table name as std::string.
   typedef std::map<std::string, LogTable*> TableMap;
-  typedef webrtc::scoped_ptr<CriticalSectionWrapper> CritSectScopedPtr;
+  typedef rtc::scoped_ptr<CriticalSectionWrapper> CritSectScopedPtr;
 
   static CritSectScopedPtr  crit_sect_;
   static DataLogImpl*       instance_;
diff --git a/webrtc/system_wrappers/interface/utf_util_win.h b/webrtc/system_wrappers/interface/utf_util_win.h
index f88f079..cc48fd2 100644
--- a/webrtc/system_wrappers/interface/utf_util_win.h
+++ b/webrtc/system_wrappers/interface/utf_util_win.h
@@ -17,14 +17,14 @@
 #include <windows.h>
 #include <string>
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
 
 inline std::wstring ToUtf16(const char* utf8, size_t len) {
   int len16 = ::MultiByteToWideChar(CP_UTF8, 0, utf8, static_cast<int>(len),
                                     NULL, 0);
-  scoped_ptr<wchar_t[]> ws(new wchar_t[len16]);
+  rtc::scoped_ptr<wchar_t[]> ws(new wchar_t[len16]);
   ::MultiByteToWideChar(CP_UTF8, 0, utf8, static_cast<int>(len), ws.get(),
                         len16);
   return std::wstring(ws.get(), len16);
@@ -37,7 +37,7 @@
 inline std::string ToUtf8(const wchar_t* wide, size_t len) {
   int len8 = ::WideCharToMultiByte(CP_UTF8, 0, wide, static_cast<int>(len),
                                    NULL, 0, NULL, NULL);
-  scoped_ptr<char[]> ns(new char[len8]);
+  rtc::scoped_ptr<char[]> ns(new char[len8]);
   ::WideCharToMultiByte(CP_UTF8, 0, wide, static_cast<int>(len), ns.get(), len8,
                         NULL, NULL);
   return std::string(ns.get(), len8);
diff --git a/webrtc/system_wrappers/source/aligned_malloc_unittest.cc b/webrtc/system_wrappers/source/aligned_malloc_unittest.cc
index 0acbf97..57c083b 100644
--- a/webrtc/system_wrappers/source/aligned_malloc_unittest.cc
+++ b/webrtc/system_wrappers/source/aligned_malloc_unittest.cc
@@ -17,14 +17,14 @@
 #endif
 
 #include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
 
 // Returns true if |size| and |alignment| are valid combinations.
 bool CorrectUsage(size_t size, size_t alignment) {
-  scoped_ptr<char, AlignedFreeDeleter> scoped(
+  rtc::scoped_ptr<char, AlignedFreeDeleter> scoped(
       static_cast<char*>(AlignedMalloc(size, alignment)));
   if (scoped.get() == NULL) {
     return false;
@@ -37,7 +37,7 @@
   const size_t size = 100;
   const size_t alignment = 32;
   const size_t left_misalignment = 1;
-  scoped_ptr<char, AlignedFreeDeleter> scoped(
+  rtc::scoped_ptr<char, AlignedFreeDeleter> scoped(
       static_cast<char*>(AlignedMalloc(size, alignment)));
   EXPECT_TRUE(scoped.get() != NULL);
   const uintptr_t aligned_address = reinterpret_cast<uintptr_t> (scoped.get());
diff --git a/webrtc/system_wrappers/source/file_impl.h b/webrtc/system_wrappers/source/file_impl.h
index bed692b..26e9d4d 100644
--- a/webrtc/system_wrappers/source/file_impl.h
+++ b/webrtc/system_wrappers/source/file_impl.h
@@ -13,8 +13,8 @@
 
 #include <stdio.h>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/file_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -53,7 +53,7 @@
   int CloseFileImpl();
   int FlushImpl();
 
-  scoped_ptr<RWLockWrapper> rw_lock_;
+  rtc::scoped_ptr<RWLockWrapper> rw_lock_;
 
   FILE* id_;
   bool managed_file_handle_;
diff --git a/webrtc/system_wrappers/source/logging_unittest.cc b/webrtc/system_wrappers/source/logging_unittest.cc
index 6e45c5c..39bca65 100644
--- a/webrtc/system_wrappers/source/logging_unittest.cc
+++ b/webrtc/system_wrappers/source/logging_unittest.cc
@@ -11,9 +11,9 @@
 #include "webrtc/system_wrappers/interface/logging.h"
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/condition_variable_wrapper.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/sleep.h"
 #include "webrtc/system_wrappers/interface/trace.h"
 
@@ -55,8 +55,8 @@
     ASSERT_EQ(kTraceNone, level_) << "Print() was not called";
   }
 
-  scoped_ptr<CriticalSectionWrapper> crit_;
-  scoped_ptr<ConditionVariableWrapper> cv_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_;
+  rtc::scoped_ptr<ConditionVariableWrapper> cv_;
   TraceLevel level_ GUARDED_BY(crit_);
   std::ostringstream expected_log_ GUARDED_BY(crit_);
 };
diff --git a/webrtc/system_wrappers/source/scoped_vector_unittest.cc b/webrtc/system_wrappers/source/scoped_vector_unittest.cc
index c1b9d01..d1f1a90 100644
--- a/webrtc/system_wrappers/source/scoped_vector_unittest.cc
+++ b/webrtc/system_wrappers/source/scoped_vector_unittest.cc
@@ -12,8 +12,8 @@
 
 #include "webrtc/system_wrappers/interface/scoped_vector.h"
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
 namespace {
@@ -105,7 +105,7 @@
 
  private:
   LifeCycleState life_cycle_state_;
-  scoped_ptr<LifeCycleObject> constructed_life_cycle_object_;
+  rtc::scoped_ptr<LifeCycleObject> constructed_life_cycle_object_;
 
   DISALLOW_COPY_AND_ASSIGN(LifeCycleWatcher);
 };
diff --git a/webrtc/system_wrappers/source/thread_unittest.cc b/webrtc/system_wrappers/source/thread_unittest.cc
index f54d065..a2228e6 100644
--- a/webrtc/system_wrappers/source/thread_unittest.cc
+++ b/webrtc/system_wrappers/source/thread_unittest.cc
@@ -11,7 +11,7 @@
 #include "webrtc/system_wrappers/interface/thread_wrapper.h"
 
 #include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/sleep.h"
 
 namespace webrtc {
diff --git a/webrtc/test/call_test.h b/webrtc/test/call_test.h
index b9a091b..502d613 100644
--- a/webrtc/test/call_test.h
+++ b/webrtc/test/call_test.h
@@ -63,16 +63,16 @@
 
   Clock* const clock_;
 
-  scoped_ptr<Call> sender_call_;
+  rtc::scoped_ptr<Call> sender_call_;
   VideoSendStream::Config send_config_;
   VideoEncoderConfig encoder_config_;
   VideoSendStream* send_stream_;
 
-  scoped_ptr<Call> receiver_call_;
+  rtc::scoped_ptr<Call> receiver_call_;
   std::vector<VideoReceiveStream::Config> receive_configs_;
   std::vector<VideoReceiveStream*> receive_streams_;
 
-  scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer_;
+  rtc::scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer_;
   test::FakeEncoder fake_encoder_;
   ScopedVector<VideoDecoder> allocated_decoders_;
 };
diff --git a/webrtc/test/configurable_frame_size_encoder.h b/webrtc/test/configurable_frame_size_encoder.h
index 17a02aa..24f6be8 100644
--- a/webrtc/test/configurable_frame_size_encoder.h
+++ b/webrtc/test/configurable_frame_size_encoder.h
@@ -13,7 +13,7 @@
 
 #include <vector>
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/video_encoder.h"
 
 namespace webrtc {
@@ -53,7 +53,7 @@
   EncodedImageCallback* callback_;
   const size_t max_frame_size_;
   size_t current_frame_size_;
-  scoped_ptr<uint8_t[]> buffer_;
+  rtc::scoped_ptr<uint8_t[]> buffer_;
 };
 
 }  // namespace test
diff --git a/webrtc/test/direct_transport.h b/webrtc/test/direct_transport.h
index c40a8c3..b9fd454 100644
--- a/webrtc/test/direct_transport.h
+++ b/webrtc/test/direct_transport.h
@@ -14,9 +14,9 @@
 
 #include <deque>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/interface/event_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/thread_wrapper.h"
 #include "webrtc/test/fake_network_pipe.h"
 #include "webrtc/transport.h"
@@ -46,9 +46,9 @@
   static bool NetworkProcess(void* transport);
   bool SendPackets();
 
-  scoped_ptr<CriticalSectionWrapper> lock_;
-  scoped_ptr<EventWrapper> packet_event_;
-  scoped_ptr<ThreadWrapper> thread_;
+  rtc::scoped_ptr<CriticalSectionWrapper> lock_;
+  rtc::scoped_ptr<EventWrapper> packet_event_;
+  rtc::scoped_ptr<ThreadWrapper> thread_;
   Clock* const clock_;
 
   bool shutting_down_;
diff --git a/webrtc/test/fake_audio_device.h b/webrtc/test/fake_audio_device.h
index 40a7547..ce5231e 100644
--- a/webrtc/test/fake_audio_device.h
+++ b/webrtc/test/fake_audio_device.h
@@ -12,8 +12,8 @@
 
 #include <string>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_device/include/fake_audio_device.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -57,11 +57,11 @@
   int64_t last_playout_ms_;
 
   Clock* clock_;
-  scoped_ptr<EventWrapper> tick_;
-  scoped_ptr<CriticalSectionWrapper> lock_;
-  scoped_ptr<ThreadWrapper> thread_;
-  scoped_ptr<ModuleFileUtility> file_utility_;
-  scoped_ptr<FileWrapper> input_stream_;
+  rtc::scoped_ptr<EventWrapper> tick_;
+  rtc::scoped_ptr<CriticalSectionWrapper> lock_;
+  rtc::scoped_ptr<ThreadWrapper> thread_;
+  rtc::scoped_ptr<ModuleFileUtility> file_utility_;
+  rtc::scoped_ptr<FileWrapper> input_stream_;
 };
 }  // namespace test
 }  // namespace webrtc
diff --git a/webrtc/test/fake_network_pipe.h b/webrtc/test/fake_network_pipe.h
index 02813da..b3b691c 100644
--- a/webrtc/test/fake_network_pipe.h
+++ b/webrtc/test/fake_network_pipe.h
@@ -14,8 +14,8 @@
 #include <queue>
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/event_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -75,7 +75,7 @@
   size_t sent_packets() { return sent_packets_; }
 
  private:
-  scoped_ptr<CriticalSectionWrapper> lock_;
+  rtc::scoped_ptr<CriticalSectionWrapper> lock_;
   PacketReceiver* packet_receiver_;
   std::queue<NetworkPacket*> capacity_link_;
   std::queue<NetworkPacket*> delay_link_;
diff --git a/webrtc/test/fake_network_pipe_unittest.cc b/webrtc/test/fake_network_pipe_unittest.cc
index b10f297..4e5ec03 100644
--- a/webrtc/test/fake_network_pipe_unittest.cc
+++ b/webrtc/test/fake_network_pipe_unittest.cc
@@ -11,8 +11,8 @@
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/call.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/tick_util.h"
 #include "webrtc/test/fake_network_pipe.h"
 
@@ -49,7 +49,7 @@
   }
 
   void SendPackets(FakeNetworkPipe* pipe, int number_packets, int kPacketSize) {
-    scoped_ptr<uint8_t[]> packet(new uint8_t[kPacketSize]);
+    rtc::scoped_ptr<uint8_t[]> packet(new uint8_t[kPacketSize]);
     for (int i = 0; i < number_packets; ++i) {
       pipe->SendPacket(packet.get(), kPacketSize);
     }
@@ -59,7 +59,7 @@
     return 8 * kPacketSize / capacity_kbps;
   }
 
-  scoped_ptr<MockReceiver> receiver_;
+  rtc::scoped_ptr<MockReceiver> receiver_;
 };
 
 void DeleteMemory(uint8_t* data, int length) { delete [] data; }
@@ -69,7 +69,7 @@
   FakeNetworkPipe::Config config;
   config.queue_length_packets = 20;
   config.link_capacity_kbps = 80;
-  scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
+  rtc::scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
   pipe->SetReceiver(receiver_.get());
 
   // Add 10 packets of 1000 bytes, = 80 kb, and verify it takes one second to
@@ -112,7 +112,7 @@
   config.queue_length_packets = 20;
   config.queue_delay_ms = 100;
   config.link_capacity_kbps = 80;
-  scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
+  rtc::scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
   pipe->SetReceiver(receiver_.get());
 
   const int kNumPackets = 2;
@@ -148,7 +148,7 @@
   FakeNetworkPipe::Config config;
   config.queue_length_packets = 2;
   config.link_capacity_kbps = 80;
-  scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
+  rtc::scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
   pipe->SetReceiver(receiver_.get());
 
   const int kPacketSize = 1000;
@@ -172,7 +172,7 @@
   config.queue_length_packets = 2;
   config.queue_delay_ms = 20;
   config.link_capacity_kbps = 80;
-  scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
+  rtc::scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
   pipe->SetReceiver(receiver_.get());
 
   const int kPacketSize = 1000;
@@ -201,7 +201,7 @@
   FakeNetworkPipe::Config config;
   config.queue_length_packets = 20;
   config.link_capacity_kbps = 80;
-  scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
+  rtc::scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
   pipe->SetReceiver(receiver_.get());
 
   // Add 10 packets of 1000 bytes, = 80 kb, and verify it takes one second to
@@ -259,7 +259,7 @@
   FakeNetworkPipe::Config config;
   config.queue_length_packets = 20;
   config.link_capacity_kbps = 80;
-  scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
+  rtc::scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
   pipe->SetReceiver(receiver_.get());
 
   // Add 10 packets of 1000 bytes, = 80 kb.
diff --git a/webrtc/test/frame_generator.cc b/webrtc/test/frame_generator.cc
index b7eada9..0841c74 100644
--- a/webrtc/test/frame_generator.cc
+++ b/webrtc/test/frame_generator.cc
@@ -118,7 +118,7 @@
   const size_t width_;
   const size_t height_;
   const size_t frame_size_;
-  const scoped_ptr<uint8_t[]> frame_buffer_;
+  const rtc::scoped_ptr<uint8_t[]> frame_buffer_;
   const int frame_display_count_;
   int current_display_count_;
   I420VideoFrame current_frame_;
diff --git a/webrtc/test/frame_generator_capturer.h b/webrtc/test/frame_generator_capturer.h
index de2874e..69b9f5f 100644
--- a/webrtc/test/frame_generator_capturer.h
+++ b/webrtc/test/frame_generator_capturer.h
@@ -12,7 +12,7 @@
 
 #include <string>
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/test/video_capturer.h"
 #include "webrtc/typedefs.h"
 
@@ -60,10 +60,10 @@
   Clock* const clock_;
   bool sending_;
 
-  scoped_ptr<EventWrapper> tick_;
-  scoped_ptr<CriticalSectionWrapper> lock_;
-  scoped_ptr<ThreadWrapper> thread_;
-  scoped_ptr<FrameGenerator> frame_generator_;
+  rtc::scoped_ptr<EventWrapper> tick_;
+  rtc::scoped_ptr<CriticalSectionWrapper> lock_;
+  rtc::scoped_ptr<ThreadWrapper> thread_;
+  rtc::scoped_ptr<FrameGenerator> frame_generator_;
 
   int target_fps_;
 
diff --git a/webrtc/test/rtp_file_reader.cc b/webrtc/test/rtp_file_reader.cc
index 2006bc1..c5d245b 100644
--- a/webrtc/test/rtp_file_reader.cc
+++ b/webrtc/test/rtp_file_reader.cc
@@ -18,8 +18,8 @@
 
 #include "webrtc/base/checks.h"
 #include "webrtc/base/format_macros.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 namespace test {
diff --git a/webrtc/test/rtp_file_reader_unittest.cc b/webrtc/test/rtp_file_reader_unittest.cc
index 713597d..929813f 100644
--- a/webrtc/test/rtp_file_reader_unittest.cc
+++ b/webrtc/test/rtp_file_reader_unittest.cc
@@ -11,8 +11,8 @@
 #include <map>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/rtp_file_reader.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
@@ -43,7 +43,7 @@
   }
 
  private:
-  scoped_ptr<test::RtpFileReader> rtp_packet_source_;
+  rtc::scoped_ptr<test::RtpFileReader> rtp_packet_source_;
   bool headers_only_file_;
 };
 
@@ -93,7 +93,7 @@
   }
 
  private:
-  scoped_ptr<test::RtpFileReader> rtp_packet_source_;
+  rtc::scoped_ptr<test::RtpFileReader> rtp_packet_source_;
 };
 
 TEST_F(TestPcapFileReader, TestEthernetIIFrame) {
diff --git a/webrtc/test/rtp_file_writer_unittest.cc b/webrtc/test/rtp_file_writer_unittest.cc
index 7f390cc..2c7c88c 100644
--- a/webrtc/test/rtp_file_writer_unittest.cc
+++ b/webrtc/test/rtp_file_writer_unittest.cc
@@ -11,7 +11,7 @@
 #include <string.h>
 
 #include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/test/rtp_file_reader.h"
 #include "webrtc/test/rtp_file_writer.h"
 #include "webrtc/test/testsupport/fileutils.h"
@@ -43,7 +43,7 @@
   void VerifyFileContents(int expected_packets) {
     ASSERT_TRUE(rtp_writer_.get() == NULL)
         << "Must call CloseOutputFile before VerifyFileContents";
-    scoped_ptr<test::RtpFileReader> rtp_reader(
+    rtc::scoped_ptr<test::RtpFileReader> rtp_reader(
         test::RtpFileReader::Create(test::RtpFileReader::kRtpDump, filename_));
     ASSERT_TRUE(rtp_reader.get() != NULL);
     test::RtpPacket packet;
@@ -61,7 +61,7 @@
   }
 
  private:
-  scoped_ptr<test::RtpFileWriter> rtp_writer_;
+  rtc::scoped_ptr<test::RtpFileWriter> rtp_writer_;
   std::string filename_;
 };
 
diff --git a/webrtc/test/rtp_rtcp_observer.h b/webrtc/test/rtp_rtcp_observer.h
index 27be17a..37451f4 100644
--- a/webrtc/test/rtp_rtcp_observer.h
+++ b/webrtc/test/rtp_rtcp_observer.h
@@ -169,9 +169,9 @@
   };
 
  protected:
-  const scoped_ptr<CriticalSectionWrapper> crit_;
-  const scoped_ptr<EventWrapper> observation_complete_;
-  const scoped_ptr<RtpHeaderParser> parser_;
+  const rtc::scoped_ptr<CriticalSectionWrapper> crit_;
+  const rtc::scoped_ptr<EventWrapper> observation_complete_;
+  const rtc::scoped_ptr<RtpHeaderParser> parser_;
 
  private:
   PacketTransport send_transport_, receive_transport_;
diff --git a/webrtc/test/test_suite.h b/webrtc/test/test_suite.h
index e28fb23..c166f28 100644
--- a/webrtc/test/test_suite.h
+++ b/webrtc/test/test_suite.h
@@ -18,7 +18,7 @@
 // any gtest based tests that are linked into your executable.
 
 #include "webrtc/base/constructormagic.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
 namespace test {
@@ -41,7 +41,7 @@
   DISALLOW_COPY_AND_ASSIGN(TestSuite);
 
  private:
-  scoped_ptr<TraceToStderr> trace_to_stderr_;
+  rtc::scoped_ptr<TraceToStderr> trace_to_stderr_;
 };
 
 }  // namespace test
diff --git a/webrtc/test/testsupport/fileutils.cc b/webrtc/test/testsupport/fileutils.cc
index 36ca391..8301e77 100644
--- a/webrtc/test/testsupport/fileutils.cc
+++ b/webrtc/test/testsupport/fileutils.cc
@@ -23,7 +23,7 @@
 #else
 #include <unistd.h>
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #define GET_CURRENT_DIR getcwd
 #endif
 
@@ -168,7 +168,7 @@
   return "";
 #else
   int len = dir.size() + prefix.size() + 2 + 6;
-  scoped_ptr<char[]> tempname(new char[len]);
+  rtc::scoped_ptr<char[]> tempname(new char[len]);
 
   snprintf(tempname.get(), len, "%s/%sXXXXXX", dir.c_str(),
            prefix.c_str());
diff --git a/webrtc/test/testsupport/metrics/video_metrics.cc b/webrtc/test/testsupport/metrics/video_metrics.cc
index 1e19806..145d558 100644
--- a/webrtc/test/testsupport/metrics/video_metrics.cc
+++ b/webrtc/test/testsupport/metrics/video_metrics.cc
@@ -111,8 +111,8 @@
   const size_t frame_length = 3 * width * height >> 1;
   I420VideoFrame ref_frame;
   I420VideoFrame test_frame;
-  scoped_ptr<uint8_t[]> ref_buffer(new uint8_t[frame_length]);
-  scoped_ptr<uint8_t[]> test_buffer(new uint8_t[frame_length]);
+  rtc::scoped_ptr<uint8_t[]> ref_buffer(new uint8_t[frame_length]);
+  rtc::scoped_ptr<uint8_t[]> test_buffer(new uint8_t[frame_length]);
 
   // Set decoded image parameters.
   int half_width = (width + 1) / 2;
diff --git a/webrtc/tools/agc/activity_metric.cc b/webrtc/tools/agc/activity_metric.cc
index 474b553..a51216a 100644
--- a/webrtc/tools/agc/activity_metric.cc
+++ b/webrtc/tools/agc/activity_metric.cc
@@ -154,10 +154,10 @@
   int video_index_;
   double activity_threshold_;
   double video_vad_[kMaxNumFrames];
-  scoped_ptr<Histogram> audio_content_;
-  scoped_ptr<AgcAudioProc> audio_processing_;
-  scoped_ptr<PitchBasedVad> vad_;
-  scoped_ptr<StandaloneVad> standalone_vad_;
+  rtc::scoped_ptr<Histogram> audio_content_;
+  rtc::scoped_ptr<AgcAudioProc> audio_processing_;
+  rtc::scoped_ptr<PitchBasedVad> vad_;
+  rtc::scoped_ptr<StandaloneVad> standalone_vad_;
 
   FILE* audio_content_fid_;
 };
diff --git a/webrtc/tools/agc/agc_harness.cc b/webrtc/tools/agc/agc_harness.cc
index 02d0f65..ae8d942 100644
--- a/webrtc/tools/agc/agc_harness.cc
+++ b/webrtc/tools/agc/agc_harness.cc
@@ -12,7 +12,7 @@
 
 #include "gflags/gflags.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/sleep.h"
 #include "webrtc/system_wrappers/interface/trace.h"
 #include "webrtc/test/channel_transport/include/channel_transport.h"
@@ -217,16 +217,13 @@
   int channel_;
   int capture_idx_;
   int render_idx_;
-  scoped_ptr<test::VoiceChannelTransport> channel_transport_;
+  rtc::scoped_ptr<test::VoiceChannelTransport> channel_transport_;
 };
 
 void RunHarness() {
-  scoped_ptr<AgcVoiceEngine> voe1(new AgcVoiceEngine(FLAGS_internal,
-                                                     2000,
-                                                     2000,
-                                                     FLAGS_capture1,
-                                                     FLAGS_render1));
-  scoped_ptr<AgcVoiceEngine> voe2;
+  rtc::scoped_ptr<AgcVoiceEngine> voe1(new AgcVoiceEngine(
+      FLAGS_internal, 2000, 2000, FLAGS_capture1, FLAGS_render1));
+  rtc::scoped_ptr<AgcVoiceEngine> voe2;
   if (FLAGS_parallel) {
     voe2.reset(new AgcVoiceEngine(!FLAGS_internal, 3000, 3000, FLAGS_capture2,
                                   FLAGS_render2));
diff --git a/webrtc/tools/agc/agc_manager.h b/webrtc/tools/agc/agc_manager.h
index 6b3e91d..4f79f10 100644
--- a/webrtc/tools/agc/agc_manager.h
+++ b/webrtc/tools/agc/agc_manager.h
@@ -11,8 +11,8 @@
 #ifndef WEBRTC_TOOLS_AGC_AGC_MANAGER_H_
 #define WEBRTC_TOOLS_AGC_AGC_MANAGER_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_processing/agc/agc_manager_direct.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -66,12 +66,12 @@
   int CheckVolumeAndReset();
 
   VoEExternalMedia* media_;
-  scoped_ptr<VolumeCallbacks> volume_callbacks_;
-  scoped_ptr<CriticalSectionWrapper> crit_;
-  scoped_ptr<AudioProcessing> audioproc_;
-  scoped_ptr<AgcManagerDirect> direct_;
-  scoped_ptr<MediaCallback> media_callback_;
-  scoped_ptr<PreprocCallback> preproc_callback_;
+  rtc::scoped_ptr<VolumeCallbacks> volume_callbacks_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_;
+  rtc::scoped_ptr<AudioProcessing> audioproc_;
+  rtc::scoped_ptr<AgcManagerDirect> direct_;
+  rtc::scoped_ptr<MediaCallback> media_callback_;
+  rtc::scoped_ptr<PreprocCallback> preproc_callback_;
   bool enabled_;
   bool initialized_;
 };
diff --git a/webrtc/tools/agc/agc_manager_integrationtest.cc b/webrtc/tools/agc/agc_manager_integrationtest.cc
index d4b3632..4179e8c 100644
--- a/webrtc/tools/agc/agc_manager_integrationtest.cc
+++ b/webrtc/tools/agc/agc_manager_integrationtest.cc
@@ -12,9 +12,9 @@
 
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_processing/agc/mock_agc.h"
 #include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/sleep.h"
 #include "webrtc/test/channel_transport/include/channel_transport.h"
 #include "webrtc/test/testsupport/gtest_disable.h"
@@ -72,7 +72,7 @@
   VoiceEngine* voe_;
   VoEBase* base_;
   MockAgc* agc_;
-  scoped_ptr<test::VoiceChannelTransport> channel_transport_;
+  rtc::scoped_ptr<test::VoiceChannelTransport> channel_transport_;
   // We use a pointer for the manager, so we can tear it down and test
   // base_->Release() in the destructor.
   AgcManager* manager_;
diff --git a/webrtc/tools/e2e_quality/audio/audio_e2e_harness.cc b/webrtc/tools/e2e_quality/audio/audio_e2e_harness.cc
index 39e9974..1eb8925 100644
--- a/webrtc/tools/e2e_quality/audio/audio_e2e_harness.cc
+++ b/webrtc/tools/e2e_quality/audio/audio_e2e_harness.cc
@@ -15,7 +15,7 @@
 #include "gflags/gflags.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/test/channel_transport/include/channel_transport.h"
 #include "webrtc/voice_engine/include/voe_audio_processing.h"
 #include "webrtc/voice_engine/include/voe_base.h"
@@ -48,7 +48,7 @@
   int channel = base->CreateChannel();
   ASSERT_NE(-1, channel);
 
-  scoped_ptr<VoiceChannelTransport> voice_channel_transport(
+  rtc::scoped_ptr<VoiceChannelTransport> voice_channel_transport(
       new VoiceChannelTransport(network, channel));
 
   ASSERT_EQ(0, voice_channel_transport->SetSendDestination("127.0.0.1", 1234));
diff --git a/webrtc/tools/force_mic_volume_max/force_mic_volume_max.cc b/webrtc/tools/force_mic_volume_max/force_mic_volume_max.cc
index 11fb18a..570fa0a 100644
--- a/webrtc/tools/force_mic_volume_max/force_mic_volume_max.cc
+++ b/webrtc/tools/force_mic_volume_max/force_mic_volume_max.cc
@@ -12,7 +12,7 @@
 
 #include <stdio.h>
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/test/channel_transport/include/channel_transport.h"
 #include "webrtc/voice_engine/include/voe_audio_processing.h"
 #include "webrtc/voice_engine/include/voe_base.h"
diff --git a/webrtc/tools/frame_editing/frame_editing_lib.cc b/webrtc/tools/frame_editing/frame_editing_lib.cc
index 78c88cb..79c6033 100644
--- a/webrtc/tools/frame_editing/frame_editing_lib.cc
+++ b/webrtc/tools/frame_editing/frame_editing_lib.cc
@@ -13,8 +13,8 @@
 
 #include <string>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 using std::string;
@@ -38,7 +38,7 @@
   // Frame size of I420.
   size_t frame_length = CalcBufferSize(kI420, width, height);
 
-  webrtc::scoped_ptr<uint8_t[]> temp_buffer(new uint8_t[frame_length]);
+  rtc::scoped_ptr<uint8_t[]> temp_buffer(new uint8_t[frame_length]);
 
   FILE* out_fid = fopen(out_path.c_str(), "wb");
 
diff --git a/webrtc/tools/frame_editing/frame_editing_unittest.cc b/webrtc/tools/frame_editing/frame_editing_unittest.cc
index 62ab740..31991b7 100644
--- a/webrtc/tools/frame_editing/frame_editing_unittest.cc
+++ b/webrtc/tools/frame_editing/frame_editing_unittest.cc
@@ -14,8 +14,8 @@
 #include <fstream>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/tools/frame_editing/frame_editing_lib.h"
 
@@ -54,9 +54,10 @@
     remove(test_video_.c_str());
   }
   // Compares the frames in both streams to the end of one of the streams.
-  void CompareToTheEnd(FILE* test_video_fid, FILE* ref_video_fid,
-                       scoped_ptr<int[]>* ref_buffer,
-                       scoped_ptr<int[]>* test_buffer) {
+  void CompareToTheEnd(FILE* test_video_fid,
+                       FILE* ref_video_fid,
+                       rtc::scoped_ptr<int[]>* ref_buffer,
+                       rtc::scoped_ptr<int[]>* test_buffer) {
     while (!feof(test_video_fid) && !feof(ref_video_fid)) {
       num_bytes_read_ = fread(ref_buffer->get(), 1, kFrameSize, ref_video_fid);
       if (!feof(ref_video_fid)) {
@@ -80,8 +81,8 @@
   FILE* original_fid_;
   FILE* edited_fid_;
   size_t num_bytes_read_;
-  scoped_ptr<int[]> original_buffer_;
-  scoped_ptr<int[]> edited_buffer_;
+  rtc::scoped_ptr<int[]> original_buffer_;
+  rtc::scoped_ptr<int[]> edited_buffer_;
   int num_frames_read_;
 };
 
diff --git a/webrtc/video/bitrate_estimator_tests.cc b/webrtc/video/bitrate_estimator_tests.cc
index 29fb730..872ee4a 100644
--- a/webrtc/video/bitrate_estimator_tests.cc
+++ b/webrtc/video/bitrate_estimator_tests.cc
@@ -13,11 +13,11 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/call.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/interface/event_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/trace.h"
 #include "webrtc/test/call_test.h"
 #include "webrtc/test/direct_transport.h"
@@ -103,10 +103,10 @@
 
    private:
     typedef std::list<std::string> Strings;
-    const scoped_ptr<CriticalSectionWrapper> crit_sect_;
+    const rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
     Strings received_log_lines_ GUARDED_BY(crit_sect_);
     Strings expected_log_lines_ GUARDED_BY(crit_sect_);
-    scoped_ptr<EventWrapper> done_;
+    rtc::scoped_ptr<EventWrapper> done_;
   };
 
   Callback callback_;
@@ -238,7 +238,7 @@
     bool is_sending_receiving_;
     VideoSendStream* send_stream_;
     VideoReceiveStream* receive_stream_;
-    scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer_;
+    rtc::scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer_;
     test::FakeEncoder fake_encoder_;
     test::FakeDecoder fake_decoder_;
   };
@@ -246,8 +246,8 @@
   TraceObserver receiver_trace_;
   test::DirectTransport send_transport_;
   test::DirectTransport receive_transport_;
-  scoped_ptr<Call> sender_call_;
-  scoped_ptr<Call> receiver_call_;
+  rtc::scoped_ptr<Call> sender_call_;
+  rtc::scoped_ptr<Call> receiver_call_;
   VideoReceiveStream::Config receive_config_;
   std::vector<Stream*> streams_;
 };
diff --git a/webrtc/video/call.cc b/webrtc/video/call.cc
index 15ca45b..984f529 100644
--- a/webrtc/video/call.cc
+++ b/webrtc/video/call.cc
@@ -14,6 +14,7 @@
 #include <map>
 #include <vector>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/call.h"
 #include "webrtc/common.h"
@@ -26,7 +27,6 @@
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/interface/logging.h"
 #include "webrtc/system_wrappers/interface/rw_lock_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/trace.h"
 #include "webrtc/system_wrappers/interface/trace_event.h"
 #include "webrtc/video/video_receive_stream.h"
@@ -94,7 +94,7 @@
   }
 
  private:
-  const scoped_ptr<CriticalSectionWrapper> crit_;
+  const rtc::scoped_ptr<CriticalSectionWrapper> crit_;
   LoadObserver* overuse_callback_ GUARDED_BY(crit_);
 };
 
@@ -136,17 +136,17 @@
   // Needs to be held while write-locking |receive_crit_| or |send_crit_|. This
   // ensures that we have a consistent network state signalled to all senders
   // and receivers.
-  scoped_ptr<CriticalSectionWrapper> network_enabled_crit_;
+  rtc::scoped_ptr<CriticalSectionWrapper> network_enabled_crit_;
   bool network_enabled_ GUARDED_BY(network_enabled_crit_);
 
-  scoped_ptr<RWLockWrapper> receive_crit_;
+  rtc::scoped_ptr<RWLockWrapper> receive_crit_;
   std::map<uint32_t, VideoReceiveStream*> receive_ssrcs_
       GUARDED_BY(receive_crit_);
 
-  scoped_ptr<RWLockWrapper> send_crit_;
+  rtc::scoped_ptr<RWLockWrapper> send_crit_;
   std::map<uint32_t, VideoSendStream*> send_ssrcs_ GUARDED_BY(send_crit_);
 
-  scoped_ptr<CpuOveruseObserverProxy> overuse_observer_proxy_;
+  rtc::scoped_ptr<CpuOveruseObserverProxy> overuse_observer_proxy_;
 
   VideoSendStream::RtpStateMap suspended_send_ssrcs_;
 
@@ -157,7 +157,7 @@
   ViEBase* base_;
   int base_channel_id_;
 
-  scoped_ptr<VideoRender> external_render_;
+  rtc::scoped_ptr<VideoRender> external_render_;
 
   DISALLOW_COPY_AND_ASSIGN(Call);
 };
diff --git a/webrtc/video/call_perf_tests.cc b/webrtc/video/call_perf_tests.cc
index 866b782..9edd55d 100644
--- a/webrtc/video/call_perf_tests.cc
+++ b/webrtc/video/call_perf_tests.cc
@@ -15,6 +15,7 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/call.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
@@ -22,7 +23,6 @@
 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/interface/rtp_to_ntp.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/call_test.h"
 #include "webrtc/test/direct_transport.h"
 #include "webrtc/test/encoder_settings.h"
@@ -115,7 +115,7 @@
     ntp_rtp_pairs_.push_front(ntp_rtp_pair);
   }
 
-  const scoped_ptr<CriticalSectionWrapper> crit_;
+  const rtc::scoped_ptr<CriticalSectionWrapper> crit_;
   RtcpList ntp_rtp_pairs_ GUARDED_BY(crit_);
 };
 
@@ -213,7 +213,7 @@
    private:
     int channel_;
     VoENetwork* voe_network_;
-    scoped_ptr<RtpHeaderParser> parser_;
+    rtc::scoped_ptr<RtpHeaderParser> parser_;
   };
 
   VoiceEngine* voice_engine = VoiceEngine::Create();
@@ -678,7 +678,7 @@
     }
 
    private:
-    scoped_ptr<webrtc::EventWrapper> time_to_reconfigure_;
+    rtc::scoped_ptr<webrtc::EventWrapper> time_to_reconfigure_;
     int encoder_inits_;
     uint32_t last_set_bitrate_;
     VideoSendStream* send_stream_;
diff --git a/webrtc/video/end_to_end_tests.cc b/webrtc/video/end_to_end_tests.cc
index fe2a690..c054645 100644
--- a/webrtc/video/end_to_end_tests.cc
+++ b/webrtc/video/end_to_end_tests.cc
@@ -16,6 +16,7 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/call.h"
 #include "webrtc/frame_callback.h"
 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h"
@@ -24,7 +25,6 @@
 #include "webrtc/modules/video_coding/main/interface/video_coding_defines.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/interface/event_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/sleep.h"
 #include "webrtc/test/call_test.h"
 #include "webrtc/test/direct_transport.h"
@@ -130,7 +130,7 @@
 
     EventTypeWrapper Wait() { return event_->Wait(kDefaultTimeoutMs); }
 
-    scoped_ptr<EventWrapper> event_;
+    rtc::scoped_ptr<EventWrapper> event_;
   } renderer;
 
   class TestFrameCallback : public I420FrameCallback {
@@ -145,7 +145,7 @@
       event_->Set();
     }
 
-    scoped_ptr<EventWrapper> event_;
+    rtc::scoped_ptr<EventWrapper> event_;
   };
 
   test::DirectTransport sender_transport, receiver_transport;
@@ -168,7 +168,7 @@
 
   // Create frames that are smaller than the send width/height, this is done to
   // check that the callbacks are done after processing video.
-  scoped_ptr<test::FrameGenerator> frame_generator(
+  rtc::scoped_ptr<test::FrameGenerator> frame_generator(
       test::FrameGenerator::CreateChromaGenerator(kWidth, kHeight));
   send_stream_->Input()->SwapFrame(frame_generator->NextFrame());
   EXPECT_EQ(kEventSignaled, pre_render_callback.Wait())
@@ -197,7 +197,7 @@
 
     EventTypeWrapper Wait() { return event_->Wait(kDefaultTimeoutMs); }
 
-    scoped_ptr<EventWrapper> event_;
+    rtc::scoped_ptr<EventWrapper> event_;
   } renderer;
 
   test::DirectTransport sender_transport, receiver_transport;
@@ -215,7 +215,7 @@
   CreateStreams();
   Start();
 
-  scoped_ptr<test::FrameGenerator> frame_generator(
+  rtc::scoped_ptr<test::FrameGenerator> frame_generator(
       test::FrameGenerator::CreateChromaGenerator(
           encoder_config_.streams[0].width, encoder_config_.streams[0].height));
   send_stream_->Input()->SwapFrame(frame_generator->NextFrame());
@@ -275,8 +275,8 @@
     virtual bool IsTextureSupported() const override { return false; }
 
    private:
-    scoped_ptr<webrtc::VideoEncoder> encoder_;
-    scoped_ptr<webrtc::VideoDecoder> decoder_;
+    rtc::scoped_ptr<webrtc::VideoEncoder> encoder_;
+    rtc::scoped_ptr<webrtc::VideoDecoder> decoder_;
     int frame_counter_;
   } test;
 
@@ -443,7 +443,7 @@
              "rendered.";
     }
 
-    scoped_ptr<RtpHeaderParser> rtp_parser_;
+    rtc::scoped_ptr<RtpHeaderParser> rtp_parser_;
     std::set<uint16_t> dropped_packets_;
     std::set<uint16_t> retransmitted_packets_;
     uint64_t sent_rtp_packets_;
@@ -774,7 +774,7 @@
     virtual bool IsTextureSupported() const override { return false; }
 
     EventTypeWrapper Wait() { return event_->Wait(kDefaultTimeoutMs); }
-    scoped_ptr<EventWrapper> event_;
+    rtc::scoped_ptr<EventWrapper> event_;
   } renderer;
 
   class TestFrameCallback : public I420FrameCallback {
@@ -805,7 +805,7 @@
       event_->Set();
     }
 
-    scoped_ptr<EventWrapper> event_;
+    rtc::scoped_ptr<EventWrapper> event_;
     int expected_luma_byte_;
     int next_luma_byte_;
   };
@@ -822,7 +822,7 @@
   receiver_transport.SetReceiver(sender_call_->Receiver());
 
   CreateSendConfig(1);
-  scoped_ptr<VideoEncoder> encoder(
+  rtc::scoped_ptr<VideoEncoder> encoder(
       VideoEncoder::Create(VideoEncoder::kVp8));
   send_config_.encoder_settings.encoder = encoder.get();
   send_config_.encoder_settings.payload_name = "VP8";
@@ -840,7 +840,7 @@
 
   // Create frames that are smaller than the send width/height, this is done to
   // check that the callbacks are done after processing video.
-  scoped_ptr<test::FrameGenerator> frame_generator(
+  rtc::scoped_ptr<test::FrameGenerator> frame_generator(
       test::FrameGenerator::CreateChromaGenerator(kWidth / 2, kHeight / 2));
   send_stream_->Input()->SwapFrame(frame_generator->NextFrame());
 
@@ -981,7 +981,7 @@
     }
 
     PacketReceiver* receiver_;
-    scoped_ptr<EventWrapper> delivered_packet_;
+    rtc::scoped_ptr<EventWrapper> delivered_packet_;
   };
 
   test::DirectTransport send_transport, receive_transport;
@@ -1134,7 +1134,7 @@
     test::FrameGeneratorCapturer** capturer_;
     int width_;
     int height_;
-    scoped_ptr<EventWrapper> done_;
+    rtc::scoped_ptr<EventWrapper> done_;
   };
 
   struct {
@@ -1144,8 +1144,9 @@
   } codec_settings[kNumStreams] = {{1, 640, 480}, {2, 320, 240}, {3, 240, 160}};
 
   test::DirectTransport sender_transport, receiver_transport;
-  scoped_ptr<Call> sender_call(Call::Create(Call::Config(&sender_transport)));
-  scoped_ptr<Call> receiver_call(
+  rtc::scoped_ptr<Call> sender_call(
+      Call::Create(Call::Config(&sender_transport)));
+  rtc::scoped_ptr<Call> receiver_call(
       Call::Create(Call::Config(&receiver_transport)));
   sender_transport.SetReceiver(receiver_call->Receiver());
   receiver_transport.SetReceiver(sender_call->Receiver());
@@ -1156,7 +1157,7 @@
   VideoOutputObserver* observers[kNumStreams];
   test::FrameGeneratorCapturer* frame_generators[kNumStreams];
 
-  scoped_ptr<VideoEncoder> encoders[kNumStreams];
+  rtc::scoped_ptr<VideoEncoder> encoders[kNumStreams];
   for (size_t i = 0; i < kNumStreams; ++i)
     encoders[i].reset(VideoEncoder::Create(VideoEncoder::kVp8));
 
@@ -1247,10 +1248,10 @@
     }
 
    private:
-    scoped_ptr<uint8_t[]> buffer_;
+    rtc::scoped_ptr<uint8_t[]> buffer_;
     size_t length_;
     FrameType frame_type_;
-    scoped_ptr<EventWrapper> called_;
+    rtc::scoped_ptr<EventWrapper> called_;
   };
 
   EncodedFrameTestObserver post_encode_observer;
@@ -1272,7 +1273,7 @@
   CreateStreams();
   Start();
 
-  scoped_ptr<test::FrameGenerator> frame_generator(
+  rtc::scoped_ptr<test::FrameGenerator> frame_generator(
       test::FrameGenerator::CreateChromaGenerator(
           encoder_config_.streams[0].width, encoder_config_.streams[0].height));
   send_stream_->Input()->SwapFrame(frame_generator->NextFrame());
@@ -1868,7 +1869,7 @@
     std::set<uint32_t> expected_send_ssrcs_;
     std::string expected_cname_;
 
-    scoped_ptr<EventWrapper> check_stats_event_;
+    rtc::scoped_ptr<EventWrapper> check_stats_event_;
   };
 
   FakeNetworkPipe::Config network_config;
@@ -2094,7 +2095,7 @@
     std::map<uint32_t, uint32_t> last_observed_timestamp_;
     std::map<uint32_t, bool> configured_ssrcs_;
 
-    scoped_ptr<CriticalSectionWrapper> crit_;
+    rtc::scoped_ptr<CriticalSectionWrapper> crit_;
     size_t ssrcs_to_observe_ GUARDED_BY(crit_);
     std::map<uint32_t, bool> ssrc_observed_ GUARDED_BY(crit_);
   } observer(use_rtx);
@@ -2354,9 +2355,9 @@
       }
     }
 
-    const scoped_ptr<CriticalSectionWrapper> test_crit_;
-    const scoped_ptr<EventWrapper> encoded_frames_;
-    const scoped_ptr<EventWrapper> packet_event_;
+    const rtc::scoped_ptr<CriticalSectionWrapper> test_crit_;
+    const rtc::scoped_ptr<EventWrapper> encoded_frames_;
+    const rtc::scoped_ptr<EventWrapper> packet_event_;
     Call* sender_call_;
     Call* receiver_call_;
     Call::NetworkState sender_state_ GUARDED_BY(test_crit_);
@@ -2467,7 +2468,7 @@
 // a backend. This is to test that we hand channels back properly.
 TEST_F(EndToEndTest, CanCreateAndDestroyManyVideoStreams) {
   test::NullTransport transport;
-  scoped_ptr<Call> call(Call::Create(Call::Config(&transport)));
+  rtc::scoped_ptr<Call> call(Call::Create(Call::Config(&transport)));
   test::FakeDecoder fake_decoder;
   test::FakeEncoder fake_encoder(Clock::GetRealTimeClock());
   for (size_t i = 0; i < 100; ++i) {
diff --git a/webrtc/video/full_stack.cc b/webrtc/video/full_stack.cc
index 815c088..d681039 100644
--- a/webrtc/video/full_stack.cc
+++ b/webrtc/video/full_stack.cc
@@ -14,6 +14,7 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/call.h"
 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
@@ -22,7 +23,6 @@
 #include "webrtc/system_wrappers/interface/cpu_info.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/interface/event_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/sleep.h"
 #include "webrtc/test/call_test.h"
 #include "webrtc/test/direct_transport.h"
@@ -133,7 +133,7 @@
 
   virtual DeliveryStatus DeliverPacket(const uint8_t* packet,
                                        size_t length) OVERRIDE {
-    scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
+    rtc::scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
     RTPHeader header;
     parser->Parse(packet, length, &header);
     {
@@ -172,7 +172,7 @@
   }
 
   virtual bool SendRtp(const uint8_t* packet, size_t length) OVERRIDE {
-    scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
+    rtc::scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
     RTPHeader header;
     parser->Parse(packet, length, &header);
 
@@ -453,7 +453,7 @@
   int64_t last_render_time_;
   uint32_t rtp_timestamp_delta_;
 
-  const scoped_ptr<CriticalSectionWrapper> crit_;
+  const rtc::scoped_ptr<CriticalSectionWrapper> crit_;
   std::deque<I420VideoFrame*> frames_ GUARDED_BY(crit_);
   std::deque<I420VideoFrame*> frame_pool_ GUARDED_BY(crit_);
   I420VideoFrame last_rendered_frame_ GUARDED_BY(crit_);
@@ -463,11 +463,11 @@
   const double avg_psnr_threshold_;
   const double avg_ssim_threshold_;
 
-  const scoped_ptr<CriticalSectionWrapper> comparison_lock_;
+  const rtc::scoped_ptr<CriticalSectionWrapper> comparison_lock_;
   std::vector<ThreadWrapper*> comparison_thread_pool_;
-  const scoped_ptr<EventWrapper> comparison_available_event_;
+  const rtc::scoped_ptr<EventWrapper> comparison_available_event_;
   std::deque<FrameComparison> comparisons_ GUARDED_BY(comparison_lock_);
-  const scoped_ptr<EventWrapper> done_;
+  const rtc::scoped_ptr<EventWrapper> done_;
 };
 
 void FullStackTest::RunTest(const FullStackTestParams& params) {
@@ -485,7 +485,7 @@
 
   CreateSendConfig(1);
 
-  scoped_ptr<VideoEncoder> encoder(
+  rtc::scoped_ptr<VideoEncoder> encoder(
       VideoEncoder::Create(VideoEncoder::kVp8));
   send_config_.encoder_settings.encoder = encoder.get();
   send_config_.encoder_settings.payload_name = "VP8";
@@ -532,7 +532,7 @@
     slides.push_back(test::ResourcePath("photo_1850_1110", "yuv"));
     slides.push_back(test::ResourcePath("difficult_photo_1850_1110", "yuv"));
 
-    scoped_ptr<test::FrameGenerator> frame_generator(
+    rtc::scoped_ptr<test::FrameGenerator> frame_generator(
         test::FrameGenerator::CreateFromYuvFile(
             slides, 1850, 1110,
             10 * params.clip.fps)  // Cycle image every 10 seconds.
diff --git a/webrtc/video/loopback.cc b/webrtc/video/loopback.cc
index 7c9b611..845a8aa 100644
--- a/webrtc/video/loopback.cc
+++ b/webrtc/video/loopback.cc
@@ -16,10 +16,10 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/call.h"
 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
 #include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/direct_transport.h"
 #include "webrtc/test/encoder_settings.h"
 #include "webrtc/test/fake_encoder.h"
@@ -48,14 +48,16 @@
 }
 
 void Loopback::Run() {
-  scoped_ptr<test::TraceToStderr> trace_to_stderr_;
+  rtc::scoped_ptr<test::TraceToStderr> trace_to_stderr_;
   if (config_.logs)
     trace_to_stderr_.reset(new test::TraceToStderr);
 
-  scoped_ptr<test::VideoRenderer> local_preview(test::VideoRenderer::Create(
-      "Local Preview", config_.width, config_.height));
-  scoped_ptr<test::VideoRenderer> loopback_video(test::VideoRenderer::Create(
-      "Loopback Video", config_.width, config_.height));
+  rtc::scoped_ptr<test::VideoRenderer> local_preview(
+      test::VideoRenderer::Create("Local Preview", config_.width,
+                                  config_.height));
+  rtc::scoped_ptr<test::VideoRenderer> loopback_video(
+      test::VideoRenderer::Create("Loopback Video", config_.width,
+                                  config_.height));
 
   FakeNetworkPipe::Config pipe_config;
   pipe_config.loss_percent = config_.loss_percent;
@@ -72,7 +74,7 @@
       static_cast<int>(config_.start_bitrate_kbps) * 1000;
   call_config.stream_bitrates.max_bitrate_bps =
       static_cast<int>(config_.max_bitrate_kbps) * 1000;
-  scoped_ptr<Call> call(Call::Create(call_config));
+  rtc::scoped_ptr<Call> call(Call::Create(call_config));
 
   // Loopback, call sends to itself.
   transport.SetReceiver(call->Receiver());
@@ -86,7 +88,7 @@
       RtpExtension(RtpExtension::kAbsSendTime, kAbsSendTimeExtensionId));
 
   send_config.local_renderer = local_preview.get();
-  scoped_ptr<VideoEncoder> encoder;
+  rtc::scoped_ptr<VideoEncoder> encoder;
   if (config_.codec == "VP8") {
     encoder.reset(VideoEncoder::Create(VideoEncoder::kVp8));
   } else if (config_.codec == "VP9") {
@@ -105,7 +107,7 @@
   VideoSendStream* send_stream =
       call->CreateVideoSendStream(send_config, encoder_config);
 
-  scoped_ptr<test::VideoCapturer> capturer(CreateCapturer(send_stream));
+  rtc::scoped_ptr<test::VideoCapturer> capturer(CreateCapturer(send_stream));
 
   VideoReceiveStream::Config receive_config;
   receive_config.rtp.remote_ssrc = send_config.rtp.ssrcs[0];
diff --git a/webrtc/video/rampup_tests.cc b/webrtc/video/rampup_tests.cc
index 4b26d05..306f247 100644
--- a/webrtc/video/rampup_tests.cc
+++ b/webrtc/video/rampup_tests.cc
@@ -380,7 +380,7 @@
 
   CreateSendConfig(num_streams);
 
-  scoped_ptr<RemoteBitrateEstimatorFactory> rbe_factory;
+  rtc::scoped_ptr<RemoteBitrateEstimatorFactory> rbe_factory;
   RateControlType control_type;
   if (extension_type == RtpExtension::kAbsSendTime) {
     control_type = kAimdControl;
diff --git a/webrtc/video/rampup_tests.h b/webrtc/video/rampup_tests.h
index e506cd4..3fb9874 100644
--- a/webrtc/video/rampup_tests.h
+++ b/webrtc/video/rampup_tests.h
@@ -15,10 +15,10 @@
 #include <string>
 #include <vector>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/call.h"
 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
 #include "webrtc/system_wrappers/interface/event_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/call_test.h"
 #include "webrtc/video/transport_adapter.h"
 
@@ -65,15 +65,15 @@
   void TriggerTestDone() EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   Clock* const clock_;
-  const scoped_ptr<EventWrapper> test_done_;
-  const scoped_ptr<RtpHeaderParser> rtp_parser_;
-  scoped_ptr<RtpRtcp> rtp_rtcp_;
+  const rtc::scoped_ptr<EventWrapper> test_done_;
+  const rtc::scoped_ptr<RtpHeaderParser> rtp_parser_;
+  rtc::scoped_ptr<RtpRtcp> rtp_rtcp_;
   internal::TransportAdapter feedback_transport_;
-  const scoped_ptr<ReceiveStatistics> receive_stats_;
-  const scoped_ptr<RTPPayloadRegistry> payload_registry_;
-  scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
+  const rtc::scoped_ptr<ReceiveStatistics> receive_stats_;
+  const rtc::scoped_ptr<RTPPayloadRegistry> payload_registry_;
+  rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
 
-  const scoped_ptr<CriticalSectionWrapper> crit_;
+  const rtc::scoped_ptr<CriticalSectionWrapper> crit_;
   unsigned int expected_bitrate_bps_ GUARDED_BY(crit_);
   unsigned int start_bitrate_bps_ GUARDED_BY(crit_);
   SsrcMap rtx_media_ssrcs_ GUARDED_BY(crit_);
@@ -127,14 +127,14 @@
   Clock* const clock_;
   const size_t number_of_streams_;
   const bool rtx_used_;
-  const scoped_ptr<EventWrapper> test_done_;
-  const scoped_ptr<RtpHeaderParser> rtp_parser_;
-  scoped_ptr<RtpRtcp> rtp_rtcp_;
+  const rtc::scoped_ptr<EventWrapper> test_done_;
+  const rtc::scoped_ptr<RtpHeaderParser> rtp_parser_;
+  rtc::scoped_ptr<RtpRtcp> rtp_rtcp_;
   internal::TransportAdapter feedback_transport_;
-  const scoped_ptr<ReceiveStatistics> receive_stats_;
-  scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
+  const rtc::scoped_ptr<ReceiveStatistics> receive_stats_;
+  rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
 
-  scoped_ptr<CriticalSectionWrapper> crit_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_;
   VideoSendStream* send_stream_ GUARDED_BY(crit_);
   FakeNetworkPipe::Config forward_transport_config_ GUARDED_BY(crit_);
   TestStates test_state_ GUARDED_BY(crit_);
diff --git a/webrtc/video/receive_statistics_proxy.h b/webrtc/video/receive_statistics_proxy.h
index 6f57844..dba5042 100644
--- a/webrtc/video/receive_statistics_proxy.h
+++ b/webrtc/video/receive_statistics_proxy.h
@@ -81,7 +81,7 @@
  private:
   Clock* const clock_;
 
-  scoped_ptr<CriticalSectionWrapper> crit_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_;
   VideoReceiveStream::Stats stats_ GUARDED_BY(crit_);
   RateStatistics decode_fps_estimator_ GUARDED_BY(crit_);
   RateStatistics renders_fps_estimator_ GUARDED_BY(crit_);
diff --git a/webrtc/video/replay.cc b/webrtc/video/replay.cc
index abf6e1e..2f0fa01 100644
--- a/webrtc/video/replay.cc
+++ b/webrtc/video/replay.cc
@@ -16,11 +16,11 @@
 #include "gflags/gflags.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/call.h"
 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
 #include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/sleep.h"
 #include "webrtc/test/encoder_settings.h"
 #include "webrtc/test/null_transport.h"
@@ -185,8 +185,8 @@
 };
 
 void RtpReplay() {
-  scoped_ptr<test::VideoRenderer> playback_video(test::VideoRenderer::Create(
-      "Playback Video", 640, 480));
+  rtc::scoped_ptr<test::VideoRenderer> playback_video(
+      test::VideoRenderer::Create("Playback Video", 640, 480));
   FileRenderPassthrough file_passthrough(flags::OutBase(),
                                          playback_video.get());
 
@@ -194,7 +194,7 @@
   //             etc.
   test::NullTransport transport;
   Call::Config call_config(&transport);
-  scoped_ptr<Call> call(Call::Create(call_config));
+  rtc::scoped_ptr<Call> call(Call::Create(call_config));
 
   VideoReceiveStream::Config receive_config;
   receive_config.rtp.remote_ssrc = flags::Ssrc();
@@ -222,7 +222,7 @@
   VideoReceiveStream* receive_stream =
       call->CreateVideoReceiveStream(receive_config);
 
-  scoped_ptr<test::RtpFileReader> rtp_reader(test::RtpFileReader::Create(
+  rtc::scoped_ptr<test::RtpFileReader> rtp_reader(test::RtpFileReader::Create(
       test::RtpFileReader::kRtpDump, flags::InputFile()));
   if (rtp_reader.get() == NULL) {
     rtp_reader.reset(test::RtpFileReader::Create(test::RtpFileReader::kPcap,
@@ -249,7 +249,7 @@
         break;
       case PacketReceiver::DELIVERY_UNKNOWN_SSRC: {
         RTPHeader header;
-        scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
+        rtc::scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
         parser->Parse(packet.data, packet.length, &header);
         if (unknown_packets[header.ssrc] == 0)
           fprintf(stderr, "Unknown SSRC: %u!\n", header.ssrc);
diff --git a/webrtc/video/send_statistics_proxy.h b/webrtc/video/send_statistics_proxy.h
index f33df8d..628a284 100644
--- a/webrtc/video/send_statistics_proxy.h
+++ b/webrtc/video/send_statistics_proxy.h
@@ -13,12 +13,12 @@
 
 #include <string>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/common_types.h"
 #include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
 #include "webrtc/modules/video_coding/main/interface/video_coding_defines.h"
 #include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/video_engine/include/vie_base.h"
 #include "webrtc/video_engine/include/vie_capture.h"
 #include "webrtc/video_engine/include/vie_codec.h"
@@ -108,7 +108,7 @@
 
   Clock* const clock_;
   const VideoSendStream::Config config_;
-  scoped_ptr<CriticalSectionWrapper> crit_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_;
   VideoSendStream::Stats stats_ GUARDED_BY(crit_);
   std::map<uint32_t, StatsUpdateTimes> update_times_ GUARDED_BY(crit_);
 };
diff --git a/webrtc/video/send_statistics_proxy_unittest.cc b/webrtc/video/send_statistics_proxy_unittest.cc
index ffbdc6e..c2ebf5f 100644
--- a/webrtc/video/send_statistics_proxy_unittest.cc
+++ b/webrtc/video/send_statistics_proxy_unittest.cc
@@ -84,7 +84,7 @@
     }
   }
 
-  scoped_ptr<SendStatisticsProxy> statistics_proxy_;
+  rtc::scoped_ptr<SendStatisticsProxy> statistics_proxy_;
   SimulatedClock fake_clock_;
   VideoSendStream::Config config_;
   int avg_delay_ms_;
diff --git a/webrtc/video/video_receive_stream.h b/webrtc/video/video_receive_stream.h
index 83ee53f..9f156b1 100644
--- a/webrtc/video/video_receive_stream.h
+++ b/webrtc/video/video_receive_stream.h
@@ -13,11 +13,11 @@
 
 #include <vector>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/call.h"
 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
 #include "webrtc/modules/video_render/include/video_render_defines.h"
 #include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/video/encoded_frame_callback_adapter.h"
 #include "webrtc/video/receive_statistics_proxy.h"
 #include "webrtc/video/transport_adapter.h"
@@ -90,7 +90,7 @@
   ViERTP_RTCP* rtp_rtcp_;
   ViEImageProcess* image_process_;
 
-  scoped_ptr<ReceiveStatisticsProxy> stats_proxy_;
+  rtc::scoped_ptr<ReceiveStatisticsProxy> stats_proxy_;
 
   int channel_;
 };
diff --git a/webrtc/video/video_send_stream_tests.cc b/webrtc/video/video_send_stream_tests.cc
index e9ae9a7..103afa4 100644
--- a/webrtc/video/video_send_stream_tests.cc
+++ b/webrtc/video/video_send_stream_tests.cc
@@ -11,6 +11,7 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/call.h"
 #include "webrtc/common_video/interface/i420_video_frame.h"
 #include "webrtc/common_video/interface/native_handle.h"
@@ -23,7 +24,6 @@
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/interface/event_wrapper.h"
 #include "webrtc/system_wrappers/interface/ref_count.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/scoped_vector.h"
 #include "webrtc/system_wrappers/interface/sleep.h"
 #include "webrtc/system_wrappers/interface/thread_wrapper.h"
@@ -269,7 +269,7 @@
     RtcpStatistics stats_;
   };
 
-  scoped_ptr<LossyStatistician> lossy_stats_;
+  rtc::scoped_ptr<LossyStatistician> lossy_stats_;
   StatisticianMap stats_map_;
 };
 
@@ -830,7 +830,7 @@
     Clock* const clock_;
     VideoSendStream* stream_;
 
-    const scoped_ptr<CriticalSectionWrapper> crit_;
+    const rtc::scoped_ptr<CriticalSectionWrapper> crit_;
     TestState test_state_ GUARDED_BY(crit_);
     int rtp_count_ GUARDED_BY(crit_);
     int last_sequence_number_ GUARDED_BY(crit_);
@@ -907,7 +907,7 @@
 
     Clock* const clock_;
     internal::TransportAdapter transport_adapter_;
-    const scoped_ptr<CriticalSectionWrapper> crit_;
+    const rtc::scoped_ptr<CriticalSectionWrapper> crit_;
     int64_t last_packet_time_ms_ GUARDED_BY(crit_);
     test::FrameGeneratorCapturer* capturer_ GUARDED_BY(crit_);
   } test;
@@ -999,7 +999,7 @@
           << "Timeout while waiting for low bitrate stats after REMB.";
     }
 
-    scoped_ptr<RtpRtcp> rtp_rtcp_;
+    rtc::scoped_ptr<RtpRtcp> rtp_rtcp_;
     internal::TransportAdapter feedback_transport_;
     VideoSendStream* stream_;
     bool bitrate_capped_;
@@ -1034,7 +1034,7 @@
     ScopedVector<I420VideoFrame> output_frames_;
 
     // Indicate an output frame has arrived.
-    scoped_ptr<EventWrapper> output_frame_event_;
+    rtc::scoped_ptr<EventWrapper> output_frame_event_;
   };
 
   // Initialize send stream.
@@ -1066,7 +1066,7 @@
   send_stream_->Start();
   for (size_t i = 0; i < input_frames.size(); i++) {
     // Make a copy of the input frame because the buffer will be swapped.
-    scoped_ptr<I420VideoFrame> frame(input_frames[i]->CloneFrame());
+    rtc::scoped_ptr<I420VideoFrame> frame(input_frames[i]->CloneFrame());
     send_stream_->Input()->SwapFrame(frame.get());
     // Do not send the next frame too fast, so the frame dropper won't drop it.
     if (i < input_frames.size() - 1)
@@ -1135,7 +1135,7 @@
   I420VideoFrame* frame = new I420VideoFrame();
   const int kSizeY = width * height * 2;
   const int kSizeUV = width * height;
-  scoped_ptr<uint8_t[]> buffer(new uint8_t[kSizeY]);
+  rtc::scoped_ptr<uint8_t[]> buffer(new uint8_t[kSizeY]);
   memset(buffer.get(), data, kSizeY);
   frame->CreateFrame(kSizeY,
                      buffer.get(),
@@ -1264,7 +1264,7 @@
           << "Timed out while waiting for Encode.";
     }
 
-    scoped_ptr<CriticalSectionWrapper> crit_;
+    rtc::scoped_ptr<CriticalSectionWrapper> crit_;
     VideoSendStream* stream_;
     bool initialized_ GUARDED_BY(crit_);
     bool callback_registered_ GUARDED_BY(crit_);
diff --git a/webrtc/video_engine/call_stats.h b/webrtc/video_engine/call_stats.h
index da5c2e6..43e4fc0 100644
--- a/webrtc/video_engine/call_stats.h
+++ b/webrtc/video_engine/call_stats.h
@@ -14,8 +14,8 @@
 #include <list>
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/interface/module.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -58,9 +58,9 @@
 
  private:
   // Protecting all members.
-  scoped_ptr<CriticalSectionWrapper> crit_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_;
   // Observer receiving statistics updates.
-  scoped_ptr<RtcpRttStats> rtcp_rtt_stats_;
+  rtc::scoped_ptr<RtcpRttStats> rtcp_rtt_stats_;
   // The last time 'Process' resulted in statistic update.
   int64_t last_process_time_;
   // The last RTT in the statistics update (zero if there is no valid estimate).
diff --git a/webrtc/video_engine/call_stats_unittest.cc b/webrtc/video_engine/call_stats_unittest.cc
index 9f8f398..0febbd0 100644
--- a/webrtc/video_engine/call_stats_unittest.cc
+++ b/webrtc/video_engine/call_stats_unittest.cc
@@ -11,8 +11,8 @@
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/tick_util.h"
 #include "webrtc/video_engine/call_stats.h"
 
@@ -36,7 +36,7 @@
     TickTime::UseFakeClock(12345);
     call_stats_.reset(new CallStats());
   }
-  scoped_ptr<CallStats> call_stats_;
+  rtc::scoped_ptr<CallStats> call_stats_;
 };
 
 TEST_F(CallStatsTest, AddAndTriggerCallback) {
diff --git a/webrtc/video_engine/encoder_state_feedback.h b/webrtc/video_engine/encoder_state_feedback.h
index a58532c..998793a 100644
--- a/webrtc/video_engine/encoder_state_feedback.h
+++ b/webrtc/video_engine/encoder_state_feedback.h
@@ -17,7 +17,7 @@
 #include <map>
 
 #include "webrtc/base/constructormagic.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -54,10 +54,10 @@
  private:
   typedef std::map<uint32_t,  ViEEncoder*> SsrcEncoderMap;
 
-  scoped_ptr<CriticalSectionWrapper> crit_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_;
 
   // Instance registered at the class requesting new key frames.
-  scoped_ptr<EncoderStateFeedbackObserver> observer_;
+  rtc::scoped_ptr<EncoderStateFeedbackObserver> observer_;
 
   // Maps a unique ssrc to the given encoder.
   SsrcEncoderMap encoders_;
diff --git a/webrtc/video_engine/encoder_state_feedback_unittest.cc b/webrtc/video_engine/encoder_state_feedback_unittest.cc
index c2ddb4d..157c04a 100644
--- a/webrtc/video_engine/encoder_state_feedback_unittest.cc
+++ b/webrtc/video_engine/encoder_state_feedback_unittest.cc
@@ -15,10 +15,10 @@
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
 #include "webrtc/modules/utility/interface/mock/mock_process_thread.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/video_engine/vie_encoder.h"
 
 using ::testing::NiceMock;
@@ -49,8 +49,8 @@
     process_thread_.reset(new NiceMock<MockProcessThread>);
     encoder_state_feedback_.reset(new EncoderStateFeedback());
   }
-  scoped_ptr<MockProcessThread> process_thread_;
-  scoped_ptr<EncoderStateFeedback> encoder_state_feedback_;
+  rtc::scoped_ptr<MockProcessThread> process_thread_;
+  rtc::scoped_ptr<EncoderStateFeedback> encoder_state_feedback_;
 };
 
 TEST_F(VieKeyRequestTest, CreateAndTriggerRequests) {
diff --git a/webrtc/video_engine/overuse_frame_detector.cc b/webrtc/video_engine/overuse_frame_detector.cc
index b4204db..88d5d05 100644
--- a/webrtc/video_engine/overuse_frame_detector.cc
+++ b/webrtc/video_engine/overuse_frame_detector.cc
@@ -135,7 +135,7 @@
  private:
   const float kWeightFactor;
   const float kInitialAvgEncodeTimeMs;
-  scoped_ptr<rtc::ExpFilter> filtered_encode_time_ms_;
+  rtc::scoped_ptr<rtc::ExpFilter> filtered_encode_time_ms_;
 };
 
 // Class for calculating the processing usage on the send-side (the average
@@ -208,8 +208,8 @@
   const float kMaxSampleDiffMs;
   uint64_t count_;
   CpuOveruseOptions options_;
-  scoped_ptr<rtc::ExpFilter> filtered_processing_ms_;
-  scoped_ptr<rtc::ExpFilter> filtered_frame_diff_ms_;
+  rtc::scoped_ptr<rtc::ExpFilter> filtered_processing_ms_;
+  rtc::scoped_ptr<rtc::ExpFilter> filtered_frame_diff_ms_;
 };
 
 // Class for calculating the processing time of frames.
@@ -314,7 +314,7 @@
   const float kWeightFactor;
   std::list<int64_t> frames_;
   int delay_ms_;
-  scoped_ptr<rtc::ExpFilter> filtered_delay_ms_per_s_;
+  rtc::scoped_ptr<rtc::ExpFilter> filtered_delay_ms_per_s_;
 };
 
 OveruseFrameDetector::OveruseFrameDetector(
diff --git a/webrtc/video_engine/overuse_frame_detector.h b/webrtc/video_engine/overuse_frame_detector.h
index 28bac39..92d0ea3 100644
--- a/webrtc/video_engine/overuse_frame_detector.h
+++ b/webrtc/video_engine/overuse_frame_detector.h
@@ -13,11 +13,11 @@
 
 #include "webrtc/base/constructormagic.h"
 #include "webrtc/base/criticalsection.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/exp_filter.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/base/thread_checker.h"
 #include "webrtc/modules/interface/module.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/video_engine/include/vie_base.h"
 
 namespace webrtc {
@@ -45,8 +45,8 @@
   float sum_;
   uint64_t count_;
   CpuOveruseOptions options_;
-  scoped_ptr<rtc::ExpFilter> filtered_samples_;
-  scoped_ptr<rtc::ExpFilter> filtered_variance_;
+  rtc::scoped_ptr<rtc::ExpFilter> filtered_samples_;
+  rtc::scoped_ptr<rtc::ExpFilter> filtered_variance_;
 };
 
 // Use to detect system overuse based on jitter in incoming frames.
@@ -146,13 +146,14 @@
 
   // TODO(asapersson): Can these be regular members (avoid separate heap
   // allocs)?
-  const scoped_ptr<EncodeTimeAvg> encode_time_ GUARDED_BY(crit_);
-  const scoped_ptr<SendProcessingUsage> usage_ GUARDED_BY(crit_);
-  const scoped_ptr<FrameQueue> frame_queue_ GUARDED_BY(crit_);
+  const rtc::scoped_ptr<EncodeTimeAvg> encode_time_ GUARDED_BY(crit_);
+  const rtc::scoped_ptr<SendProcessingUsage> usage_ GUARDED_BY(crit_);
+  const rtc::scoped_ptr<FrameQueue> frame_queue_ GUARDED_BY(crit_);
 
   int64_t last_sample_time_ms_;  // Only accessed by one thread.
 
-  const scoped_ptr<CaptureQueueDelay> capture_queue_delay_ GUARDED_BY(crit_);
+  const rtc::scoped_ptr<CaptureQueueDelay> capture_queue_delay_
+      GUARDED_BY(crit_);
 
   rtc::ThreadChecker processing_thread_;
 
diff --git a/webrtc/video_engine/overuse_frame_detector_unittest.cc b/webrtc/video_engine/overuse_frame_detector_unittest.cc
index d10d81f..d14fe9d 100644
--- a/webrtc/video_engine/overuse_frame_detector_unittest.cc
+++ b/webrtc/video_engine/overuse_frame_detector_unittest.cc
@@ -11,8 +11,8 @@
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/video_engine/include/vie_base.h"
 #include "webrtc/video_engine/overuse_frame_detector.h"
 
@@ -137,9 +137,9 @@
   int UsagePercent() { return metrics_.encode_usage_percent; }
 
   CpuOveruseOptions options_;
-  scoped_ptr<SimulatedClock> clock_;
-  scoped_ptr<MockCpuOveruseObserver> observer_;
-  scoped_ptr<OveruseFrameDetector> overuse_detector_;
+  rtc::scoped_ptr<SimulatedClock> clock_;
+  rtc::scoped_ptr<MockCpuOveruseObserver> observer_;
+  rtc::scoped_ptr<OveruseFrameDetector> overuse_detector_;
   CpuOveruseMetrics metrics_;
 };
 
diff --git a/webrtc/video_engine/payload_router.h b/webrtc/video_engine/payload_router.h
index 35c541d..37b31bf 100644
--- a/webrtc/video_engine/payload_router.h
+++ b/webrtc/video_engine/payload_router.h
@@ -15,10 +15,10 @@
 #include <vector>
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/common_types.h"
 #include "webrtc/system_wrappers/interface/atomic32.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -79,7 +79,7 @@
  private:
   // TODO(mflodman): When the new video API has launched, remove crit_ and
   // assume rtp_modules_ will never change during a call.
-  scoped_ptr<CriticalSectionWrapper> crit_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_;
 
   // Active sending RTP modules, in layer order.
   std::vector<RtpRtcp*> rtp_modules_ GUARDED_BY(crit_.get());
diff --git a/webrtc/video_engine/payload_router_unittest.cc b/webrtc/video_engine/payload_router_unittest.cc
index 1a479d9..5760e68 100644
--- a/webrtc/video_engine/payload_router_unittest.cc
+++ b/webrtc/video_engine/payload_router_unittest.cc
@@ -13,9 +13,9 @@
 
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
 #include "webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/video_engine/payload_router.h"
 
 using ::testing::_;
@@ -30,7 +30,7 @@
   virtual void SetUp() {
     payload_router_.reset(new PayloadRouter());
   }
-  scoped_ptr<PayloadRouter> payload_router_;
+  rtc::scoped_ptr<PayloadRouter> payload_router_;
 };
 
 TEST_F(PayloadRouterTest, SendOnOneModule) {
diff --git a/webrtc/video_engine/test/auto_test/source/vie_autotest_codec.cc b/webrtc/video_engine/test/auto_test/source/vie_autotest_codec.cc
index 8bd579f..6d1027f 100644
--- a/webrtc/video_engine/test/auto_test/source/vie_autotest_codec.cc
+++ b/webrtc/video_engine/test/auto_test/source/vie_autotest_codec.cc
@@ -8,10 +8,10 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
 #include "webrtc/engine_configurations.h"
 #include "webrtc/modules/video_coding/codecs/i420/main/interface/i420.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/channel_transport/include/channel_transport.h"
 #include "webrtc/video_engine/include/vie_base.h"
 #include "webrtc/video_engine/include/vie_capture.h"
@@ -190,9 +190,8 @@
   const char* ip_address = "127.0.0.1";
   const uint16_t rtp_port = 6000;
 
-  webrtc::scoped_ptr<webrtc::test::VideoChannelTransport>
-      video_channel_transport(
-          new webrtc::test::VideoChannelTransport(network, video_channel));
+  rtc::scoped_ptr<webrtc::test::VideoChannelTransport> video_channel_transport(
+      new webrtc::test::VideoChannelTransport(network, video_channel));
 
   ASSERT_EQ(0, video_channel_transport->SetSendDestination(ip_address,
                                                            rtp_port));
@@ -336,7 +335,7 @@
     const char* ip_address = "127.0.0.1";
     const uint16_t rtp_port = 6000;
 
-    webrtc::scoped_ptr<webrtc::test::VideoChannelTransport>
+    rtc::scoped_ptr<webrtc::test::VideoChannelTransport>
         video_channel_transport(
             new webrtc::test::VideoChannelTransport(network, video_channel));
 
@@ -387,7 +386,7 @@
     uint16_t rtp_port_1 = 12000;
     uint16_t rtp_port_2 = 13000;
 
-    webrtc::scoped_ptr<webrtc::test::VideoChannelTransport>
+    rtc::scoped_ptr<webrtc::test::VideoChannelTransport>
         video_channel_transport_1(
             new webrtc::test::VideoChannelTransport(network, video_channel_1));
 
@@ -395,7 +394,7 @@
                                                                rtp_port_1));
     ASSERT_EQ(0, video_channel_transport_1->SetLocalReceiver(rtp_port_1));
 
-    webrtc::scoped_ptr<webrtc::test::VideoChannelTransport>
+    rtc::scoped_ptr<webrtc::test::VideoChannelTransport>
         video_channel_transport_2(
             new webrtc::test::VideoChannelTransport(network, video_channel_2));
 
diff --git a/webrtc/video_engine/test/auto_test/source/vie_autotest_custom_call.cc b/webrtc/video_engine/test/auto_test/source/vie_autotest_custom_call.cc
index 7410a01..225e30a 100644
--- a/webrtc/video_engine/test/auto_test/source/vie_autotest_custom_call.cc
+++ b/webrtc/video_engine/test/auto_test/source/vie_autotest_custom_call.cc
@@ -15,7 +15,7 @@
 #include <algorithm>
 
 #include "gflags/gflags.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/test/channel_transport/include/channel_transport.h"
 #include "webrtc/video_engine/test/auto_test/interface/vie_autotest.h"
 #include "webrtc/video_engine/test/auto_test/interface/vie_autotest_defines.h"
@@ -283,10 +283,8 @@
   int buffer_delay_ms = 0;
   bool is_image_scale_enabled = false;
   bool remb = true;
-  webrtc::scoped_ptr<webrtc::test::VideoChannelTransport>
-      video_channel_transport;
-  webrtc::scoped_ptr<webrtc::test::VoiceChannelTransport>
-      voice_channel_transport;
+  rtc::scoped_ptr<webrtc::test::VideoChannelTransport> video_channel_transport;
+  rtc::scoped_ptr<webrtc::test::VoiceChannelTransport> voice_channel_transport;
 
   while (!start_call) {
     // Get the IP address to use from call.
diff --git a/webrtc/video_engine/test/auto_test/source/vie_autotest_loopback.cc b/webrtc/video_engine/test/auto_test/source/vie_autotest_loopback.cc
index 4711122..ffc9757 100644
--- a/webrtc/video_engine/test/auto_test/source/vie_autotest_loopback.cc
+++ b/webrtc/video_engine/test/auto_test/source/vie_autotest_loopback.cc
@@ -21,9 +21,9 @@
 
 #include <iostream>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/channel_transport/include/channel_transport.h"
 #include "webrtc/video_engine/include/vie_base.h"
 #include "webrtc/video_engine/include/vie_capture.h"
diff --git a/webrtc/video_engine/test/auto_test/source/vie_autotest_record.cc b/webrtc/video_engine/test/auto_test/source/vie_autotest_record.cc
index 89575ce..9479393 100644
--- a/webrtc/video_engine/test/auto_test/source/vie_autotest_record.cc
+++ b/webrtc/video_engine/test/auto_test/source/vie_autotest_record.cc
@@ -156,9 +156,8 @@
 
   audio_channel = voe_base->CreateChannel();
 
-  webrtc::scoped_ptr<webrtc::test::VoiceChannelTransport>
-      voice_channel_transport(
-          new webrtc::test::VoiceChannelTransport(voe_network, audio_channel));
+  rtc::scoped_ptr<webrtc::test::VoiceChannelTransport> voice_channel_transport(
+      new webrtc::test::VoiceChannelTransport(voe_network, audio_channel));
 
   voice_channel_transport->SetSendDestination(ipAddress, audio_tx_port);
   voice_channel_transport->SetLocalReceiver(audio_rx_port);
diff --git a/webrtc/video_engine/test/libvietest/helpers/vie_to_file_renderer.cc b/webrtc/video_engine/test/libvietest/helpers/vie_to_file_renderer.cc
index 6da7e0c..27fa3cc 100644
--- a/webrtc/video_engine/test/libvietest/helpers/vie_to_file_renderer.cc
+++ b/webrtc/video_engine/test/libvietest/helpers/vie_to_file_renderer.cc
@@ -22,7 +22,7 @@
  public:
   Frame() : buffer(nullptr), buffer_size(0), timestamp(0), render_time(0) {}
 
-  webrtc::scoped_ptr<unsigned char[]> buffer;
+  rtc::scoped_ptr<unsigned char[]> buffer;
   size_t buffer_size;
   uint32_t timestamp;
   int64_t render_time;
diff --git a/webrtc/video_engine/test/libvietest/include/tb_video_channel.h b/webrtc/video_engine/test/libvietest/include/tb_video_channel.h
index 0409cf3..7d2557e 100644
--- a/webrtc/video_engine/test/libvietest/include/tb_video_channel.h
+++ b/webrtc/video_engine/test/libvietest/include/tb_video_channel.h
@@ -11,7 +11,7 @@
 #ifndef WEBRTC_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_INTERFACE_TB_VIDEO_CHANNEL_H_
 #define WEBRTC_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_INTERFACE_TB_VIDEO_CHANNEL_H_
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/video_engine/test/libvietest/include/tb_interfaces.h"
 
 namespace webrtc {
@@ -44,7 +44,7 @@
 
  private:
   TbInterfaces& ViE;
-  webrtc::scoped_ptr<webrtc::test::VideoChannelTransport> channel_transport_;
+  rtc::scoped_ptr<webrtc::test::VideoChannelTransport> channel_transport_;
 };
 
 
diff --git a/webrtc/video_engine/test/libvietest/include/vie_to_file_renderer.h b/webrtc/video_engine/test/libvietest/include/vie_to_file_renderer.h
index bf6dd8c..612a81c 100644
--- a/webrtc/video_engine/test/libvietest/include/vie_to_file_renderer.h
+++ b/webrtc/video_engine/test/libvietest/include/vie_to_file_renderer.h
@@ -18,7 +18,7 @@
 #include <string>
 
 #include "webrtc/base/constructormagic.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/video_engine/include/vie_render.h"
 
 namespace webrtc {
@@ -83,9 +83,9 @@
   FILE* output_file_;
   std::string output_path_;
   std::string output_filename_;
-  webrtc::scoped_ptr<webrtc::ThreadWrapper> thread_;
-  webrtc::scoped_ptr<webrtc::CriticalSectionWrapper> frame_queue_cs_;
-  webrtc::scoped_ptr<webrtc::EventWrapper> frame_render_event_;
+  rtc::scoped_ptr<webrtc::ThreadWrapper> thread_;
+  rtc::scoped_ptr<webrtc::CriticalSectionWrapper> frame_queue_cs_;
+  rtc::scoped_ptr<webrtc::EventWrapper> frame_render_event_;
   FrameQueue render_queue_;
   FrameQueue free_frame_queue_;
 };
diff --git a/webrtc/video_engine/vie_capturer.cc b/webrtc/video_engine/vie_capturer.cc
index 29685fd..1798af3 100644
--- a/webrtc/video_engine/vie_capturer.cc
+++ b/webrtc/video_engine/vie_capturer.cc
@@ -543,7 +543,7 @@
   if (effect_filter_) {
     size_t length =
         CalcBufferSize(kI420, video_frame->width(), video_frame->height());
-    scoped_ptr<uint8_t[]> video_buffer(new uint8_t[length]);
+    rtc::scoped_ptr<uint8_t[]> video_buffer(new uint8_t[length]);
     ExtractBuffer(*video_frame, length, video_buffer.get());
     effect_filter_->Transform(length,
                               video_buffer.get(),
diff --git a/webrtc/video_engine/vie_capturer.h b/webrtc/video_engine/vie_capturer.h
index 3183d8c..ae43a4b 100644
--- a/webrtc/video_engine/vie_capturer.h
+++ b/webrtc/video_engine/vie_capturer.h
@@ -14,6 +14,7 @@
 #include <vector>
 
 #include "webrtc/base/criticalsection.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/common_types.h"
 #include "webrtc/engine_configurations.h"
@@ -22,7 +23,6 @@
 #include "webrtc/modules/video_coding/main/interface/video_coding.h"
 #include "webrtc/modules/video_processing/main/interface/video_processing.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 #include "webrtc/video_engine/include/vie_base.h"
 #include "webrtc/video_engine/include/vie_capture.h"
@@ -155,15 +155,15 @@
   bool SwapCapturedAndDeliverFrameIfAvailable();
 
   // Never take capture_cs_ before deliver_cs_!
-  scoped_ptr<CriticalSectionWrapper> capture_cs_;
-  scoped_ptr<CriticalSectionWrapper> deliver_cs_;
+  rtc::scoped_ptr<CriticalSectionWrapper> capture_cs_;
+  rtc::scoped_ptr<CriticalSectionWrapper> deliver_cs_;
   VideoCaptureModule* capture_module_;
   VideoCaptureExternal* external_capture_module_;
   ProcessThread& module_process_thread_;
   const int capture_id_;
 
   // Frame used in IncomingFrameI420.
-  scoped_ptr<CriticalSectionWrapper> incoming_frame_cs_;
+  rtc::scoped_ptr<CriticalSectionWrapper> incoming_frame_cs_;
   I420VideoFrame incoming_frame_;
 
   // Capture thread.
@@ -173,8 +173,8 @@
 
   bool stop_;
 
-  scoped_ptr<I420VideoFrame> captured_frame_;
-  scoped_ptr<I420VideoFrame> deliver_frame_;
+  rtc::scoped_ptr<I420VideoFrame> captured_frame_;
+  rtc::scoped_ptr<I420VideoFrame> deliver_frame_;
 
   // Image processing.
   ViEEffectFilter* effect_filter_;
@@ -186,15 +186,15 @@
   Brightness reported_brightness_level_;
 
   // Statistics observer.
-  scoped_ptr<CriticalSectionWrapper> observer_cs_;
+  rtc::scoped_ptr<CriticalSectionWrapper> observer_cs_;
   ViECaptureObserver* observer_ GUARDED_BY(observer_cs_.get());
 
   CaptureCapability requested_capability_;
 
   // Must be declared before overuse_detector_ where it's registered.
-  const scoped_ptr<RegistrableCpuOveruseMetricsObserver>
+  const rtc::scoped_ptr<RegistrableCpuOveruseMetricsObserver>
       cpu_overuse_metrics_observer_;
-  scoped_ptr<OveruseFrameDetector> overuse_detector_;
+  rtc::scoped_ptr<OveruseFrameDetector> overuse_detector_;
 };
 
 }  // namespace webrtc
diff --git a/webrtc/video_engine/vie_capturer_unittest.cc b/webrtc/video_engine/vie_capturer_unittest.cc
index 7011390..fe1b3b1 100644
--- a/webrtc/video_engine/vie_capturer_unittest.cc
+++ b/webrtc/video_engine/vie_capturer_unittest.cc
@@ -16,6 +16,7 @@
 
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common.h"
 #include "webrtc/common_video/interface/native_handle.h"
 #include "webrtc/common_video/interface/texture_video_frame.h"
@@ -24,7 +25,6 @@
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/interface/event_wrapper.h"
 #include "webrtc/system_wrappers/interface/ref_count.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/scoped_vector.h"
 #include "webrtc/video_engine/mock/mock_vie_frame_provider_base.h"
 
@@ -106,20 +106,20 @@
     EXPECT_EQ(kEventSignaled, output_frame_event_->Wait(FRAME_TIMEOUT_MS));
   }
 
-  scoped_ptr<MockVideoCaptureModule> mock_capture_module_;
-  scoped_ptr<MockProcessThread> mock_process_thread_;
-  scoped_ptr<MockViEFrameCallback> mock_frame_callback_;
+  rtc::scoped_ptr<MockVideoCaptureModule> mock_capture_module_;
+  rtc::scoped_ptr<MockProcessThread> mock_process_thread_;
+  rtc::scoped_ptr<MockViEFrameCallback> mock_frame_callback_;
 
   // Used to send input capture frames to ViECapturer.
   VideoCaptureDataCallback* data_callback_;
 
-  scoped_ptr<ViECapturer> vie_capturer_;
+  rtc::scoped_ptr<ViECapturer> vie_capturer_;
 
   // Input capture frames of ViECapturer.
   ScopedVector<I420VideoFrame> input_frames_;
 
   // Indicate an output frame has arrived.
-  scoped_ptr<EventWrapper> output_frame_event_;
+  rtc::scoped_ptr<EventWrapper> output_frame_event_;
 
   // Output delivered frames of ViECaptuer.
   ScopedVector<I420VideoFrame> output_frames_;
@@ -174,7 +174,8 @@
   WaitOutputFrame();
 
   input_frames_.push_back(CreateI420VideoFrame(1));
-  scoped_ptr<I420VideoFrame> copied_input_frame(input_frames_[1]->CloneFrame());
+  rtc::scoped_ptr<I420VideoFrame> copied_input_frame(
+      input_frames_[1]->CloneFrame());
   AddInputFrame(copied_input_frame.get());
   WaitOutputFrame();
 
@@ -183,7 +184,8 @@
 
 TEST_F(ViECapturerTest, TestTextureFrameAfterI420Frame) {
   input_frames_.push_back(CreateI420VideoFrame(1));
-  scoped_ptr<I420VideoFrame> copied_input_frame(input_frames_[0]->CloneFrame());
+  rtc::scoped_ptr<I420VideoFrame> copied_input_frame(
+      input_frames_[0]->CloneFrame());
   AddInputFrame(copied_input_frame.get());
   WaitOutputFrame();
 
diff --git a/webrtc/video_engine/vie_channel.cc b/webrtc/video_engine/vie_channel.cc
index f958894..7a12b4e 100644
--- a/webrtc/video_engine/vie_channel.cc
+++ b/webrtc/video_engine/vie_channel.cc
@@ -1603,7 +1603,7 @@
     if (effect_filter_) {
       size_t length =
           CalcBufferSize(kI420, video_frame.width(), video_frame.height());
-      scoped_ptr<uint8_t[]> video_buffer(new uint8_t[length]);
+      rtc::scoped_ptr<uint8_t[]> video_buffer(new uint8_t[length]);
       ExtractBuffer(video_frame, length, video_buffer.get());
       effect_filter_->Transform(length,
                                 video_buffer.get(),
diff --git a/webrtc/video_engine/vie_channel.h b/webrtc/video_engine/vie_channel.h
index 5d11b4d..2321e89 100644
--- a/webrtc/video_engine/vie_channel.h
+++ b/webrtc/video_engine/vie_channel.h
@@ -13,12 +13,12 @@
 
 #include <list>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
 #include "webrtc/modules/video_coding/main/interface/video_coding_defines.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/scoped_refptr.h"
 #include "webrtc/system_wrappers/interface/tick_util.h"
 #include "webrtc/typedefs.h"
@@ -425,7 +425,7 @@
     // Note: this should be implemented with a RW-lock to allow simultaneous
     // calls into the callback. However that doesn't seem to be needed for the
     // current type of callbacks covered by this class.
-    scoped_ptr<CriticalSectionWrapper> critsect_;
+    rtc::scoped_ptr<CriticalSectionWrapper> critsect_;
     T* callback_ GUARDED_BY(critsect_);
 
    private:
@@ -496,15 +496,15 @@
   uint8_t num_socket_threads_;
 
   // Used for all registered callbacks except rendering.
-  scoped_ptr<CriticalSectionWrapper> callback_cs_;
-  scoped_ptr<CriticalSectionWrapper> rtp_rtcp_cs_;
+  rtc::scoped_ptr<CriticalSectionWrapper> callback_cs_;
+  rtc::scoped_ptr<CriticalSectionWrapper> rtp_rtcp_cs_;
 
   // Owned modules/classes.
-  scoped_ptr<RtpRtcp> rtp_rtcp_;
+  rtc::scoped_ptr<RtpRtcp> rtp_rtcp_;
   std::list<RtpRtcp*> simulcast_rtp_rtcp_;
   std::list<RtpRtcp*> removed_rtp_rtcp_;
   scoped_refptr<PayloadRouter> send_payload_router_;
-  scoped_ptr<ViEChannelProtectionCallback> vcm_protection_callback_;
+  rtc::scoped_ptr<ViEChannelProtectionCallback> vcm_protection_callback_;
 
   VideoCodingModule* const vcm_;
   ViEReceiver vie_receiver_;
@@ -512,7 +512,7 @@
   ViESyncModule vie_sync_;
 
   // Helper to report call statistics.
-  scoped_ptr<ChannelStatsObserver> stats_observer_;
+  rtc::scoped_ptr<ChannelStatsObserver> stats_observer_;
 
   // Not owned.
   VCMReceiveStatisticsCallback* vcm_receive_stats_callback_
@@ -526,7 +526,7 @@
   RtcpRttStats* rtt_stats_;
   PacedSender* paced_sender_;
 
-  scoped_ptr<RtcpBandwidthObserver> bandwidth_observer_;
+  rtc::scoped_ptr<RtcpBandwidthObserver> bandwidth_observer_;
   int send_timestamp_extension_id_;
   int absolute_send_time_extension_id_;
 
@@ -551,8 +551,8 @@
   int max_nack_reordering_threshold_;
   I420FrameCallback* pre_render_callback_;
 
-  scoped_ptr<ReportBlockStats> report_block_stats_sender_;
-  scoped_ptr<ReportBlockStats> report_block_stats_receiver_;
+  rtc::scoped_ptr<ReportBlockStats> report_block_stats_sender_;
+  rtc::scoped_ptr<ReportBlockStats> report_block_stats_receiver_;
 };
 
 }  // namespace webrtc
diff --git a/webrtc/video_engine/vie_channel_group.cc b/webrtc/video_engine/vie_channel_group.cc
index 4c80f65..11e618f 100644
--- a/webrtc/video_engine/vie_channel_group.cc
+++ b/webrtc/video_engine/vie_channel_group.cc
@@ -127,9 +127,9 @@
 
   RemoteBitrateObserver* observer_;
   Clock* clock_;
-  scoped_ptr<CriticalSectionWrapper> crit_sect_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
   const uint32_t min_bitrate_bps_;
-  scoped_ptr<RemoteBitrateEstimator> rbe_;
+  rtc::scoped_ptr<RemoteBitrateEstimator> rbe_;
   bool using_absolute_send_time_;
   uint32_t packets_since_absolute_send_time_;
 
diff --git a/webrtc/video_engine/vie_channel_group.h b/webrtc/video_engine/vie_channel_group.h
index 13d80f7..93170e2 100644
--- a/webrtc/video_engine/vie_channel_group.h
+++ b/webrtc/video_engine/vie_channel_group.h
@@ -13,7 +13,7 @@
 
 #include <set>
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -52,15 +52,15 @@
  private:
   typedef std::set<int> ChannelSet;
 
-  scoped_ptr<VieRemb> remb_;
-  scoped_ptr<BitrateController> bitrate_controller_;
-  scoped_ptr<CallStats> call_stats_;
-  scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
-  scoped_ptr<EncoderStateFeedback> encoder_state_feedback_;
+  rtc::scoped_ptr<VieRemb> remb_;
+  rtc::scoped_ptr<BitrateController> bitrate_controller_;
+  rtc::scoped_ptr<CallStats> call_stats_;
+  rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
+  rtc::scoped_ptr<EncoderStateFeedback> encoder_state_feedback_;
   ChannelSet channels_;
   const Config* config_;
   // Placeholder for the case where this owns the config.
-  scoped_ptr<Config> own_config_;
+  rtc::scoped_ptr<Config> own_config_;
 
   // Registered at construct time and assumed to outlive this class.
   ProcessThread* process_thread_;
diff --git a/webrtc/video_engine/vie_channel_manager.h b/webrtc/video_engine/vie_channel_manager.h
index a02cfa2..e6f6c96 100644
--- a/webrtc/video_engine/vie_channel_manager.h
+++ b/webrtc/video_engine/vie_channel_manager.h
@@ -14,8 +14,8 @@
 #include <list>
 #include <map>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/engine_configurations.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 #include "webrtc/video_engine/include/vie_rtp_rtcp.h"
 #include "webrtc/video_engine/vie_channel_group.h"
diff --git a/webrtc/video_engine/vie_frame_provider_base.h b/webrtc/video_engine/vie_frame_provider_base.h
index fdb2a48..fd579a4 100644
--- a/webrtc/video_engine/vie_frame_provider_base.h
+++ b/webrtc/video_engine/vie_frame_provider_base.h
@@ -13,8 +13,8 @@
 
 #include <vector>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -88,10 +88,10 @@
   // Frame callbacks.
   typedef std::vector<ViEFrameCallback*> FrameCallbacks;
   FrameCallbacks frame_callbacks_;
-  scoped_ptr<CriticalSectionWrapper> provider_cs_;
+  rtc::scoped_ptr<CriticalSectionWrapper> provider_cs_;
 
  private:
-  scoped_ptr<I420VideoFrame> extra_frame_;
+  rtc::scoped_ptr<I420VideoFrame> extra_frame_;
   int frame_delay_;
 };
 
diff --git a/webrtc/video_engine/vie_impl.h b/webrtc/video_engine/vie_impl.h
index 086282d..34fd7f7 100644
--- a/webrtc/video_engine/vie_impl.h
+++ b/webrtc/video_engine/vie_impl.h
@@ -11,9 +11,9 @@
 #ifndef WEBRTC_VIDEO_ENGINE_VIE_IMPL_H_
 #define WEBRTC_VIDEO_ENGINE_VIE_IMPL_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common.h"
 #include "webrtc/engine_configurations.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/video_engine/vie_defines.h"
 
 #include "webrtc/video_engine/vie_base_impl.h"
@@ -100,7 +100,7 @@
 
  private:
   // Placeholder for the case where this owns the config.
-  scoped_ptr<const Config> own_config_;
+  rtc::scoped_ptr<const Config> own_config_;
 };
 
 }  // namespace webrtc
diff --git a/webrtc/video_engine/vie_input_manager.h b/webrtc/video_engine/vie_input_manager.h
index f55a292..fc5221b 100644
--- a/webrtc/video_engine/vie_input_manager.h
+++ b/webrtc/video_engine/vie_input_manager.h
@@ -13,8 +13,8 @@
 
 #include <map>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/video_capture/include/video_capture.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 #include "webrtc/common_video/rotation.h"
 #include "webrtc/video_engine/include/vie_capture.h"
@@ -98,8 +98,8 @@
 
   const Config& config_;
   int engine_id_;
-  scoped_ptr<CriticalSectionWrapper> map_cs_;
-  scoped_ptr<CriticalSectionWrapper> device_info_cs_;
+  rtc::scoped_ptr<CriticalSectionWrapper> map_cs_;
+  rtc::scoped_ptr<CriticalSectionWrapper> device_info_cs_;
 
   typedef std::map<int, ViEFrameProviderBase*> FrameProviderMap;
   FrameProviderMap vie_frame_provider_map_;
diff --git a/webrtc/video_engine/vie_receiver.h b/webrtc/video_engine/vie_receiver.h
index 2216df1..577aaff 100644
--- a/webrtc/video_engine/vie_receiver.h
+++ b/webrtc/video_engine/vie_receiver.h
@@ -13,10 +13,10 @@
 
 #include <list>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/engine_configurations.h"
 #include "webrtc/modules/rtp_rtcp/interface/receive_statistics.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 #include "webrtc/video_engine/include/vie_network.h"
 #include "webrtc/video_engine/vie_defines.h"
@@ -109,19 +109,19 @@
   bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const;
   void UpdateHistograms();
 
-  scoped_ptr<CriticalSectionWrapper> receive_cs_;
+  rtc::scoped_ptr<CriticalSectionWrapper> receive_cs_;
   Clock* clock_;
-  scoped_ptr<RtpHeaderParser> rtp_header_parser_;
-  scoped_ptr<RTPPayloadRegistry> rtp_payload_registry_;
-  scoped_ptr<RtpReceiver> rtp_receiver_;
-  scoped_ptr<ReceiveStatistics> rtp_receive_statistics_;
-  scoped_ptr<FecReceiver> fec_receiver_;
+  rtc::scoped_ptr<RtpHeaderParser> rtp_header_parser_;
+  rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry_;
+  rtc::scoped_ptr<RtpReceiver> rtp_receiver_;
+  rtc::scoped_ptr<ReceiveStatistics> rtp_receive_statistics_;
+  rtc::scoped_ptr<FecReceiver> fec_receiver_;
   RtpRtcp* rtp_rtcp_;
   std::list<RtpRtcp*> rtp_rtcp_simulcast_;
   VideoCodingModule* vcm_;
   RemoteBitrateEstimator* remote_bitrate_estimator_;
 
-  scoped_ptr<RemoteNtpTimeEstimator> ntp_estimator_;
+  rtc::scoped_ptr<RemoteNtpTimeEstimator> ntp_estimator_;
 
   RtpDump* rtp_dump_;
   bool receiving_;
diff --git a/webrtc/video_engine/vie_ref_count.h b/webrtc/video_engine/vie_ref_count.h
index 95451c4..61533e1 100644
--- a/webrtc/video_engine/vie_ref_count.h
+++ b/webrtc/video_engine/vie_ref_count.h
@@ -13,7 +13,7 @@
 #ifndef WEBRTC_VIDEO_ENGINE_VIE_REF_COUNT_H_
 #define WEBRTC_VIDEO_ENGINE_VIE_REF_COUNT_H_
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -32,7 +32,7 @@
 
  private:
   volatile int count_;
-  scoped_ptr<CriticalSectionWrapper> crit_;
+  rtc::scoped_ptr<CriticalSectionWrapper> crit_;
 };
 
 }  // namespace webrtc
diff --git a/webrtc/video_engine/vie_remb.h b/webrtc/video_engine/vie_remb.h
index 66e1c8e..9f38259 100644
--- a/webrtc/video_engine/vie_remb.h
+++ b/webrtc/video_engine/vie_remb.h
@@ -15,10 +15,10 @@
 #include <utility>
 #include <vector>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/interface/module.h"
 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -57,7 +57,7 @@
  private:
   typedef std::list<RtpRtcp*> RtpModules;
 
-  scoped_ptr<CriticalSectionWrapper> list_crit_;
+  rtc::scoped_ptr<CriticalSectionWrapper> list_crit_;
 
   // The last time a REMB was sent.
   int64_t last_remb_time_;
diff --git a/webrtc/video_engine/vie_remb_unittest.cc b/webrtc/video_engine/vie_remb_unittest.cc
index 272833d..3949d44 100644
--- a/webrtc/video_engine/vie_remb_unittest.cc
+++ b/webrtc/video_engine/vie_remb_unittest.cc
@@ -16,10 +16,10 @@
 
 #include <vector>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
 #include "webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h"
 #include "webrtc/modules/utility/interface/mock/mock_process_thread.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/tick_util.h"
 #include "webrtc/video_engine/vie_remb.h"
 
@@ -37,8 +37,8 @@
     process_thread_.reset(new NiceMock<MockProcessThread>);
     vie_remb_.reset(new VieRemb());
   }
-  scoped_ptr<MockProcessThread> process_thread_;
-  scoped_ptr<VieRemb> vie_remb_;
+  rtc::scoped_ptr<MockProcessThread> process_thread_;
+  rtc::scoped_ptr<VieRemb> vie_remb_;
 };
 
 TEST_F(ViERembTest, OneModuleTestForSendingRemb) {
diff --git a/webrtc/video_engine/vie_render_manager.h b/webrtc/video_engine/vie_render_manager.h
index c1314cd..db1626a 100644
--- a/webrtc/video_engine/vie_render_manager.h
+++ b/webrtc/video_engine/vie_render_manager.h
@@ -14,7 +14,7 @@
 #include <list>
 #include <map>
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 #include "webrtc/video_engine/vie_manager_base.h"
 
@@ -54,7 +54,7 @@
   // Methods used by ViERenderScoped.
   ViERenderer* ViERenderPtr(int32_t render_id) const;
 
-  scoped_ptr<CriticalSectionWrapper> list_cs_;
+  rtc::scoped_ptr<CriticalSectionWrapper> list_cs_;
   int32_t engine_id_;
   // Protected by ViEManagerBase.
   typedef std::map<int32_t, ViERenderer*> RendererMap;
diff --git a/webrtc/video_engine/vie_sender.h b/webrtc/video_engine/vie_sender.h
index 8423a54..3a80479 100644
--- a/webrtc/video_engine/vie_sender.h
+++ b/webrtc/video_engine/vie_sender.h
@@ -13,9 +13,9 @@
 #ifndef WEBRTC_VIDEO_ENGINE_VIE_SENDER_H_
 #define WEBRTC_VIDEO_ENGINE_VIE_SENDER_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
 #include "webrtc/engine_configurations.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 #include "webrtc/video_engine/vie_defines.h"
 
@@ -46,7 +46,7 @@
  private:
   const int32_t channel_id_;
 
-  scoped_ptr<CriticalSectionWrapper> critsect_;
+  rtc::scoped_ptr<CriticalSectionWrapper> critsect_;
 
   Transport* transport_;
   RtpDump* rtp_dump_;
diff --git a/webrtc/video_engine/vie_sync_module.h b/webrtc/video_engine/vie_sync_module.h
index b125f29..994cdb2 100644
--- a/webrtc/video_engine/vie_sync_module.h
+++ b/webrtc/video_engine/vie_sync_module.h
@@ -14,8 +14,8 @@
 #ifndef WEBRTC_VIDEO_ENGINE_VIE_SYNC_MODULE_H_
 #define WEBRTC_VIDEO_ENGINE_VIE_SYNC_MODULE_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/interface/module.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/tick_util.h"
 #include "webrtc/video_engine/stream_synchronization.h"
 #include "webrtc/voice_engine/include/voe_video_sync.h"
@@ -49,7 +49,7 @@
   virtual int32_t Process() OVERRIDE;
 
  private:
-  scoped_ptr<CriticalSectionWrapper> data_cs_;
+  rtc::scoped_ptr<CriticalSectionWrapper> data_cs_;
   VideoCodingModule* vcm_;
   ViEChannel* vie_channel_;
   RtpReceiver* video_receiver_;
@@ -57,7 +57,7 @@
   int voe_channel_id_;
   VoEVideoSync* voe_sync_interface_;
   TickTime last_sync_time_;
-  scoped_ptr<StreamSynchronization> sync_;
+  rtc::scoped_ptr<StreamSynchronization> sync_;
   StreamSynchronization::Measurements audio_measurement_;
   StreamSynchronization::Measurements video_measurement_;
 };
diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc
index a9af605..9ad2cf8 100644
--- a/webrtc/voice_engine/channel.cc
+++ b/webrtc/voice_engine/channel.cc
@@ -87,7 +87,7 @@
   // StatisticsUpdated calls are triggered from threads in the RTP module,
   // while GetStats calls can be triggered from the public voice engine API,
   // hence synchronization is needed.
-  scoped_ptr<CriticalSectionWrapper> stats_lock_;
+  rtc::scoped_ptr<CriticalSectionWrapper> stats_lock_;
   const uint32_t ssrc_;
   ChannelStatistics stats_;
 };
@@ -3846,7 +3846,7 @@
 int32_t
 Channel::MixOrReplaceAudioWithFile(int mixingFrequency)
 {
-    scoped_ptr<int16_t[]> fileBuffer(new int16_t[640]);
+  rtc::scoped_ptr<int16_t[]> fileBuffer(new int16_t[640]);
     int fileSamples(0);
 
     {
@@ -3916,7 +3916,7 @@
 {
     assert(mixingFrequency <= 48000);
 
-    scoped_ptr<int16_t[]> fileBuffer(new int16_t[960]);
+    rtc::scoped_ptr<int16_t[]> fileBuffer(new int16_t[960]);
     int fileSamples(0);
 
     {
diff --git a/webrtc/voice_engine/channel.h b/webrtc/voice_engine/channel.h
index e7bedc5..29f9fe6 100644
--- a/webrtc/voice_engine/channel.h
+++ b/webrtc/voice_engine/channel.h
@@ -11,6 +11,7 @@
 #ifndef WEBRTC_VOICE_ENGINE_CHANNEL_H_
 #define WEBRTC_VOICE_ENGINE_CHANNEL_H_
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/resampler/include/push_resampler.h"
 #include "webrtc/common_types.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
@@ -22,7 +23,6 @@
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
 #include "webrtc/modules/utility/interface/file_player.h"
 #include "webrtc/modules/utility/interface/file_recorder.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/voice_engine/dtmf_inband.h"
 #include "webrtc/voice_engine/dtmf_inband_queue.h"
 #include "webrtc/voice_engine/include/voe_audio_processing.h"
@@ -149,7 +149,7 @@
     }
 
 private:
-    scoped_ptr<CriticalSectionWrapper> lock_;
+ rtc::scoped_ptr<CriticalSectionWrapper> lock_;
     State state_;
 };
 
@@ -487,20 +487,20 @@
 
     ChannelState channel_state_;
 
-    scoped_ptr<RtpHeaderParser> rtp_header_parser_;
-    scoped_ptr<RTPPayloadRegistry> rtp_payload_registry_;
-    scoped_ptr<ReceiveStatistics> rtp_receive_statistics_;
-    scoped_ptr<StatisticsProxy> statistics_proxy_;
-    scoped_ptr<RtpReceiver> rtp_receiver_;
+    rtc::scoped_ptr<RtpHeaderParser> rtp_header_parser_;
+    rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry_;
+    rtc::scoped_ptr<ReceiveStatistics> rtp_receive_statistics_;
+    rtc::scoped_ptr<StatisticsProxy> statistics_proxy_;
+    rtc::scoped_ptr<RtpReceiver> rtp_receiver_;
     TelephoneEventHandler* telephone_event_handler_;
-    scoped_ptr<RtpRtcp> _rtpRtcpModule;
-    scoped_ptr<AudioCodingModule> audio_coding_;
+    rtc::scoped_ptr<RtpRtcp> _rtpRtcpModule;
+    rtc::scoped_ptr<AudioCodingModule> audio_coding_;
     RtpDump& _rtpDumpIn;
     RtpDump& _rtpDumpOut;
     AudioLevel _outputAudioLevel;
     bool _externalTransport;
     AudioFrame _audioFrame;
-    scoped_ptr<int16_t[]> mono_recording_audio_;
+    rtc::scoped_ptr<int16_t[]> mono_recording_audio_;
     // Downsamples to the codec rate if necessary.
     PushResampler<int16_t> input_resampler_;
     FilePlayer* _inputFilePlayerPtr;
@@ -529,9 +529,9 @@
     uint16_t send_sequence_number_;
     uint8_t restored_packet_[kVoiceEngineMaxIpPacketSizeBytes];
 
-    scoped_ptr<CriticalSectionWrapper> ts_stats_lock_;
+    rtc::scoped_ptr<CriticalSectionWrapper> ts_stats_lock_;
 
-    scoped_ptr<rtc::TimestampWrapAroundHandler> rtp_ts_wraparound_handler_;
+    rtc::scoped_ptr<rtc::TimestampWrapAroundHandler> rtp_ts_wraparound_handler_;
     // The rtp timestamp of the first played out audio frame.
     int64_t capture_start_rtp_time_stamp_;
     // The capture ntp time (in local timebase) of the first played out audio
@@ -548,7 +548,7 @@
     CriticalSectionWrapper* _callbackCritSectPtr; // owned by base
     Transport* _transportPtr; // WebRtc socket or external transport
     RMSLevel rms_level_;
-    scoped_ptr<AudioProcessing> rx_audioproc_; // far end AudioProcessing
+    rtc::scoped_ptr<AudioProcessing> rx_audioproc_;  // far end AudioProcessing
     VoERxVadCallback* _rxVadObserverPtr;
     int32_t _oldVadDecision;
     int32_t _sendFrameType; // Send data is voice, 1-voice, 0-otherwise
@@ -582,8 +582,8 @@
     bool _rxNsIsEnabled;
     bool restored_packet_in_use_;
     // RtcpBandwidthObserver
-    scoped_ptr<VoERtcpObserver> rtcp_observer_;
-    scoped_ptr<NetworkPredictor> network_predictor_;
+    rtc::scoped_ptr<VoERtcpObserver> rtcp_observer_;
+    rtc::scoped_ptr<NetworkPredictor> network_predictor_;
 };
 
 }  // namespace voe
diff --git a/webrtc/voice_engine/channel_manager.h b/webrtc/voice_engine/channel_manager.h
index 3c0f681..eae014e 100644
--- a/webrtc/voice_engine/channel_manager.h
+++ b/webrtc/voice_engine/channel_manager.h
@@ -14,9 +14,9 @@
 #include <vector>
 
 #include "webrtc/base/constructormagic.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/atomic32.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -60,7 +60,7 @@
   // deleted when no references to them are held.
   struct ChannelRef {
     ChannelRef(Channel* channel);
-    const scoped_ptr<Channel> channel;
+    const rtc::scoped_ptr<Channel> channel;
     Atomic32 ref_count;
   };
 
@@ -118,7 +118,7 @@
 
   Atomic32 last_channel_id_;
 
-  scoped_ptr<CriticalSectionWrapper> lock_;
+  rtc::scoped_ptr<CriticalSectionWrapper> lock_;
   std::vector<ChannelOwner> channels_;
 
   const Config& config_;
diff --git a/webrtc/voice_engine/include/mock/fake_voe_external_media.h b/webrtc/voice_engine/include/mock/fake_voe_external_media.h
index b327f3c..ab7f59a 100644
--- a/webrtc/voice_engine/include/mock/fake_voe_external_media.h
+++ b/webrtc/voice_engine/include/mock/fake_voe_external_media.h
@@ -13,7 +13,7 @@
 
 #include <map>
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/test/fake_common.h"
 #include "webrtc/voice_engine/include/voe_external_media.h"
 
@@ -53,7 +53,7 @@
                    int samples_per_channel, int sample_rate_hz,
                    int num_channels) {
     const int length = samples_per_channel * num_channels;
-    scoped_ptr<int16_t[]> data;
+    rtc::scoped_ptr<int16_t[]> data;
     if (!audio) {
       data.reset(new int16_t[length]);
       memset(data.get(), 0, length * sizeof(data[0]));
diff --git a/webrtc/voice_engine/network_predictor.h b/webrtc/voice_engine/network_predictor.h
index d9f0b7b..0e50686 100644
--- a/webrtc/voice_engine/network_predictor.h
+++ b/webrtc/voice_engine/network_predictor.h
@@ -38,7 +38,7 @@
   int64_t last_loss_rate_update_time_ms_;
 
   // An exponential filter is used to predict packet loss rate.
-  scoped_ptr<rtc::ExpFilter> loss_rate_filter_;
+  rtc::scoped_ptr<rtc::ExpFilter> loss_rate_filter_;
 };
 
 }  // namespace voe
diff --git a/webrtc/voice_engine/network_predictor_unittest.cc b/webrtc/voice_engine/network_predictor_unittest.cc
index e399f68..55ee20d 100644
--- a/webrtc/voice_engine/network_predictor_unittest.cc
+++ b/webrtc/voice_engine/network_predictor_unittest.cc
@@ -23,7 +23,7 @@
       : clock_(0),
         network_predictor_(new NetworkPredictor(&clock_)) {}
   SimulatedClock clock_;
-  scoped_ptr<NetworkPredictor> network_predictor_;
+  rtc::scoped_ptr<NetworkPredictor> network_predictor_;
 };
 
 TEST_F(TestNetworkPredictor, TestPacketLossRateFilter) {
diff --git a/webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h b/webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h
index e809c5f..32ec867 100644
--- a/webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h
+++ b/webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h
@@ -13,11 +13,11 @@
 
 #include <deque>
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
 #include "webrtc/system_wrappers/interface/atomic32.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/interface/event_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/sleep.h"
 #include "webrtc/system_wrappers/interface/thread_wrapper.h"
 #include "webrtc/voice_engine/test/auto_test/fixtures/before_initialization_fixture.h"
@@ -124,9 +124,9 @@
     return true;
   }
 
-  const webrtc::scoped_ptr<webrtc::CriticalSectionWrapper> crit_;
-  const webrtc::scoped_ptr<webrtc::EventWrapper> packet_event_;
-  const webrtc::scoped_ptr<webrtc::ThreadWrapper> thread_;
+  const rtc::scoped_ptr<webrtc::CriticalSectionWrapper> crit_;
+  const rtc::scoped_ptr<webrtc::EventWrapper> packet_event_;
+  const rtc::scoped_ptr<webrtc::ThreadWrapper> thread_;
   std::deque<Packet> packet_queue_ GUARDED_BY(crit_.get());
   webrtc::VoENetwork* const voe_network_;
   webrtc::Atomic32 transmitted_packets_;
@@ -143,7 +143,7 @@
   virtual ~AfterInitializationFixture();
 
  protected:
-  webrtc::scoped_ptr<TestErrorObserver> error_observer_;
+  rtc::scoped_ptr<TestErrorObserver> error_observer_;
 };
 
 #endif  // SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_TEST_BASE_AFTER_INIT_H_
diff --git a/webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_extensions.cc b/webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_extensions.cc
index 7d5ebe2..ec9787c 100644
--- a/webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_extensions.cc
+++ b/webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_extensions.cc
@@ -84,7 +84,7 @@
     kPacketsExpected = 10,
     kSleepIntervalMs = 10
   };
-  webrtc::scoped_ptr<webrtc::RtpHeaderParser> parser_;
+  rtc::scoped_ptr<webrtc::RtpHeaderParser> parser_;
   webrtc::Atomic32 received_packets_;
   webrtc::Atomic32 bad_packets_;
   int audio_level_id_;
diff --git a/webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_test.cc b/webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_test.cc
index 0a22db4..e5b2f30 100644
--- a/webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_test.cc
+++ b/webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_test.cc
@@ -35,9 +35,9 @@
     incoming_ssrc_ = ssrc;
   }
  public:
-  voetest::scoped_ptr<voetest::CriticalSectionWrapper> crit_;
+  rtc::scoped_ptr<voetest::CriticalSectionWrapper> crit_;
   unsigned int incoming_ssrc_;
-  voetest::scoped_ptr<voetest::EventWrapper> changed_ssrc_event_;
+  rtc::scoped_ptr<voetest::EventWrapper> changed_ssrc_event_;
 };
 
 void TestRtpObserver::OnIncomingSSRCChanged(int channel,
diff --git a/webrtc/voice_engine/test/auto_test/voe_cpu_test.cc b/webrtc/voice_engine/test/auto_test/voe_cpu_test.cc
index dddbb2c..ad6116d 100644
--- a/webrtc/voice_engine/test/auto_test/voe_cpu_test.cc
+++ b/webrtc/voice_engine/test/auto_test/voe_cpu_test.cc
@@ -17,7 +17,7 @@
 #include <conio.h>
 #endif
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/test/channel_transport/include/channel_transport.h"
 #include "webrtc/voice_engine/test/auto_test/voe_test_defines.h"
 
@@ -64,7 +64,7 @@
   CHECK(base->Init());
   channel = base->CreateChannel();
 
-  scoped_ptr<VoiceChannelTransport> voice_socket_transport(
+  rtc::scoped_ptr<VoiceChannelTransport> voice_socket_transport(
       new VoiceChannelTransport(voe_network, channel));
 
   CHECK(voice_socket_transport->SetSendDestination("127.0.0.1", 5566));
diff --git a/webrtc/voice_engine/test/auto_test/voe_stress_test.cc b/webrtc/voice_engine/test/auto_test/voe_stress_test.cc
index d2c1917..ec4e92b 100644
--- a/webrtc/voice_engine/test/auto_test/voe_stress_test.cc
+++ b/webrtc/voice_engine/test/auto_test/voe_stress_test.cc
@@ -24,7 +24,7 @@
 
 #include "webrtc/voice_engine/test/auto_test/voe_stress_test.h"
 
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/system_wrappers/interface/sleep.h"
 #include "webrtc/system_wrappers/interface/thread_wrapper.h"
 #include "webrtc/test/channel_transport/include/channel_transport.h"
@@ -145,7 +145,7 @@
   printf("Test will take approximately %d minutes. \n",
          numberOfLoops * loopSleep / 1000 / 60 + 1);
 
-  scoped_ptr<VoiceChannelTransport> voice_channel_transport(
+  rtc::scoped_ptr<VoiceChannelTransport> voice_channel_transport(
       new VoiceChannelTransport(voe_network, 0));
 
   for (i = 0; i < numberOfLoops; ++i) {
diff --git a/webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc b/webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc
index 454baff..f0c3471 100644
--- a/webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc
+++ b/webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc
@@ -19,9 +19,9 @@
 
 #include "gflags/gflags.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/engine_configurations.h"
 #include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/channel_transport/include/channel_transport.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/test/testsupport/trace_to_stderr.h"
@@ -140,7 +140,7 @@
 
   MyObserver my_observer;
 
-  scoped_ptr<test::TraceToStderr> trace_to_stderr;
+  rtc::scoped_ptr<test::TraceToStderr> trace_to_stderr;
   if (!FLAGS_use_log_file) {
     trace_to_stderr.reset(new test::TraceToStderr);
   } else {
@@ -259,7 +259,7 @@
     fflush(NULL);
   }
 
-  scoped_ptr<VoiceChannelTransport> voice_channel_transport(
+  rtc::scoped_ptr<VoiceChannelTransport> voice_channel_transport(
       new VoiceChannelTransport(netw, chan));
 
   char ip[64];
diff --git a/webrtc/voice_engine/transmit_mixer.cc b/webrtc/voice_engine/transmit_mixer.cc
index 2f1c9dc..e8fda19 100644
--- a/webrtc/voice_engine/transmit_mixer.cc
+++ b/webrtc/voice_engine/transmit_mixer.cc
@@ -1194,7 +1194,7 @@
 int32_t TransmitMixer::MixOrReplaceAudioWithFile(
     int mixingFrequency)
 {
-    scoped_ptr<int16_t[]> fileBuffer(new int16_t[640]);
+  rtc::scoped_ptr<int16_t[]> fileBuffer(new int16_t[640]);
 
     int fileSamples(0);
     {
diff --git a/webrtc/voice_engine/transmit_mixer.h b/webrtc/voice_engine/transmit_mixer.h
index afeec3a..919de13 100644
--- a/webrtc/voice_engine/transmit_mixer.h
+++ b/webrtc/voice_engine/transmit_mixer.h
@@ -11,13 +11,13 @@
 #ifndef WEBRTC_VOICE_ENGINE_TRANSMIT_MIXER_H
 #define WEBRTC_VOICE_ENGINE_TRANSMIT_MIXER_H
 
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/resampler/include/push_resampler.h"
 #include "webrtc/common_types.h"
 #include "webrtc/modules/audio_processing/typing_detection.h"
 #include "webrtc/modules/interface/module_common_types.h"
 #include "webrtc/modules/utility/interface/file_player.h"
 #include "webrtc/modules/utility/interface/file_recorder.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/voice_engine/include/voe_base.h"
 #include "webrtc/voice_engine/level_indicator.h"
 #include "webrtc/voice_engine/monitor_module.h"
@@ -229,7 +229,7 @@
     int32_t _remainingMuteMicTimeMs;
     bool stereo_codec_;
     bool swap_stereo_channels_;
-    scoped_ptr<int16_t[]> mono_buffer_;
+    rtc::scoped_ptr<int16_t[]> mono_buffer_;
 };
 
 }  // namespace voe
diff --git a/webrtc/voice_engine/voe_base_unittest.cc b/webrtc/voice_engine/voe_base_unittest.cc
index cfebe0e..69aba71 100644
--- a/webrtc/voice_engine/voe_base_unittest.cc
+++ b/webrtc/voice_engine/voe_base_unittest.cc
@@ -11,9 +11,9 @@
 #include "webrtc/voice_engine/include/voe_base.h"
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_device/include/fake_audio_device.h"
 #include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 
 namespace webrtc {
 
@@ -32,7 +32,7 @@
 
   VoiceEngine* voe_;
   VoEBase* base_;
-  scoped_ptr<FakeAudioDeviceModule> adm_;
+  rtc::scoped_ptr<FakeAudioDeviceModule> adm_;
 };
 
 TEST_F(VoEBaseTest, AcceptsAudioProcessingPtr) {
diff --git a/webrtc/voice_engine/voe_codec_unittest.cc b/webrtc/voice_engine/voe_codec_unittest.cc
index 53894f9..6eb5a51 100644
--- a/webrtc/voice_engine/voe_codec_unittest.cc
+++ b/webrtc/voice_engine/voe_codec_unittest.cc
@@ -11,8 +11,8 @@
 #include "webrtc/voice_engine/include/voe_codec.h"
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_device/include/fake_audio_device.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/gtest_disable.h"
 #include "webrtc/voice_engine/include/voe_base.h"
 #include "webrtc/voice_engine/include/voe_hardware.h"
@@ -94,7 +94,7 @@
   int channel_;
   CodecInst primary_;
   CodecInst valid_secondary_;
-  scoped_ptr<FakeAudioDeviceModule> adm_;
+  rtc::scoped_ptr<FakeAudioDeviceModule> adm_;
 
   // A codec which is not valid to be registered as secondary codec.
   CodecInst invalid_secondary_;
diff --git a/webrtc/voice_engine/voice_engine_impl.h b/webrtc/voice_engine/voice_engine_impl.h
index 1d2b9c5..992bc2d 100644
--- a/webrtc/voice_engine/voice_engine_impl.h
+++ b/webrtc/voice_engine/voice_engine_impl.h
@@ -136,7 +136,7 @@
 
 private:
     Atomic32 _ref_count;
-    scoped_ptr<const Config> own_config_;
+    rtc::scoped_ptr<const Config> own_config_;
 };
 
 }  // namespace webrtc