platform2: Fix issues with new version of libchrome

libchrome r334380 has the following breaking changes that need to be fixed:
- base::JSONWriter::Write() and base::JSONWriter::WriteWithOptions() take
  "const base::Value&" instead of "const base::Value*"
- base::JSONReader::Read() and base::JSONReader::ReadAndReturnError()
  return a scoped_ptr<base::Value> instead of base::Value*
- base/safe_strerror_posix.h is moved to base/posix/safe_strerror.h
- safe_strerror() is now in "base" namespace
- StartsWithASCII(), EndsWith(), StringToUpperASCII(), LowerCaseEqualsASCII()
  are now in "base" namespace
- ObserverList<T> is now in "base" namespace
- base::PrintTo(base::FilePath) used in gtest is now moved to libchrome-test
  library and as such, unit test runners need to link to this library now.
- crypto::RSAPrivateKey::CreateSensitive() is now removed from //crypto, so
  some of tests in chromeos-login that used that function had to be changed
  to use crypto::GenerateRSAKeyPairNSS() directly.
- UnixDomanSocket class is now in "base" namespace
- Pickle class is now in "base" namespace


Change-Id: I36e5fbf2e36a92068873ffbd44020c862a3ed9e3
Reviewed-by: Alex Vakulenko <>
Commit-Queue: Alex Vakulenko <>
Trybot-Ready: Alex Vakulenko <>
Tested-by: Alex Vakulenko <>
diff --git a/server/ b/server/
index bb9ffa2..58a6cbd 100644
--- a/server/
+++ b/server/
@@ -590,7 +590,7 @@
                                            const std::string& key_prefix,
                                            const std::string& key_name,
                                            CK_OBJECT_HANDLE object_handle) {
-  if (StartsWithASCII(key_name, key_prefix, true /*case_sensitive*/)) {
+  if (base::StartsWithASCII(key_name, key_prefix, true /*case_sensitive*/)) {
     if (C_DestroyObject(session_handle, object_handle) != CKR_OK) {
       LOG(ERROR) << "C_DestroyObject failed.";
       return false;