Revert dsh's change 10818

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


CrOS-Libchrome-Original-Commit: 6470ee8f59dba5eecfce4a64d7ff3930ae716095
diff --git a/base/json_reader.cc b/base/json_reader.cc
index e4dc61c..b5013ef 100644
--- a/base/json_reader.cc
+++ b/base/json_reader.cc
@@ -277,8 +277,7 @@
           Value* dict_value = BuildValue(false);
           if (!dict_value)
             return NULL;
-          static_cast<DictionaryValue*>(node.get())->Set(
-              WideToUTF16Hack(dict_key), dict_value);
+          static_cast<DictionaryValue*>(node.get())->Set(dict_key, dict_value);
 
           // After a key/value pair, we expect a comma or the end of the
           // object.
diff --git a/base/json_reader_unittest.cc b/base/json_reader_unittest.cc
index b77f9d5..9153289 100644
--- a/base/json_reader_unittest.cc
+++ b/base/json_reader_unittest.cc
@@ -5,7 +5,6 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "base/json_reader.h"
 #include "base/scoped_ptr.h"
-#include "base/string_util.h"
 #include "base/values.h"
 #include "build/build_config.h"
 
@@ -298,14 +297,14 @@
   ASSERT_TRUE(root->IsType(Value::TYPE_DICTIONARY));
   DictionaryValue* dict_val = static_cast<DictionaryValue*>(root.get());
   real_val = 0.0;
-  ASSERT_TRUE(dict_val->GetReal(LIT16("number"), &real_val));
+  ASSERT_TRUE(dict_val->GetReal(L"number", &real_val));
   ASSERT_DOUBLE_EQ(9.87654321, real_val);
   Value* null_val = NULL;
-  ASSERT_TRUE(dict_val->Get(LIT16("null"), &null_val));
+  ASSERT_TRUE(dict_val->Get(L"null", &null_val));
   ASSERT_TRUE(null_val->IsType(Value::TYPE_NULL));
-  string16 str16_val;
-  ASSERT_TRUE(dict_val->GetString(LIT16("S"), &str16_val));
-  ASSERT_EQ(LIT16("str"), str16_val);
+  str_val.clear();
+  ASSERT_TRUE(dict_val->GetString(L"S", &str_val));
+  ASSERT_EQ(L"str", str_val);
 
   root2.reset(JSONReader::Read(
     "{\"number\":9.87654321, \"null\":null , \"\\x53\" : \"str\", }", true));
@@ -318,15 +317,15 @@
   ASSERT_TRUE(root->IsType(Value::TYPE_DICTIONARY));
   dict_val = static_cast<DictionaryValue*>(root.get());
   DictionaryValue* inner_dict = NULL;
-  ASSERT_TRUE(dict_val->GetDictionary(LIT16("inner"), &inner_dict));
+  ASSERT_TRUE(dict_val->GetDictionary(L"inner", &inner_dict));
   ListValue* inner_array = NULL;
-  ASSERT_TRUE(inner_dict->GetList(LIT16("array"), &inner_array));
+  ASSERT_TRUE(inner_dict->GetList(L"array", &inner_array));
   ASSERT_EQ(1U, inner_array->GetSize());
   bool_value = true;
-  ASSERT_TRUE(dict_val->GetBoolean(LIT16("false"), &bool_value));
+  ASSERT_TRUE(dict_val->GetBoolean(L"false", &bool_value));
   ASSERT_FALSE(bool_value);
   inner_dict = NULL;
-  ASSERT_TRUE(dict_val->GetDictionary(LIT16("d"), &inner_dict));
+  ASSERT_TRUE(dict_val->GetDictionary(L"d", &inner_dict));
 
   root2.reset(JSONReader::Read(
     "{\"inner\": {\"array\":[true] , },\"false\":false,\"d\":{},}", true));
diff --git a/base/json_writer.cc b/base/json_writer.cc
index 56efce9..20c533b 100644
--- a/base/json_writer.cc
+++ b/base/json_writer.cc
@@ -76,7 +76,7 @@
         std::wstring value;
         bool result = node->GetAsString(&value);
         DCHECK(result);
-        AppendQuotedString(WideToUTF16Hack(value));
+        AppendQuotedString(value);
         break;
       }
 
@@ -155,8 +155,8 @@
   }
 }
 
-void JSONWriter::AppendQuotedString(const string16& str) {
-  string_escape::JavascriptDoubleQuote(str, true,
+void JSONWriter::AppendQuotedString(const std::wstring& str) {
+  string_escape::JavascriptDoubleQuote(WideToUTF16Hack(str), true,
                                        json_string_);
 }
 
diff --git a/base/json_writer.h b/base/json_writer.h
index 330e73c..42232bf 100644
--- a/base/json_writer.h
+++ b/base/json_writer.h
@@ -5,8 +5,9 @@
 #ifndef BASE_JSON_WRITER_H_
 #define BASE_JSON_WRITER_H_
 
+#include <string>
+
 #include "base/basictypes.h"
-#include "base/string16.h"
 
 class Value;
 
@@ -30,7 +31,7 @@
   void BuildJSONString(const Value* const node, int depth);
 
   // Appends a quoted, escaped, version of str to json_string_.
-  void AppendQuotedString(const string16& str);
+  void AppendQuotedString(const std::wstring& str);
 
   // Adds space to json_string_ for the indent level.
   void IndentLine(int depth);
@@ -44,3 +45,4 @@
 };
 
 #endif  // BASE_JSON_WRITER_H_
+
diff --git a/base/json_writer_unittest.cc b/base/json_writer_unittest.cc
index a273250..cddfd4c 100644
--- a/base/json_writer_unittest.cc
+++ b/base/json_writer_unittest.cc
@@ -4,7 +4,6 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 #include "base/json_writer.h"
-#include "base/string_util.h"
 #include "base/values.h"
 
 TEST(JSONWriterTest, Writing) {
@@ -37,10 +36,10 @@
   // list list nesting, etc.
   DictionaryValue root_dict;
   ListValue* list = new ListValue;
-  root_dict.Set(LIT16("list"), list);
+  root_dict.Set(L"list", list);
   DictionaryValue* inner_dict = new DictionaryValue;
   list->Append(inner_dict);
-  inner_dict->SetInteger(LIT16("inner int"), 10);
+  inner_dict->SetInteger(L"inner int", 10);
   ListValue* inner_list = new ListValue;
   list->Append(inner_list);
   list->Append(Value::CreateBooleanValue(true));
@@ -55,3 +54,5 @@
             "}\r\n",
             output_js);
 }
+
+
diff --git a/base/string_util.cc b/base/string_util.cc
index b845c45..a13f79f 100644
--- a/base/string_util.cc
+++ b/base/string_util.cc
@@ -1039,10 +1039,6 @@
   return IntToStringT<std::string, int, unsigned int, true>::
       IntToString(value);
 }
-string16 IntToString16(int value) {
-  return IntToStringT<string16, int, unsigned int, true>::
-      IntToString(value);
-}
 std::wstring IntToWString(int value) {
   return IntToStringT<std::wstring, int, unsigned int, true>::
       IntToString(value);
@@ -1051,10 +1047,6 @@
   return IntToStringT<std::string, unsigned int, unsigned int, false>::
       IntToString(value);
 }
-string16 UintToString16(unsigned int value) {
-  return IntToStringT<string16, unsigned int, unsigned int, false>::
-      IntToString(value);
-}
 std::wstring UintToWString(unsigned int value) {
   return IntToStringT<std::wstring, unsigned int, unsigned int, false>::
       IntToString(value);
@@ -1063,10 +1055,6 @@
   return IntToStringT<std::string, int64, uint64, true>::
       IntToString(value);
 }
-string16 Int64ToString16(int64 value) {
-  return IntToStringT<string16, int64, uint64, true>::
-      IntToString(value);
-}
 std::wstring Int64ToWString(int64 value) {
   return IntToStringT<std::wstring, int64, uint64, true>::
       IntToString(value);
@@ -1075,10 +1063,6 @@
   return IntToStringT<std::string, uint64, uint64, false>::
       IntToString(value);
 }
-string16 Uint64ToString16(uint64 value) {
-  return IntToStringT<string16, uint64, uint64, false>::
-      IntToString(value);
-}
 std::wstring Uint64ToWString(uint64 value) {
   return IntToStringT<std::wstring, uint64, uint64, false>::
       IntToString(value);
@@ -1091,10 +1075,6 @@
   return std::string(buffer);
 }
 
-string16 DoubleToWString16(double value) {
-  return UTF8ToUTF16(DoubleToString(value));
-}
-
 std::wstring DoubleToWString(double value) {
   return ASCIIToWide(DoubleToString(value));
 }
@@ -1600,52 +1580,6 @@
   return result;
 }
 
-#if !defined(WCHAR_T_IS_UTF16)
-bool StringToInt(const string16& input, int* output) {
-  return StringToInt(UTF16ToWideHack(input), output);
-}
-
-bool StringToInt64(const string16& input, int64* output) {
-  return StringToInt64(UTF16ToWideHack(input), output);
-}
-
-bool HexStringToInt(const string16& input, int* output) {
-  return HexStringToInt(UTF16ToWideHack(input), output);
-}
-
-int StringToInt(const string16& value) {
-  int result;
-  StringToInt(value, &result);
-  return result;
-}
-
-int64 StringToInt64(const string16& value) {
-  int64 result;
-  StringToInt64(value, &result);
-  return result;
-}
-
-int HexStringToInt(const string16& value) {
-  int result;
-  HexStringToInt(value, &result);
-  return result;
-}
-
-bool StringToDouble(const string16& input, double* output) {
-  return StringToDouble(UTF16ToWideHack(input), output);
-}
-
-double StringToDouble(const string16& value) {
-  double result;
-  StringToDouble(value, &result);
-  return result;
-}
-
-bool HexStringToBytes(const string16& input, std::vector<uint8>* output) {
-  return HexStringToBytesT(input, output);
-}
-#endif  // !defined(WCHAR_T_IS_UTF16)
-
 // The following code is compatible with the OpenBSD lcpy interface.  See:
 //   http://www.gratisoft.us/todd/papers/strlcpy.html
 //   ftp://ftp.openbsd.org/pub/OpenBSD/src/lib/libc/string/{wcs,str}lcpy.c
diff --git a/base/string_util.h b/base/string_util.h
index a775092..26c42e5 100644
--- a/base/string_util.h
+++ b/base/string_util.h
@@ -15,13 +15,6 @@
 #include "base/basictypes.h"
 #include "base/string16.h"
 
-// Deal with string literals on different platforms
-#if defined(OS_WIN)
-# define LIT16(s) L##s
-#else
-# define LIT16(s) WideToUTF16(L##s)
-#endif
-
 // Safe standard library wrappers for all platforms.
 
 namespace base {
@@ -196,7 +189,7 @@
 // really should just be passing a string16 around, but we haven't finished
 // porting whatever module uses wstring and the conversion is being used as a
 // stopcock.  This makes it easy to grep for the ones that should be removed.
-#if defined(WCHAR_T_IS_UTF16)
+#if defined(OS_WIN)
 # define WideToUTF16Hack
 # define UTF16ToWideHack
 #else
@@ -392,21 +385,16 @@
 
 // Specialized string-conversion functions.
 std::string IntToString(int value);
-string16 IntToString16(int value);
 std::wstring IntToWString(int value);
 std::string UintToString(unsigned int value);
-string16 UintToString16(unsigned int value);
 std::wstring UintToWString(unsigned int value);
 std::string Int64ToString(int64 value);
-string16 Int64ToString16(int64 value);
 std::wstring Int64ToWString(int64 value);
 std::string Uint64ToString(uint64 value);
-string16 Uint64ToString16(uint64 value);
 std::wstring Uint64ToWString(uint64 value);
 // The DoubleToString methods convert the double to a string format that
 // ignores the locale.  If you want to use locale specific formatting, use ICU.
 std::string DoubleToString(double value);
-string16 DoubleToString16(double value);
 std::wstring DoubleToWString(double value);
 
 // Perform a best-effort conversion of the input string to a numeric type,
@@ -454,18 +442,6 @@
 double StringToDouble(const std::string& value);
 double StringToDouble(const string16& value);
 
-#if !defined(WCHAR_T_IS_UTF16)
-bool StringToInt(const string16& input, int* output);
-bool StringToInt64(const string16& input, int64* output);
-bool HexStringToInt(const string16& input, int* output);
-bool HexStringToBytes(const string16& input, std::vector<uint8>* output);
-bool StringToDouble(const string16& input, double* output);
-int StringToInt(const string16& value);
-int64 StringToInt64(const string16& value);
-int HexStringToInt(const string16& value);
-double StringToDouble(const string16& value);
-#endif
-
 // Return a C++ string given printf-like input.
 std::string StringPrintf(const char* format, ...);
 std::wstring StringPrintf(const wchar_t* format, ...);
diff --git a/base/values.cc b/base/values.cc
index 29a5896..cf98c0b 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -245,13 +245,13 @@
   dictionary_.clear();
 }
 
-bool DictionaryValue::HasKey(const string16& key) const {
+bool DictionaryValue::HasKey(const std::wstring& key) const {
   ValueMap::const_iterator current_entry = dictionary_.find(key);
   DCHECK((current_entry == dictionary_.end()) || current_entry->second);
   return current_entry != dictionary_.end();
 }
 
-void DictionaryValue::SetInCurrentNode(const string16& key,
+void DictionaryValue::SetInCurrentNode(const std::wstring& key,
                                        Value* in_value) {
   // If there's an existing value here, we need to delete it, because
   // we own all our children.
@@ -263,12 +263,12 @@
   dictionary_[key] = in_value;
 }
 
-bool DictionaryValue::Set(const string16& path, Value* in_value) {
+bool DictionaryValue::Set(const std::wstring& path, Value* in_value) {
   DCHECK(in_value);
 
-  string16 key = path;
+  std::wstring key = path;
 
-  size_t delimiter_position = path.find_first_of('.', 0);
+  size_t delimiter_position = path.find_first_of(L".", 0);
   // If there isn't a dictionary delimiter in the path, we're done.
   if (delimiter_position == std::wstring::npos) {
     SetInCurrentNode(key, in_value);
@@ -286,37 +286,37 @@
     entry = static_cast<DictionaryValue*>(dictionary_[key]);
   }
 
-  string16 remaining_path = path.substr(delimiter_position + 1);
+  std::wstring remaining_path = path.substr(delimiter_position + 1);
   return entry->Set(remaining_path, in_value);
 }
 
-bool DictionaryValue::SetBoolean(const string16& path, bool in_value) {
+bool DictionaryValue::SetBoolean(const std::wstring& path, bool in_value) {
   return Set(path, CreateBooleanValue(in_value));
 }
 
-bool DictionaryValue::SetInteger(const string16& path, int in_value) {
+bool DictionaryValue::SetInteger(const std::wstring& path, int in_value) {
   return Set(path, CreateIntegerValue(in_value));
 }
 
-bool DictionaryValue::SetReal(const string16& path, double in_value) {
+bool DictionaryValue::SetReal(const std::wstring& path, double in_value) {
   return Set(path, CreateRealValue(in_value));
 }
 
-bool DictionaryValue::SetString(const string16& path,
+bool DictionaryValue::SetString(const std::wstring& path,
                                 const std::string& in_value) {
   return Set(path, CreateStringValue(in_value));
 }
 
-bool DictionaryValue::SetString(const string16& path,
-                                const string16& in_value) {
-  return Set(path, CreateStringValue(UTF16ToWideHack(in_value)));
+bool DictionaryValue::SetString(const std::wstring& path,
+                                const std::wstring& in_value) {
+  return Set(path, CreateStringValue(in_value));
 }
 
-bool DictionaryValue::Get(const string16& path, Value** out_value) const {
-  string16 key = path;
+bool DictionaryValue::Get(const std::wstring& path, Value** out_value) const {
+  std::wstring key = path;
 
-  size_t delimiter_position = path.find_first_of('.', 0);
-  if (delimiter_position != string16::npos) {
+  size_t delimiter_position = path.find_first_of(L".", 0);
+  if (delimiter_position != std::wstring::npos) {
     key = path.substr(0, delimiter_position);
   }
 
@@ -325,7 +325,7 @@
     return false;
   Value* entry = entry_iterator->second;
 
-  if (delimiter_position == string16::npos) {
+  if (delimiter_position == std::wstring::npos) {
     if (out_value)
       *out_value = entry;
     return true;
@@ -339,7 +339,7 @@
   return false;
 }
 
-bool DictionaryValue::GetBoolean(const string16& path,
+bool DictionaryValue::GetBoolean(const std::wstring& path,
                                  bool* bool_value) const {
   Value* value;
   if (!Get(path, &value))
@@ -348,7 +348,7 @@
   return value->GetAsBoolean(bool_value);
 }
 
-bool DictionaryValue::GetInteger(const string16& path,
+bool DictionaryValue::GetInteger(const std::wstring& path,
                                  int* out_value) const {
   Value* value;
   if (!Get(path, &value))
@@ -357,7 +357,7 @@
   return value->GetAsInteger(out_value);
 }
 
-bool DictionaryValue::GetReal(const string16& path,
+bool DictionaryValue::GetReal(const std::wstring& path,
                               double* out_value) const {
   Value* value;
   if (!Get(path, &value))
@@ -366,7 +366,7 @@
   return value->GetAsReal(out_value);
 }
 
-bool DictionaryValue::GetString(const string16& path,
+bool DictionaryValue::GetString(const std::wstring& path,
                                 std::string* out_value) const {
   Value* value;
   if (!Get(path, &value))
@@ -375,19 +375,16 @@
   return value->GetAsString(out_value);
 }
 
-bool DictionaryValue::GetString(const string16& path,
-                                string16* out_value) const {
+bool DictionaryValue::GetString(const std::wstring& path,
+                                std::wstring* out_value) const {
   Value* value;
   if (!Get(path, &value))
     return false;
 
-  std::wstring wout_value;
-  bool success = value->GetAsString(&wout_value);
-  out_value->assign(WideToUTF16Hack(wout_value));
-  return success;
+  return value->GetAsString(out_value);
 }
 
-bool DictionaryValue::GetBinary(const string16& path,
+bool DictionaryValue::GetBinary(const std::wstring& path,
                                 BinaryValue** out_value) const {
   Value* value;
   bool result = Get(path, &value);
@@ -400,7 +397,7 @@
   return true;
 }
 
-bool DictionaryValue::GetDictionary(const string16& path,
+bool DictionaryValue::GetDictionary(const std::wstring& path,
                                     DictionaryValue** out_value) const {
   Value* value;
   bool result = Get(path, &value);
@@ -413,7 +410,7 @@
   return true;
 }
 
-bool DictionaryValue::GetList(const string16& path,
+bool DictionaryValue::GetList(const std::wstring& path,
                               ListValue** out_value) const {
   Value* value;
   bool result = Get(path, &value);
@@ -426,11 +423,11 @@
   return true;
 }
 
-bool DictionaryValue::Remove(const string16& path, Value** out_value) {
-  string16 key = path;
+bool DictionaryValue::Remove(const std::wstring& path, Value** out_value) {
+  std::wstring key = path;
 
-  size_t delimiter_position = path.find_first_of('.', 0);
-  if (delimiter_position != string16::npos) {
+  size_t delimiter_position = path.find_first_of(L".", 0);
+  if (delimiter_position != std::wstring::npos) {
     key = path.substr(0, delimiter_position);
   }
 
@@ -439,7 +436,7 @@
     return false;
   Value* entry = entry_iterator->second;
 
-  if (delimiter_position == string16::npos) {
+  if (delimiter_position == std::wstring::npos) {
     if (out_value)
       *out_value = entry;
     else
@@ -654,3 +651,4 @@
 
   return true;
 }
+
diff --git a/base/values.h b/base/values.h
index 54298d5..cad1311 100644
--- a/base/values.h
+++ b/base/values.h
@@ -23,10 +23,10 @@
 
 #include <iterator>
 #include <map>
+#include <string>
 #include <vector>
 
 #include "base/basictypes.h"
-#include "base/string16.h"
 
 class Value;
 class FundamentalValue;
@@ -36,7 +36,7 @@
 class ListValue;
 
 typedef std::vector<Value*> ValueVector;
-typedef std::map<string16, Value*> ValueMap;
+typedef std::map<std::wstring, Value*> ValueMap;
 
 // The Value class is the base class for Values.  A Value can be
 // instantiated via the Create*Value() factory methods, or by directly
@@ -202,7 +202,7 @@
   virtual bool Equals(const Value* other) const;
 
   // Returns true if the current dictionary has a value for the given key.
-  bool HasKey(const string16& key) const;
+  bool HasKey(const std::wstring& key) const;
 
   // Clears any current contents of this dictionary.
   void Clear();
@@ -216,15 +216,15 @@
   // to the path in that location.
   // Note that the dictionary takes ownership of the value
   // referenced by in_value.
-  bool Set(const string16& path, Value* in_value);
+  bool Set(const std::wstring& path, Value* in_value);
 
   // Convenience forms of Set().  These methods will replace any existing
   // value at that path, even if it has a different type.
-  bool SetBoolean(const string16& path, bool in_value);
-  bool SetInteger(const string16& path, int in_value);
-  bool SetReal(const string16& path, double in_value);
-  bool SetString(const string16& path, const std::string& in_value);
-  bool SetString(const string16& path, const string16& in_value);
+  bool SetBoolean(const std::wstring& path, bool in_value);
+  bool SetInteger(const std::wstring& path, int in_value);
+  bool SetReal(const std::wstring& path, double in_value);
+  bool SetString(const std::wstring& path, const std::string& in_value);
+  bool SetString(const std::wstring& path, const std::wstring& in_value);
 
   // Gets the Value associated with the given path starting from this object.
   // A path has the form "<key>" or "<key>.<key>.[...]", where "." indexes
@@ -233,20 +233,20 @@
   // through the "value" parameter, and the function will return true.
   // Otherwise, it will return false and "value" will be untouched.
   // Note that the dictionary always owns the value that's returned.
-  bool Get(const string16& path, Value** out_value) const;
+  bool Get(const std::wstring& path, Value** out_value) const;
 
   // These are convenience forms of Get().  The value will be retrieved
   // and the return value will be true if the path is valid and the value at
   // the end of the path can be returned in the form specified.
-  bool GetBoolean(const string16& path, bool* out_value) const;
-  bool GetInteger(const string16& path, int* out_value) const;
-  bool GetReal(const string16& path, double* out_value) const;
-  bool GetString(const string16& path, std::string* out_value) const;
-  bool GetString(const string16& path, string16* out_value) const;
-  bool GetBinary(const string16& path, BinaryValue** out_value) const;
-  bool GetDictionary(const string16& path,
+  bool GetBoolean(const std::wstring& path, bool* out_value) const;
+  bool GetInteger(const std::wstring& path, int* out_value) const;
+  bool GetReal(const std::wstring& path, double* out_value) const;
+  bool GetString(const std::wstring& path, std::string* out_value) const;
+  bool GetString(const std::wstring& path, std::wstring* out_value) const;
+  bool GetBinary(const std::wstring& path, BinaryValue** out_value) const;
+  bool GetDictionary(const std::wstring& path,
                      DictionaryValue** out_value) const;
-  bool GetList(const string16& path, ListValue** out_value) const;
+  bool GetList(const std::wstring& path, ListValue** out_value) const;
 
   // Removes the Value with the specified path from this dictionary (or one
   // of its child dictionaries, if the path is more than just a local key).
@@ -254,16 +254,16 @@
   // passed out via out_value.  If |out_value| is NULL, the removed value will
   // be deleted.  This method returns true if |path| is a valid path; otherwise
   // it will return false and the DictionaryValue object will be unchanged.
-  bool Remove(const string16& path, Value** out_value);
+  bool Remove(const std::wstring& path, Value** out_value);
 
   // This class provides an iterator for the keys in the dictionary.
   // It can't be used to modify the dictionary.
   class key_iterator
-    : private std::iterator<std::input_iterator_tag, const string16> {
+    : private std::iterator<std::input_iterator_tag, const std::wstring> {
    public:
     key_iterator(ValueMap::const_iterator itr) { itr_ = itr; }
     key_iterator operator++() { ++itr_; return *this; }
-    const string16& operator*() { return itr_->first; }
+    const std::wstring& operator*() { return itr_->first; }
     bool operator!=(const key_iterator& other) { return itr_ != other.itr_; }
     bool operator==(const key_iterator& other) { return itr_ == other.itr_; }
 
@@ -280,7 +280,7 @@
   // Associates the value |in_value| with the |key|.  This method should be
   // used instead of "dictionary_[key] = foo" so that any previous value can
   // be properly deleted.
-  void SetInCurrentNode(const string16& key, Value* in_value);
+  void SetInCurrentNode(const std::wstring& key, Value* in_value);
 
   ValueMap dictionary_;
 };
diff --git a/base/values_unittest.cc b/base/values_unittest.cc
index 2693fcc..dd2121f 100644
--- a/base/values_unittest.cc
+++ b/base/values_unittest.cc
@@ -6,7 +6,6 @@
 
 #include "base/values.h"
 #include "base/scoped_ptr.h"
-#include "base/string_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 class ValuesTest: public testing::Test {
@@ -15,47 +14,46 @@
 TEST(ValuesTest, Basic) {
   // Test basic dictionary getting/setting
   DictionaryValue settings;
-  string16 homepage = LIT16("http://google.com");
-  ASSERT_FALSE(settings.GetString(LIT16("global.homepage"), &homepage));
-  ASSERT_EQ(LIT16("http://google.com"), homepage);
+  std::wstring homepage = L"http://google.com";
+  ASSERT_FALSE(
+    settings.GetString(L"global.homepage", &homepage));
+  ASSERT_EQ(std::wstring(L"http://google.com"), homepage);
 
-  ASSERT_FALSE(settings.Get(LIT16("global"), NULL));
-  ASSERT_TRUE(settings.Set(LIT16("global"), Value::CreateBooleanValue(true)));
-  ASSERT_TRUE(settings.Get(LIT16("global"), NULL));
-  ASSERT_TRUE(settings.SetString(LIT16("global.homepage"),
-                                 LIT16("http://scurvy.com")));
-  ASSERT_TRUE(settings.Get(LIT16("global"), NULL));
-  homepage = LIT16("http://google.com");
-  ASSERT_TRUE(settings.GetString(LIT16("global.homepage"), &homepage));
-  ASSERT_EQ(LIT16("http://scurvy.com"), homepage);
+  ASSERT_FALSE(settings.Get(L"global", NULL));
+  ASSERT_TRUE(settings.Set(L"global", Value::CreateBooleanValue(true)));
+  ASSERT_TRUE(settings.Get(L"global", NULL));
+  ASSERT_TRUE(settings.SetString(L"global.homepage", L"http://scurvy.com"));
+  ASSERT_TRUE(settings.Get(L"global", NULL));
+  homepage = L"http://google.com";
+  ASSERT_TRUE(settings.GetString(L"global.homepage", &homepage));
+  ASSERT_EQ(std::wstring(L"http://scurvy.com"), homepage);
 
   // Test storing a dictionary in a list.
   ListValue* toolbar_bookmarks;
   ASSERT_FALSE(
-      settings.GetList(LIT16("global.toolbar.bookmarks"), &toolbar_bookmarks));
+    settings.GetList(L"global.toolbar.bookmarks", &toolbar_bookmarks));
 
   toolbar_bookmarks = new ListValue;
-  settings.Set(LIT16("global.toolbar.bookmarks"), toolbar_bookmarks);
+  settings.Set(L"global.toolbar.bookmarks", toolbar_bookmarks);
   ASSERT_TRUE(
-      settings.GetList(LIT16("global.toolbar.bookmarks"), &toolbar_bookmarks));
+    settings.GetList(L"global.toolbar.bookmarks", &toolbar_bookmarks));
 
   DictionaryValue* new_bookmark = new DictionaryValue;
-  new_bookmark->SetString(LIT16("name"), LIT16("Froogle"));
-  new_bookmark->SetString(LIT16("url"), LIT16("http://froogle.com"));
+  new_bookmark->SetString(L"name", L"Froogle");
+  new_bookmark->SetString(L"url", L"http://froogle.com");
   toolbar_bookmarks->Append(new_bookmark);
 
   ListValue* bookmark_list;
-  ASSERT_TRUE(settings.GetList(LIT16("global.toolbar.bookmarks"),
-                               &bookmark_list));
+  ASSERT_TRUE(settings.GetList(L"global.toolbar.bookmarks", &bookmark_list));
   DictionaryValue* bookmark;
   ASSERT_EQ(1U, bookmark_list->GetSize());
   ASSERT_TRUE(bookmark_list->GetDictionary(0, &bookmark));
-  string16 bookmark_name = LIT16("Unnamed");
-  ASSERT_TRUE(bookmark->GetString(LIT16("name"), &bookmark_name));
-  ASSERT_EQ(LIT16("Froogle"), bookmark_name);
-  string16 bookmark_url;
-  ASSERT_TRUE(bookmark->GetString(LIT16("url"), &bookmark_url));
-  ASSERT_EQ(LIT16("http://froogle.com"), bookmark_url);
+  std::wstring bookmark_name = L"Unnamed";
+  ASSERT_TRUE(bookmark->GetString(L"name", &bookmark_name));
+  ASSERT_EQ(std::wstring(L"Froogle"), bookmark_name);
+  std::wstring bookmark_url;
+  ASSERT_TRUE(bookmark->GetString(L"url", &bookmark_url));
+  ASSERT_EQ(std::wstring(L"http://froogle.com"), bookmark_url);
 }
 
 TEST(ValuesTest, List) {
@@ -236,7 +234,7 @@
 }
 
 TEST(ValuesTest, DictionaryDeletion) {
-  string16 key = LIT16("test");
+  std::wstring key = L"test";
   bool deletion_flag = true;
 
   {
@@ -264,7 +262,7 @@
 }
 
 TEST(ValuesTest, DictionaryRemoval) {
-  string16 key = LIT16("test");
+  std::wstring key = L"test";
   bool deletion_flag = true;
   Value* removed_item = NULL;
 
@@ -273,7 +271,7 @@
     dict.Set(key, new DeletionTestValue(&deletion_flag));
     EXPECT_FALSE(deletion_flag);
     EXPECT_TRUE(dict.HasKey(key));
-    EXPECT_FALSE(dict.Remove(LIT16("absent key"), &removed_item));
+    EXPECT_FALSE(dict.Remove(L"absent key", &removed_item));
     EXPECT_TRUE(dict.Remove(key, &removed_item));
     EXPECT_FALSE(dict.HasKey(key));
     ASSERT_TRUE(removed_item);
@@ -297,29 +295,29 @@
 TEST(ValuesTest, DeepCopy) {
   DictionaryValue original_dict;
   Value* original_null = Value::CreateNullValue();
-  original_dict.Set(LIT16("null"), original_null);
+  original_dict.Set(L"null", original_null);
   Value* original_bool = Value::CreateBooleanValue(true);
-  original_dict.Set(LIT16("bool"), original_bool);
+  original_dict.Set(L"bool", original_bool);
   Value* original_int = Value::CreateIntegerValue(42);
-  original_dict.Set(LIT16("int"), original_int);
+  original_dict.Set(L"int", original_int);
   Value* original_real = Value::CreateRealValue(3.14);
-  original_dict.Set(LIT16("real"), original_real);
+  original_dict.Set(L"real", original_real);
   Value* original_string = Value::CreateStringValue("hello");
-  original_dict.Set(LIT16("string"), original_string);
+  original_dict.Set(L"string", original_string);
   Value* original_wstring = Value::CreateStringValue(L"peek-a-boo");
-  original_dict.Set(LIT16("wstring"), original_wstring);
+  original_dict.Set(L"wstring", original_wstring);
 
   char* original_buffer = new char[42];
   memset(original_buffer, '!', 42);
   BinaryValue* original_binary = Value::CreateBinaryValue(original_buffer, 42);
-  original_dict.Set(LIT16("binary"), original_binary);
+  original_dict.Set(L"binary", original_binary);
 
   ListValue* original_list = new ListValue();
   Value* original_list_element_0 = Value::CreateIntegerValue(0);
   original_list->Append(original_list_element_0);
   Value* original_list_element_1 = Value::CreateIntegerValue(1);
   original_list->Append(original_list_element_1);
-  original_dict.Set(LIT16("list"), original_list);
+  original_dict.Set(L"list", original_list);
 
   DictionaryValue* copy_dict =
     static_cast<DictionaryValue*>(original_dict.DeepCopy());
@@ -327,13 +325,13 @@
   ASSERT_NE(copy_dict, &original_dict);
 
   Value* copy_null = NULL;
-  ASSERT_TRUE(copy_dict->Get(LIT16("null"), &copy_null));
+  ASSERT_TRUE(copy_dict->Get(L"null", &copy_null));
   ASSERT_TRUE(copy_null);
   ASSERT_NE(copy_null, original_null);
   ASSERT_TRUE(copy_null->IsType(Value::TYPE_NULL));
 
   Value* copy_bool = NULL;
-  ASSERT_TRUE(copy_dict->Get(LIT16("bool"), &copy_bool));
+  ASSERT_TRUE(copy_dict->Get(L"bool", &copy_bool));
   ASSERT_TRUE(copy_bool);
   ASSERT_NE(copy_bool, original_bool);
   ASSERT_TRUE(copy_bool->IsType(Value::TYPE_BOOLEAN));
@@ -342,7 +340,7 @@
   ASSERT_TRUE(copy_bool_value);
 
   Value* copy_int = NULL;
-  ASSERT_TRUE(copy_dict->Get(LIT16("int"), &copy_int));
+  ASSERT_TRUE(copy_dict->Get(L"int", &copy_int));
   ASSERT_TRUE(copy_int);
   ASSERT_NE(copy_int, original_int);
   ASSERT_TRUE(copy_int->IsType(Value::TYPE_INTEGER));
@@ -351,7 +349,7 @@
   ASSERT_EQ(42, copy_int_value);
 
   Value* copy_real = NULL;
-  ASSERT_TRUE(copy_dict->Get(LIT16("real"), &copy_real));
+  ASSERT_TRUE(copy_dict->Get(L"real", &copy_real));
   ASSERT_TRUE(copy_real);
   ASSERT_NE(copy_real, original_real);
   ASSERT_TRUE(copy_real->IsType(Value::TYPE_REAL));
@@ -360,7 +358,7 @@
   ASSERT_EQ(3.14, copy_real_value);
 
   Value* copy_string = NULL;
-  ASSERT_TRUE(copy_dict->Get(LIT16("string"), &copy_string));
+  ASSERT_TRUE(copy_dict->Get(L"string", &copy_string));
   ASSERT_TRUE(copy_string);
   ASSERT_NE(copy_string, original_string);
   ASSERT_TRUE(copy_string->IsType(Value::TYPE_STRING));
@@ -372,7 +370,7 @@
   ASSERT_EQ(std::wstring(L"hello"), copy_wstring_value);
 
   Value* copy_wstring = NULL;
-  ASSERT_TRUE(copy_dict->Get(LIT16("wstring"), &copy_wstring));
+  ASSERT_TRUE(copy_dict->Get(L"wstring", &copy_wstring));
   ASSERT_TRUE(copy_wstring);
   ASSERT_NE(copy_wstring, original_wstring);
   ASSERT_TRUE(copy_wstring->IsType(Value::TYPE_STRING));
@@ -382,7 +380,7 @@
   ASSERT_EQ(std::wstring(L"peek-a-boo"), copy_wstring_value);
 
   Value* copy_binary = NULL;
-              ASSERT_TRUE(copy_dict->Get(LIT16("binary"), &copy_binary));
+  ASSERT_TRUE(copy_dict->Get(L"binary", &copy_binary));
   ASSERT_TRUE(copy_binary);
   ASSERT_NE(copy_binary, original_binary);
   ASSERT_TRUE(copy_binary->IsType(Value::TYPE_BINARY));
@@ -395,7 +393,7 @@
                original_binary->GetSize()));
 
   Value* copy_value = NULL;
-              ASSERT_TRUE(copy_dict->Get(LIT16("list"), &copy_value));
+  ASSERT_TRUE(copy_dict->Get(L"list", &copy_value));
   ASSERT_TRUE(copy_value);
   ASSERT_NE(copy_value, original_list);
   ASSERT_TRUE(copy_value->IsType(Value::TYPE_LIST));
@@ -434,12 +432,12 @@
   delete boolean;
 
   DictionaryValue dv;
-  dv.SetBoolean(LIT16("a"), false);
-  dv.SetInteger(LIT16("b"), 2);
-  dv.SetReal(LIT16("c"), 2.5);
-  dv.SetString(LIT16("d1"), "string");
-  dv.SetString(LIT16("d2"), LIT16("string"));
-  dv.Set(LIT16("e"), Value::CreateNullValue());
+  dv.SetBoolean(L"a", false);
+  dv.SetInteger(L"b", 2);
+  dv.SetReal(L"c", 2.5);
+  dv.SetString(L"d1", "string");
+  dv.SetString(L"d2", L"string");
+  dv.Set(L"e", Value::CreateNullValue());
 
   DictionaryValue* copy = static_cast<DictionaryValue*>(dv.DeepCopy());
   EXPECT_TRUE(dv.Equals(copy));
@@ -447,13 +445,14 @@
   ListValue* list = new ListValue;
   list->Append(Value::CreateNullValue());
   list->Append(new DictionaryValue);
-  dv.Set(LIT16("f"), list);
+  dv.Set(L"f", list);
 
   EXPECT_FALSE(dv.Equals(copy));
-  copy->Set(LIT16("f"), list->DeepCopy());
+  copy->Set(L"f", list->DeepCopy());
   EXPECT_TRUE(dv.Equals(copy));
 
   list->Append(Value::CreateBooleanValue(true));
   EXPECT_FALSE(dv.Equals(copy));
   delete copy;
 }
+