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
BUG=chromium:496469
TEST=`./build_packages`
CQ-DEPEND=CL:277662
Change-Id: I36e5fbf2e36a92068873ffbd44020c862a3ed9e3
Reviewed-on: https://chromium-review.googlesource.com/277671
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
Trybot-Ready: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/libcurl_http_fetcher.cc b/libcurl_http_fetcher.cc
index e32d925..ee8820b 100644
--- a/libcurl_http_fetcher.cc
+++ b/libcurl_http_fetcher.cc
@@ -37,21 +37,21 @@
bool LibcurlHttpFetcher::GetProxyType(const string& proxy,
curl_proxytype* out_type) {
- if (StartsWithASCII(proxy, "socks5://", true) ||
- StartsWithASCII(proxy, "socks://", true)) {
+ if (base::StartsWithASCII(proxy, "socks5://", true) ||
+ base::StartsWithASCII(proxy, "socks://", true)) {
*out_type = CURLPROXY_SOCKS5_HOSTNAME;
return true;
}
- if (StartsWithASCII(proxy, "socks4://", true)) {
+ if (base::StartsWithASCII(proxy, "socks4://", true)) {
*out_type = CURLPROXY_SOCKS4A;
return true;
}
- if (StartsWithASCII(proxy, "http://", true) ||
- StartsWithASCII(proxy, "https://", true)) {
+ if (base::StartsWithASCII(proxy, "http://", true) ||
+ base::StartsWithASCII(proxy, "https://", true)) {
*out_type = CURLPROXY_HTTP;
return true;
}
- if (StartsWithASCII(proxy, kNoProxy, true)) {
+ if (base::StartsWithASCII(proxy, kNoProxy, true)) {
// known failure case. don't log.
return false;
}
@@ -167,7 +167,7 @@
// Lock down the appropriate curl options for HTTP or HTTPS depending on
// the url.
if (GetSystemState()->hardware()->IsOfficialBuild()) {
- if (StartsWithASCII(url_, "http://", false))
+ if (base::StartsWithASCII(url_, "http://", false))
SetCurlOptionsForHttp();
else
SetCurlOptionsForHttps();