Pull the new r369476 of base library from Chromium

The merge was done against r369476 which corresponds to git commit
0471d0e2e2ef4a544a63481a389e1df33ea7c00a of Jan 14, 2016

Change-Id: Ie6894cf65424cc5ad115110faccd51602b2d1234
Reviewed-on: https://weave-review.googlesource.com/2225
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
diff --git a/third_party/chromium/base/values_unittest.cc b/third_party/chromium/base/values_unittest.cc
index d246691..b5e47dd 100644
--- a/third_party/chromium/base/values_unittest.cc
+++ b/third_party/chromium/base/values_unittest.cc
@@ -2,7 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+
 #include <limits>
+#include <utility>
 
 #include <gtest/gtest.h>
 
@@ -34,13 +37,13 @@
     settings.GetList("global.toolbar.bookmarks", &toolbar_bookmarks));
 
   scoped_ptr<ListValue> new_toolbar_bookmarks(new ListValue);
-  settings.Set("global.toolbar.bookmarks", new_toolbar_bookmarks.Pass());
+  settings.Set("global.toolbar.bookmarks", std::move(new_toolbar_bookmarks));
   ASSERT_TRUE(settings.GetList("global.toolbar.bookmarks", &toolbar_bookmarks));
 
   scoped_ptr<DictionaryValue> new_bookmark(new DictionaryValue);
   new_bookmark->SetString("name", "Froogle");
   new_bookmark->SetString("url", "http://froogle.com");
-  toolbar_bookmarks->Append(new_bookmark.Pass());
+  toolbar_bookmarks->Append(std::move(new_bookmark));
 
   ListValue* bookmark_list;
   ASSERT_TRUE(settings.GetList("global.toolbar.bookmarks", &bookmark_list));
@@ -114,7 +117,7 @@
   // Test the common case of a non-empty buffer
   scoped_ptr<char[]> buffer(new char[15]);
   char* original_buffer = buffer.get();
-  binary.reset(new BinaryValue(buffer.Pass(), 15));
+  binary.reset(new BinaryValue(std::move(buffer), 15));
   ASSERT_TRUE(binary.get());
   ASSERT_TRUE(binary->GetBuffer());
   ASSERT_EQ(original_buffer, binary->GetBuffer());
@@ -236,7 +239,7 @@
     ListValue list;
     scoped_ptr<DeletionTestValue> value(new DeletionTestValue(&deletion_flag));
     DeletionTestValue* original_value = value.get();
-    list.Append(value.Pass());
+    list.Append(std::move(value));
     EXPECT_FALSE(deletion_flag);
     size_t index = 0;
     list.Remove(*original_value, &index);
@@ -379,41 +382,41 @@
   DictionaryValue original_dict;
   scoped_ptr<Value> scoped_null = Value::CreateNullValue();
   Value* original_null = scoped_null.get();
-  original_dict.Set("null", scoped_null.Pass());
+  original_dict.Set("null", std::move(scoped_null));
   scoped_ptr<FundamentalValue> scoped_bool(new FundamentalValue(true));
   FundamentalValue* original_bool = scoped_bool.get();
-  original_dict.Set("bool", scoped_bool.Pass());
+  original_dict.Set("bool", std::move(scoped_bool));
   scoped_ptr<FundamentalValue> scoped_int(new FundamentalValue(42));
   FundamentalValue* original_int = scoped_int.get();
-  original_dict.Set("int", scoped_int.Pass());
+  original_dict.Set("int", std::move(scoped_int));
   scoped_ptr<FundamentalValue> scoped_double(new FundamentalValue(3.14));
   FundamentalValue* original_double = scoped_double.get();
-  original_dict.Set("double", scoped_double.Pass());
+  original_dict.Set("double", std::move(scoped_double));
   scoped_ptr<StringValue> scoped_string(new StringValue("hello"));
   StringValue* original_string = scoped_string.get();
-  original_dict.Set("string", scoped_string.Pass());
+  original_dict.Set("string", std::move(scoped_string));
 
   scoped_ptr<char[]> original_buffer(new char[42]);
   memset(original_buffer.get(), '!', 42);
   scoped_ptr<BinaryValue> scoped_binary(
-      new BinaryValue(original_buffer.Pass(), 42));
+      new BinaryValue(std::move(original_buffer), 42));
   BinaryValue* original_binary = scoped_binary.get();
-  original_dict.Set("binary", scoped_binary.Pass());
+  original_dict.Set("binary", std::move(scoped_binary));
 
   scoped_ptr<ListValue> scoped_list(new ListValue());
   Value* original_list = scoped_list.get();
   scoped_ptr<FundamentalValue> scoped_list_element_0(new FundamentalValue(0));
   Value* original_list_element_0 = scoped_list_element_0.get();
-  scoped_list->Append(scoped_list_element_0.Pass());
+  scoped_list->Append(std::move(scoped_list_element_0));
   scoped_ptr<FundamentalValue> scoped_list_element_1(new FundamentalValue(1));
   Value* original_list_element_1 = scoped_list_element_1.get();
-  scoped_list->Append(scoped_list_element_1.Pass());
-  original_dict.Set("list", scoped_list.Pass());
+  scoped_list->Append(std::move(scoped_list_element_1));
+  original_dict.Set("list", std::move(scoped_list));
 
   scoped_ptr<DictionaryValue> scoped_nested_dictionary(new DictionaryValue());
   Value* original_nested_dictionary = scoped_nested_dictionary.get();
   scoped_nested_dictionary->SetString("key", "value");
-  original_dict.Set("dictionary", scoped_nested_dictionary.Pass());
+  original_dict.Set("dictionary", std::move(scoped_nested_dictionary));
 
   scoped_ptr<DictionaryValue> copy_dict = original_dict.CreateDeepCopy();
   ASSERT_TRUE(copy_dict.get());
@@ -534,9 +537,9 @@
   list->Append(make_scoped_ptr(new DictionaryValue));
   scoped_ptr<Value> list_copy(list->CreateDeepCopy());
 
-  dv.Set("f", list.Pass());
+  dv.Set("f", std::move(list));
   EXPECT_FALSE(dv.Equals(copy.get()));
-  copy->Set("f", list_copy.Pass());
+  copy->Set("f", std::move(list_copy));
   EXPECT_TRUE(dv.Equals(copy.get()));
 
   original_list->Append(make_scoped_ptr(new FundamentalValue(true)));
@@ -577,34 +580,34 @@
   DictionaryValue original_dict;
   scoped_ptr<Value> scoped_null(Value::CreateNullValue());
   Value* original_null = scoped_null.get();
-  original_dict.Set("null", scoped_null.Pass());
+  original_dict.Set("null", std::move(scoped_null));
   scoped_ptr<FundamentalValue> scoped_bool(new FundamentalValue(true));
   Value* original_bool = scoped_bool.get();
-  original_dict.Set("bool", scoped_bool.Pass());
+  original_dict.Set("bool", std::move(scoped_bool));
   scoped_ptr<FundamentalValue> scoped_int(new FundamentalValue(42));
   Value* original_int = scoped_int.get();
-  original_dict.Set("int", scoped_int.Pass());
+  original_dict.Set("int", std::move(scoped_int));
   scoped_ptr<FundamentalValue> scoped_double(new FundamentalValue(3.14));
   Value* original_double = scoped_double.get();
-  original_dict.Set("double", scoped_double.Pass());
+  original_dict.Set("double", std::move(scoped_double));
   scoped_ptr<StringValue> scoped_string(new StringValue("hello"));
   Value* original_string = scoped_string.get();
-  original_dict.Set("string", scoped_string.Pass());
+  original_dict.Set("string", std::move(scoped_string));
 
   scoped_ptr<char[]> original_buffer(new char[42]);
   memset(original_buffer.get(), '!', 42);
   scoped_ptr<BinaryValue> scoped_binary(
-      new BinaryValue(original_buffer.Pass(), 42));
+      new BinaryValue(std::move(original_buffer), 42));
   Value* original_binary = scoped_binary.get();
-  original_dict.Set("binary", scoped_binary.Pass());
+  original_dict.Set("binary", std::move(scoped_binary));
 
   scoped_ptr<ListValue> scoped_list(new ListValue());
   Value* original_list = scoped_list.get();
   scoped_ptr<FundamentalValue> scoped_list_element_0(new FundamentalValue(0));
-  scoped_list->Append(scoped_list_element_0.Pass());
+  scoped_list->Append(std::move(scoped_list_element_0));
   scoped_ptr<FundamentalValue> scoped_list_element_1(new FundamentalValue(1));
-  scoped_list->Append(scoped_list_element_1.Pass());
-  original_dict.Set("list", scoped_list.Pass());
+  scoped_list->Append(std::move(scoped_list_element_1));
+  original_dict.Set("list", std::move(scoped_list));
 
   scoped_ptr<Value> copy_dict = original_dict.CreateDeepCopy();
   scoped_ptr<Value> copy_null = original_null->CreateDeepCopy();
@@ -657,7 +660,7 @@
     scoped_ptr<DictionaryValue> inner(new DictionaryValue);
     inner->Set("empty_dict", make_scoped_ptr(new DictionaryValue));
     inner->Set("empty_list", make_scoped_ptr(new ListValue));
-    root->Set("dict_with_empty_children", inner.Pass());
+    root->Set("dict_with_empty_children", std::move(inner));
     root = root->DeepCopyWithoutEmptyChildren();
     EXPECT_EQ(2U, root->size());
   }
@@ -665,7 +668,7 @@
     scoped_ptr<ListValue> inner(new ListValue);
     inner->Append(make_scoped_ptr(new DictionaryValue));
     inner->Append(make_scoped_ptr(new ListValue));
-    root->Set("list_with_empty_children", inner.Pass());
+    root->Set("list_with_empty_children", std::move(inner));
     root = root->DeepCopyWithoutEmptyChildren();
     EXPECT_EQ(2U, root->size());
   }
@@ -675,11 +678,11 @@
     scoped_ptr<ListValue> inner(new ListValue());
     inner->Append(make_scoped_ptr(new DictionaryValue));
     inner->Append(make_scoped_ptr(new ListValue));
-    root->Set("list_with_empty_children", inner.Pass());
+    root->Set("list_with_empty_children", std::move(inner));
     scoped_ptr<DictionaryValue> inner2(new DictionaryValue);
     inner2->Set("empty_dict", make_scoped_ptr(new DictionaryValue));
     inner2->Set("empty_list", make_scoped_ptr(new ListValue));
-    root->Set("dict_with_empty_children", inner2.Pass());
+    root->Set("dict_with_empty_children", std::move(inner2));
     root = root->DeepCopyWithoutEmptyChildren();
     EXPECT_EQ(2U, root->size());
   }
@@ -690,8 +693,8 @@
     scoped_ptr<ListValue> inner2(new ListValue);
     inner2->Append(make_scoped_ptr(new StringValue("hello")));
     inner->Append(make_scoped_ptr(new DictionaryValue));
-    inner->Append(inner2.Pass());
-    root->Set("list_with_empty_children", inner.Pass());
+    inner->Append(std::move(inner2));
+    root->Set("list_with_empty_children", std::move(inner));
     root = root->DeepCopyWithoutEmptyChildren();
     EXPECT_EQ(3U, root->size());
 
@@ -710,7 +713,7 @@
   scoped_ptr<DictionaryValue> base_sub_dict(new DictionaryValue);
   base_sub_dict->SetString("sub_base_key", "sub_base_key_value_base");
   base_sub_dict->SetString("sub_collide_key", "sub_collide_key_value_base");
-  base->Set("sub_dict_key", base_sub_dict.Pass());
+  base->Set("sub_dict_key", std::move(base_sub_dict));
 
   scoped_ptr<DictionaryValue> merge(new DictionaryValue);
   merge->SetString("merge_key", "merge_key_value_merge");
@@ -718,7 +721,7 @@
   scoped_ptr<DictionaryValue> merge_sub_dict(new DictionaryValue);
   merge_sub_dict->SetString("sub_merge_key", "sub_merge_key_value_merge");
   merge_sub_dict->SetString("sub_collide_key", "sub_collide_key_value_merge");
-  merge->Set("sub_dict_key", merge_sub_dict.Pass());
+  merge->Set("sub_dict_key", std::move(merge_sub_dict));
 
   base->MergeDictionary(merge.get());
 
@@ -759,7 +762,7 @@
   EXPECT_EQ("value", value);
 
   scoped_ptr<DictionaryValue> base(new DictionaryValue);
-  base->Set("dict", child.Pass());
+  base->Set("dict", std::move(child));
   EXPECT_EQ(1U, base->size());
 
   DictionaryValue* ptr;