Add Chromium's ScopedVector.

Trivial changes from the original excepting scoped_vector_unittest.cc,
diff here: https://paste.googleplex.com/6664017300946944

This is a prerequisite for:
http://review.webrtc.org/9919004/

TBR=henrike@webrtc.org
BUG=2894

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5938 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/system_wrappers/source/move.h b/webrtc/system_wrappers/source/move.h
index 53109c7..2e93641 100644
--- a/webrtc/system_wrappers/source/move.h
+++ b/webrtc/system_wrappers/source/move.h
@@ -144,6 +144,16 @@
 // choose the one that adheres to the standard.
 //
 //
+// WHY HAVE typedef void MoveOnlyTypeForCPP03
+//
+// Callback<>/Bind() needs to understand movable-but-not-copyable semantics
+// to call .Pass() appropriately when it is expected to transfer the value.
+// The cryptic typedef MoveOnlyTypeForCPP03 is added to make this check
+// easy and automatic in helper templates for Callback<>/Bind().
+// See IsMoveOnlyType template and its usage in base/callback_internal.h
+// for more details.
+//
+//
 // COMPARED TO C++11
 //
 // In C++11, you would implement this functionality using an r-value reference
@@ -210,6 +220,7 @@
  public: \
   operator rvalue_type() { return rvalue_type(this); } \
   type Pass() { return type(rvalue_type(this)); } \
+  typedef void MoveOnlyTypeForCPP03; \
  private:
 
 #endif  // WEBRTC_SYSTEM_WRAPPERS_INTEFACE_MOVE_H_
diff --git a/webrtc/system_wrappers/source/scoped_vector_unittest.cc b/webrtc/system_wrappers/source/scoped_vector_unittest.cc
new file mode 100644
index 0000000..c1b9d01
--- /dev/null
+++ b/webrtc/system_wrappers/source/scoped_vector_unittest.cc
@@ -0,0 +1,328 @@
+/*
+ *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+// Borrowed from Chromium's src/base/memory/scoped_vector_unittest.cc
+
+#include "webrtc/system_wrappers/interface/scoped_vector.h"
+
+#include "webrtc/system_wrappers/interface/scoped_ptr.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace webrtc {
+namespace {
+
+// The LifeCycleObject notifies its Observer upon construction & destruction.
+class LifeCycleObject {
+ public:
+  class Observer {
+   public:
+    virtual void OnLifeCycleConstruct(LifeCycleObject* o) = 0;
+    virtual void OnLifeCycleDestroy(LifeCycleObject* o) = 0;
+
+   protected:
+    virtual ~Observer() {}
+  };
+
+  ~LifeCycleObject() {
+    observer_->OnLifeCycleDestroy(this);
+  }
+
+ private:
+  friend class LifeCycleWatcher;
+
+  explicit LifeCycleObject(Observer* observer)
+      : observer_(observer) {
+    observer_->OnLifeCycleConstruct(this);
+  }
+
+  Observer* observer_;
+
+  DISALLOW_COPY_AND_ASSIGN(LifeCycleObject);
+};
+
+// The life cycle states we care about for the purposes of testing ScopedVector
+// against objects.
+enum LifeCycleState {
+  LC_INITIAL,
+  LC_CONSTRUCTED,
+  LC_DESTROYED,
+};
+
+// Because we wish to watch the life cycle of an object being constructed and
+// destroyed, and further wish to test expectations against the state of that
+// object, we cannot save state in that object itself. Instead, we use this
+// pairing of the watcher, which observes the object and notifies of
+// construction & destruction. Since we also may be testing assumptions about
+// things not getting freed, this class also acts like a scoping object and
+// deletes the |constructed_life_cycle_object_|, if any when the
+// LifeCycleWatcher is destroyed. To keep this simple, the only expected state
+// changes are:
+//   INITIAL -> CONSTRUCTED -> DESTROYED.
+// Anything more complicated than that should start another test.
+class LifeCycleWatcher : public LifeCycleObject::Observer {
+ public:
+  LifeCycleWatcher() : life_cycle_state_(LC_INITIAL) {}
+  virtual ~LifeCycleWatcher() {}
+
+  // Assert INITIAL -> CONSTRUCTED and no LifeCycleObject associated with this
+  // LifeCycleWatcher.
+  virtual void OnLifeCycleConstruct(LifeCycleObject* object) OVERRIDE {
+    ASSERT_EQ(LC_INITIAL, life_cycle_state_);
+    ASSERT_EQ(NULL, constructed_life_cycle_object_.get());
+    life_cycle_state_ = LC_CONSTRUCTED;
+    constructed_life_cycle_object_.reset(object);
+  }
+
+  // Assert CONSTRUCTED -> DESTROYED and the |object| being destroyed is the
+  // same one we saw constructed.
+  virtual void OnLifeCycleDestroy(LifeCycleObject* object) OVERRIDE {
+    ASSERT_EQ(LC_CONSTRUCTED, life_cycle_state_);
+    LifeCycleObject* constructed_life_cycle_object =
+        constructed_life_cycle_object_.release();
+    ASSERT_EQ(constructed_life_cycle_object, object);
+    life_cycle_state_ = LC_DESTROYED;
+  }
+
+  LifeCycleState life_cycle_state() const { return life_cycle_state_; }
+
+  // Factory method for creating a new LifeCycleObject tied to this
+  // LifeCycleWatcher.
+  LifeCycleObject* NewLifeCycleObject() {
+    return new LifeCycleObject(this);
+  }
+
+  // Returns true iff |object| is the same object that this watcher is tracking.
+  bool IsWatching(LifeCycleObject* object) const {
+    return object == constructed_life_cycle_object_.get();
+  }
+
+ private:
+  LifeCycleState life_cycle_state_;
+  scoped_ptr<LifeCycleObject> constructed_life_cycle_object_;
+
+  DISALLOW_COPY_AND_ASSIGN(LifeCycleWatcher);
+};
+
+TEST(ScopedVectorTest, LifeCycleWatcher) {
+  LifeCycleWatcher watcher;
+  EXPECT_EQ(LC_INITIAL, watcher.life_cycle_state());
+  LifeCycleObject* object = watcher.NewLifeCycleObject();
+  EXPECT_EQ(LC_CONSTRUCTED, watcher.life_cycle_state());
+  delete object;
+  EXPECT_EQ(LC_DESTROYED, watcher.life_cycle_state());
+}
+
+TEST(ScopedVectorTest, PopBack) {
+  LifeCycleWatcher watcher;
+  EXPECT_EQ(LC_INITIAL, watcher.life_cycle_state());
+  ScopedVector<LifeCycleObject> scoped_vector;
+  scoped_vector.push_back(watcher.NewLifeCycleObject());
+  EXPECT_EQ(LC_CONSTRUCTED, watcher.life_cycle_state());
+  EXPECT_TRUE(watcher.IsWatching(scoped_vector.back()));
+  scoped_vector.pop_back();
+  EXPECT_EQ(LC_DESTROYED, watcher.life_cycle_state());
+  EXPECT_TRUE(scoped_vector.empty());
+}
+
+TEST(ScopedVectorTest, Clear) {
+  LifeCycleWatcher watcher;
+  EXPECT_EQ(LC_INITIAL, watcher.life_cycle_state());
+  ScopedVector<LifeCycleObject> scoped_vector;
+  scoped_vector.push_back(watcher.NewLifeCycleObject());
+  EXPECT_EQ(LC_CONSTRUCTED, watcher.life_cycle_state());
+  EXPECT_TRUE(watcher.IsWatching(scoped_vector.back()));
+  scoped_vector.clear();
+  EXPECT_EQ(LC_DESTROYED, watcher.life_cycle_state());
+  EXPECT_TRUE(scoped_vector.empty());
+}
+
+TEST(ScopedVectorTest, WeakClear) {
+  LifeCycleWatcher watcher;
+  EXPECT_EQ(LC_INITIAL, watcher.life_cycle_state());
+  ScopedVector<LifeCycleObject> scoped_vector;
+  scoped_vector.push_back(watcher.NewLifeCycleObject());
+  EXPECT_EQ(LC_CONSTRUCTED, watcher.life_cycle_state());
+  EXPECT_TRUE(watcher.IsWatching(scoped_vector.back()));
+  scoped_vector.weak_clear();
+  EXPECT_EQ(LC_CONSTRUCTED, watcher.life_cycle_state());
+  EXPECT_TRUE(scoped_vector.empty());
+}
+
+TEST(ScopedVectorTest, ResizeShrink) {
+  LifeCycleWatcher first_watcher;
+  EXPECT_EQ(LC_INITIAL, first_watcher.life_cycle_state());
+  LifeCycleWatcher second_watcher;
+  EXPECT_EQ(LC_INITIAL, second_watcher.life_cycle_state());
+  ScopedVector<LifeCycleObject> scoped_vector;
+
+  scoped_vector.push_back(first_watcher.NewLifeCycleObject());
+  EXPECT_EQ(LC_CONSTRUCTED, first_watcher.life_cycle_state());
+  EXPECT_EQ(LC_INITIAL, second_watcher.life_cycle_state());
+  EXPECT_TRUE(first_watcher.IsWatching(scoped_vector[0]));
+  EXPECT_FALSE(second_watcher.IsWatching(scoped_vector[0]));
+
+  scoped_vector.push_back(second_watcher.NewLifeCycleObject());
+  EXPECT_EQ(LC_CONSTRUCTED, first_watcher.life_cycle_state());
+  EXPECT_EQ(LC_CONSTRUCTED, second_watcher.life_cycle_state());
+  EXPECT_FALSE(first_watcher.IsWatching(scoped_vector[1]));
+  EXPECT_TRUE(second_watcher.IsWatching(scoped_vector[1]));
+
+  // Test that shrinking a vector deletes elements in the disappearing range.
+  scoped_vector.resize(1);
+  EXPECT_EQ(LC_CONSTRUCTED, first_watcher.life_cycle_state());
+  EXPECT_EQ(LC_DESTROYED, second_watcher.life_cycle_state());
+  EXPECT_EQ(1u, scoped_vector.size());
+  EXPECT_TRUE(first_watcher.IsWatching(scoped_vector[0]));
+}
+
+TEST(ScopedVectorTest, ResizeGrow) {
+  LifeCycleWatcher watcher;
+  EXPECT_EQ(LC_INITIAL, watcher.life_cycle_state());
+  ScopedVector<LifeCycleObject> scoped_vector;
+  scoped_vector.push_back(watcher.NewLifeCycleObject());
+  EXPECT_EQ(LC_CONSTRUCTED, watcher.life_cycle_state());
+  EXPECT_TRUE(watcher.IsWatching(scoped_vector.back()));
+
+  scoped_vector.resize(5);
+  EXPECT_EQ(LC_CONSTRUCTED, watcher.life_cycle_state());
+  ASSERT_EQ(5u, scoped_vector.size());
+  EXPECT_TRUE(watcher.IsWatching(scoped_vector[0]));
+  EXPECT_FALSE(watcher.IsWatching(scoped_vector[1]));
+  EXPECT_FALSE(watcher.IsWatching(scoped_vector[2]));
+  EXPECT_FALSE(watcher.IsWatching(scoped_vector[3]));
+  EXPECT_FALSE(watcher.IsWatching(scoped_vector[4]));
+}
+
+TEST(ScopedVectorTest, Scope) {
+  LifeCycleWatcher watcher;
+  EXPECT_EQ(LC_INITIAL, watcher.life_cycle_state());
+  {
+    ScopedVector<LifeCycleObject> scoped_vector;
+    scoped_vector.push_back(watcher.NewLifeCycleObject());
+    EXPECT_EQ(LC_CONSTRUCTED, watcher.life_cycle_state());
+    EXPECT_TRUE(watcher.IsWatching(scoped_vector.back()));
+  }
+  EXPECT_EQ(LC_DESTROYED, watcher.life_cycle_state());
+}
+
+TEST(ScopedVectorTest, MoveConstruct) {
+  LifeCycleWatcher watcher;
+  EXPECT_EQ(LC_INITIAL, watcher.life_cycle_state());
+  {
+    ScopedVector<LifeCycleObject> scoped_vector;
+    scoped_vector.push_back(watcher.NewLifeCycleObject());
+    EXPECT_FALSE(scoped_vector.empty());
+    EXPECT_TRUE(watcher.IsWatching(scoped_vector.back()));
+
+    ScopedVector<LifeCycleObject> scoped_vector_copy(scoped_vector.Pass());
+    EXPECT_TRUE(scoped_vector.empty());
+    EXPECT_FALSE(scoped_vector_copy.empty());
+    EXPECT_TRUE(watcher.IsWatching(scoped_vector_copy.back()));
+
+    EXPECT_EQ(LC_CONSTRUCTED, watcher.life_cycle_state());
+  }
+  EXPECT_EQ(LC_DESTROYED, watcher.life_cycle_state());
+}
+
+TEST(ScopedVectorTest, MoveAssign) {
+  LifeCycleWatcher watcher;
+  EXPECT_EQ(LC_INITIAL, watcher.life_cycle_state());
+  {
+    ScopedVector<LifeCycleObject> scoped_vector;
+    scoped_vector.push_back(watcher.NewLifeCycleObject());
+    ScopedVector<LifeCycleObject> scoped_vector_assign;
+    EXPECT_FALSE(scoped_vector.empty());
+    EXPECT_TRUE(watcher.IsWatching(scoped_vector.back()));
+
+    scoped_vector_assign = scoped_vector.Pass();
+    EXPECT_TRUE(scoped_vector.empty());
+    EXPECT_FALSE(scoped_vector_assign.empty());
+    EXPECT_TRUE(watcher.IsWatching(scoped_vector_assign.back()));
+
+    EXPECT_EQ(LC_CONSTRUCTED, watcher.life_cycle_state());
+  }
+  EXPECT_EQ(LC_DESTROYED, watcher.life_cycle_state());
+}
+
+class DeleteCounter {
+ public:
+  explicit DeleteCounter(int* deletes)
+      : deletes_(deletes) {
+  }
+
+  ~DeleteCounter() {
+    (*deletes_)++;
+  }
+
+  void VoidMethod0() {}
+
+ private:
+  int* const deletes_;
+
+  DISALLOW_COPY_AND_ASSIGN(DeleteCounter);
+};
+
+// This class is used in place of Chromium's base::Callback.
+template <typename T>
+class PassThru  {
+ public:
+  explicit PassThru(ScopedVector<T> scoper) : scoper_(scoper.Pass()) {}
+
+  ScopedVector<T> Run() {
+    return scoper_.Pass();
+  }
+
+ private:
+  ScopedVector<T> scoper_;
+};
+
+TEST(ScopedVectorTest, Passed) {
+  int deletes = 0;
+  ScopedVector<DeleteCounter> deleter_vector;
+  deleter_vector.push_back(new DeleteCounter(&deletes));
+  EXPECT_EQ(0, deletes);
+  PassThru<DeleteCounter> pass_thru(deleter_vector.Pass());
+  EXPECT_EQ(0, deletes);
+  ScopedVector<DeleteCounter> result = pass_thru.Run();
+  EXPECT_EQ(0, deletes);
+  result.clear();
+  EXPECT_EQ(1, deletes);
+};
+
+TEST(ScopedVectorTest, InsertRange) {
+  LifeCycleWatcher watchers[5];
+  size_t watchers_size = sizeof(watchers) / sizeof(*watchers);
+
+  std::vector<LifeCycleObject*> vec;
+  for (LifeCycleWatcher* it = watchers; it != watchers + watchers_size;
+       ++it) {
+    EXPECT_EQ(LC_INITIAL, it->life_cycle_state());
+    vec.push_back(it->NewLifeCycleObject());
+    EXPECT_EQ(LC_CONSTRUCTED, it->life_cycle_state());
+  }
+  // Start scope for ScopedVector.
+  {
+    ScopedVector<LifeCycleObject> scoped_vector;
+    scoped_vector.insert(scoped_vector.end(), vec.begin() + 1, vec.begin() + 3);
+    for (LifeCycleWatcher* it = watchers; it != watchers + watchers_size;
+         ++it)
+      EXPECT_EQ(LC_CONSTRUCTED, it->life_cycle_state());
+  }
+  for (LifeCycleWatcher* it = watchers; it != watchers + 1; ++it)
+    EXPECT_EQ(LC_CONSTRUCTED, it->life_cycle_state());
+  for (LifeCycleWatcher* it = watchers + 1; it != watchers + 3; ++it)
+    EXPECT_EQ(LC_DESTROYED, it->life_cycle_state());
+  for (LifeCycleWatcher* it = watchers + 3; it != watchers + watchers_size;
+      ++it)
+    EXPECT_EQ(LC_CONSTRUCTED, it->life_cycle_state());
+}
+
+}  // namespace
+}  // namespace webrtc
diff --git a/webrtc/system_wrappers/source/stl_util_unittest.cc b/webrtc/system_wrappers/source/stl_util_unittest.cc
new file mode 100644
index 0000000..e60a913
--- /dev/null
+++ b/webrtc/system_wrappers/source/stl_util_unittest.cc
@@ -0,0 +1,250 @@
+/*
+ *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+// Borrowed from Chromium's src/base/stl_util_unittest.cc
+#include "webrtc/system_wrappers/interface/stl_util.h"
+
+#include <set>
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace {
+
+// Used as test case to ensure the various base::STLXxx functions don't require
+// more than operators "<" and "==" on values stored in containers.
+class ComparableValue {
+ public:
+  explicit ComparableValue(int value) : value_(value) {}
+
+  bool operator==(const ComparableValue& rhs) const {
+    return value_ == rhs.value_;
+  }
+
+  bool operator<(const ComparableValue& rhs) const {
+    return value_ < rhs.value_;
+  }
+
+ private:
+  int value_;
+};
+
+}  // namespace
+
+namespace webrtc {
+namespace {
+
+TEST(STLUtilTest, STLIsSorted) {
+  {
+    std::set<int> set;
+    set.insert(24);
+    set.insert(1);
+    set.insert(12);
+    EXPECT_TRUE(STLIsSorted(set));
+  }
+
+  {
+    std::set<ComparableValue> set;
+    set.insert(ComparableValue(24));
+    set.insert(ComparableValue(1));
+    set.insert(ComparableValue(12));
+    EXPECT_TRUE(STLIsSorted(set));
+  }
+
+  {
+    std::vector<int> vector;
+    vector.push_back(1);
+    vector.push_back(1);
+    vector.push_back(4);
+    vector.push_back(64);
+    vector.push_back(12432);
+    EXPECT_TRUE(STLIsSorted(vector));
+    vector.back() = 1;
+    EXPECT_FALSE(STLIsSorted(vector));
+  }
+}
+
+TEST(STLUtilTest, STLSetDifference) {
+  std::set<int> a1;
+  a1.insert(1);
+  a1.insert(2);
+  a1.insert(3);
+  a1.insert(4);
+
+  std::set<int> a2;
+  a2.insert(3);
+  a2.insert(4);
+  a2.insert(5);
+  a2.insert(6);
+  a2.insert(7);
+
+  {
+    std::set<int> difference;
+    difference.insert(1);
+    difference.insert(2);
+    EXPECT_EQ(difference, STLSetDifference<std::set<int> >(a1, a2));
+  }
+
+  {
+    std::set<int> difference;
+    difference.insert(5);
+    difference.insert(6);
+    difference.insert(7);
+    EXPECT_EQ(difference, STLSetDifference<std::set<int> >(a2, a1));
+  }
+
+  {
+    std::vector<int> difference;
+    difference.push_back(1);
+    difference.push_back(2);
+    EXPECT_EQ(difference, STLSetDifference<std::vector<int> >(a1, a2));
+  }
+
+  {
+    std::vector<int> difference;
+    difference.push_back(5);
+    difference.push_back(6);
+    difference.push_back(7);
+    EXPECT_EQ(difference, STLSetDifference<std::vector<int> >(a2, a1));
+  }
+}
+
+TEST(STLUtilTest, STLSetUnion) {
+  std::set<int> a1;
+  a1.insert(1);
+  a1.insert(2);
+  a1.insert(3);
+  a1.insert(4);
+
+  std::set<int> a2;
+  a2.insert(3);
+  a2.insert(4);
+  a2.insert(5);
+  a2.insert(6);
+  a2.insert(7);
+
+  {
+    std::set<int> result;
+    result.insert(1);
+    result.insert(2);
+    result.insert(3);
+    result.insert(4);
+    result.insert(5);
+    result.insert(6);
+    result.insert(7);
+    EXPECT_EQ(result, STLSetUnion<std::set<int> >(a1, a2));
+  }
+
+  {
+    std::set<int> result;
+    result.insert(1);
+    result.insert(2);
+    result.insert(3);
+    result.insert(4);
+    result.insert(5);
+    result.insert(6);
+    result.insert(7);
+    EXPECT_EQ(result, STLSetUnion<std::set<int> >(a2, a1));
+  }
+
+  {
+    std::vector<int> result;
+    result.push_back(1);
+    result.push_back(2);
+    result.push_back(3);
+    result.push_back(4);
+    result.push_back(5);
+    result.push_back(6);
+    result.push_back(7);
+    EXPECT_EQ(result, STLSetUnion<std::vector<int> >(a1, a2));
+  }
+
+  {
+    std::vector<int> result;
+    result.push_back(1);
+    result.push_back(2);
+    result.push_back(3);
+    result.push_back(4);
+    result.push_back(5);
+    result.push_back(6);
+    result.push_back(7);
+    EXPECT_EQ(result, STLSetUnion<std::vector<int> >(a2, a1));
+  }
+}
+
+TEST(STLUtilTest, STLSetIntersection) {
+  std::set<int> a1;
+  a1.insert(1);
+  a1.insert(2);
+  a1.insert(3);
+  a1.insert(4);
+
+  std::set<int> a2;
+  a2.insert(3);
+  a2.insert(4);
+  a2.insert(5);
+  a2.insert(6);
+  a2.insert(7);
+
+  {
+    std::set<int> result;
+    result.insert(3);
+    result.insert(4);
+    EXPECT_EQ(result, STLSetIntersection<std::set<int> >(a1, a2));
+  }
+
+  {
+    std::set<int> result;
+    result.insert(3);
+    result.insert(4);
+    EXPECT_EQ(result, STLSetIntersection<std::set<int> >(a2, a1));
+  }
+
+  {
+    std::vector<int> result;
+    result.push_back(3);
+    result.push_back(4);
+    EXPECT_EQ(result, STLSetIntersection<std::vector<int> >(a1, a2));
+  }
+
+  {
+    std::vector<int> result;
+    result.push_back(3);
+    result.push_back(4);
+    EXPECT_EQ(result, STLSetIntersection<std::vector<int> >(a2, a1));
+  }
+}
+
+TEST(STLUtilTest, STLIncludes) {
+  std::set<int> a1;
+  a1.insert(1);
+  a1.insert(2);
+  a1.insert(3);
+  a1.insert(4);
+
+  std::set<int> a2;
+  a2.insert(3);
+  a2.insert(4);
+
+  std::set<int> a3;
+  a3.insert(3);
+  a3.insert(4);
+  a3.insert(5);
+
+  EXPECT_TRUE(STLIncludes<std::set<int> >(a1, a2));
+  EXPECT_FALSE(STLIncludes<std::set<int> >(a1, a3));
+  EXPECT_FALSE(STLIncludes<std::set<int> >(a2, a1));
+  EXPECT_FALSE(STLIncludes<std::set<int> >(a2, a3));
+  EXPECT_FALSE(STLIncludes<std::set<int> >(a3, a1));
+  EXPECT_TRUE(STLIncludes<std::set<int> >(a3, a2));
+}
+
+}  // namespace
+}  // namespace webrtc
+
diff --git a/webrtc/system_wrappers/source/system_wrappers.gyp b/webrtc/system_wrappers/source/system_wrappers.gyp
index cc79f0b..2deefaa 100644
--- a/webrtc/system_wrappers/source/system_wrappers.gyp
+++ b/webrtc/system_wrappers/source/system_wrappers.gyp
@@ -43,9 +43,11 @@
         '../interface/rw_lock_wrapper.h',
         '../interface/scoped_ptr.h',
         '../interface/scoped_refptr.h',
+        '../interface/scoped_vector.h',
         '../interface/sleep.h',
         '../interface/sort.h',
         '../interface/static_instance.h',
+        '../interface/stl_util.h',
         '../interface/stringize_macros.h',
         '../interface/thread_annotations.h',
         '../interface/thread_wrapper.h',
diff --git a/webrtc/system_wrappers/source/system_wrappers_tests.gyp b/webrtc/system_wrappers/source/system_wrappers_tests.gyp
index 06737d2..91ff028 100644
--- a/webrtc/system_wrappers/source/system_wrappers_tests.gyp
+++ b/webrtc/system_wrappers/source/system_wrappers_tests.gyp
@@ -29,7 +29,9 @@
         'data_log_helpers_unittest.cc',
         'data_log_c_helpers_unittest.c',
         'data_log_c_helpers_unittest.h',
+        'scoped_vector_unittest.cc',
         'stringize_macros_unittest.cc',
+        'stl_util_unittest.cc',
         'thread_unittest.cc',
         'thread_posix_unittest.cc',
         'unittest_utilities_unittest.cc',