Revert recent changes to base::Value

Reverts:
98223: base: Add AsList() function to Value API.
98266: base: Add AsBinary() function to Value API.

There are two issues with these commits:
1. libcros uses base::Value to pass data to Chrome. It includes values.h from libchrome which contains its own copy. This is a terrible design flaw in libcros and is being addressed (http://crosbug.com/19576), however we need some time to address this before we can make these changes without breaking Chrome on ChromeOS.

2. AsList() and AsBinary() should be const. The fact that they were not const caused re-factoring that changed const Value& input arguments to Value*, which is against the spec. When we re-introduce this, these members should be made const.

BUG=chromium-os:19604
TEST=Check bots + ChromeOS autotests

Review URL: http://codereview.chromium.org/7753020

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98378 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: 0de764e26db70294974f67061ab2d991c739e27f
diff --git a/base/values_unittest.cc b/base/values_unittest.cc
index 0ca19d9..553e8e1 100644
--- a/base/values_unittest.cc
+++ b/base/values_unittest.cc
@@ -416,20 +416,21 @@
   ASSERT_TRUE(copy_dict->Get("binary", &copy_binary));
   ASSERT_TRUE(copy_binary);
   ASSERT_NE(copy_binary, original_binary);
-  BinaryValue* binary_value = copy_binary->AsBinary();
-  ASSERT_TRUE(binary_value);
-  ASSERT_NE(original_binary->GetBuffer(), binary_value->GetBuffer());
-  ASSERT_EQ(original_binary->GetSize(), binary_value->GetSize());
+  ASSERT_TRUE(copy_binary->IsType(Value::TYPE_BINARY));
+  ASSERT_NE(original_binary->GetBuffer(),
+    static_cast<BinaryValue*>(copy_binary)->GetBuffer());
+  ASSERT_EQ(original_binary->GetSize(),
+    static_cast<BinaryValue*>(copy_binary)->GetSize());
   ASSERT_EQ(0, memcmp(original_binary->GetBuffer(),
-                      binary_value->GetBuffer(),
-                      original_binary->GetSize()));
+               static_cast<BinaryValue*>(copy_binary)->GetBuffer(),
+               original_binary->GetSize()));
 
   Value* copy_value = NULL;
   ASSERT_TRUE(copy_dict->Get("list", &copy_value));
   ASSERT_TRUE(copy_value);
   ASSERT_NE(copy_value, original_list);
-  ListValue* copy_list = copy_value->AsList();
-  ASSERT_TRUE(copy_list != NULL);
+  ASSERT_TRUE(copy_value->IsType(Value::TYPE_LIST));
+  ListValue* copy_list = static_cast<ListValue*>(copy_value);
   ASSERT_EQ(2U, copy_list->GetSize());
 
   Value* copy_list_element_0;