Merge "libchromeos: disable accelerated video decode on sandybridge."
diff --git a/Android.mk b/Android.mk
index f6b33d7..d080d1e 100644
--- a/Android.mk
+++ b/Android.mk
@@ -109,7 +109,7 @@
     chromeos/strings/string_utils_unittest.cc \
     chromeos/url_utils_unittest.cc
 
-libchromeos_CFLAGS := -Wall -D__BRILLO__ \
+libchromeos_CFLAGS := -Wall \
     -Wno-char-subscripts -Wno-missing-field-initializers \
     -Wno-unused-function -Wno-unused-parameter -Werror
 libchromeos_CPPFLAGS := -Wno-non-virtual-dtor -Wno-sign-promo \
diff --git a/chromeos/dbus/data_serialization.cc b/chromeos/dbus/data_serialization.cc
index 00ad723..f57697b 100644
--- a/chromeos/dbus/data_serialization.cc
+++ b/chromeos/dbus/data_serialization.cc
@@ -219,6 +219,19 @@
   else if (signature == "a{sa{sv}}")
     return PopTypedMapFromReader<
         std::string, chromeos::VariantDictionary>(reader, value);
+  else if (signature == "a{say}")
+    return PopTypedMapFromReader<
+        std::string, std::vector<uint8_t>>(reader, value);
+  else if (signature == "a{uv}")
+    return PopTypedMapFromReader<uint32_t, chromeos::Any>(reader, value);
+  else if (signature == "a(su)")
+    return PopTypedArrayFromReader<
+        std::tuple<std::string, uint32_t>>(reader, value);
+  else if (signature == "a{uu}")
+    return PopTypedMapFromReader<uint32_t, uint32_t>(reader, value);
+  else if (signature == "a(uu)")
+    return PopTypedArrayFromReader<
+        std::tuple<uint32_t, uint32_t>>(reader, value);
 
   // When a use case for particular array signature is found, feel free
   // to add handing for it here.
@@ -234,10 +247,15 @@
                               chromeos::Any* value) {
   std::string signature = reader->GetDataSignature();
   if (signature == "(ii)")
-    return PopTypedValueFromReader<std::pair<int, int>>(reader, value);
+    return PopTypedValueFromReader<std::tuple<int, int>>(reader, value);
   else if (signature == "(ss)")
-    return PopTypedValueFromReader<std::pair<std::string, std::string>>(reader,
-                                                                        value);
+    return PopTypedValueFromReader<std::tuple<std::string, std::string>>(reader,
+                                                                         value);
+  else if (signature == "(ub)")
+    return PopTypedValueFromReader<std::tuple<uint32_t, bool>>(reader, value);
+  else if (signature == "(uu)")
+    return PopTypedValueFromReader<std::tuple<uint32_t, uint32_t>>(reader,
+                                                                   value);
 
   // When a use case for particular struct signature is found, feel free
   // to add handing for it here.
diff --git a/chromeos/http/http_transport_curl.cc b/chromeos/http/http_transport_curl.cc
index af601c4..5a3e207 100644
--- a/chromeos/http/http_transport_curl.cc
+++ b/chromeos/http/http_transport_curl.cc
@@ -15,7 +15,12 @@
 
 namespace {
 
-const char kChromeOSCACertificatePath[] = "/usr/share/chromeos-ca-certificates";
+const char kCACertificatePath[] =
+#ifdef __ANDROID__
+    "/system/etc/security/cacerts";
+#else
+    "/usr/share/chromeos-ca-certificates";
+#endif
 
 }  // namespace
 
@@ -132,7 +137,7 @@
 
   if (code == CURLE_OK) {
     code = curl_interface_->EasySetOptStr(curl_handle, CURLOPT_CAPATH,
-                                          kChromeOSCACertificatePath);
+                                          kCACertificatePath);
   }
   if (code == CURLE_OK) {
     code =
diff --git a/chromeos/process_unittest.cc b/chromeos/process_unittest.cc
index c74e1ed..1d83cb7 100644
--- a/chromeos/process_unittest.cc
+++ b/chromeos/process_unittest.cc
@@ -17,7 +17,7 @@
 using base::FilePath;
 
 // This test assumes the following standard binaries are installed.
-#if defined(__BRILLO__)
+#if defined(__ANDROID__)
 # define SYSTEM_PREFIX "/system"
 #else
 # define SYSTEM_PREFIX ""
@@ -266,7 +266,7 @@
   EXPECT_EQ(-1, process_.Run());
 }
 
-#if !defined(__BRILLO__) // Bionic intercepts the segfault in brillo
+#if !defined(__BIONIC__)  // Bionic intercepts the segfault on Android.
 TEST_F(ProcessTest, SegFaultHandling) {
   process_.AddArg(kBinSh);
   process_.AddArg("-c");
diff --git a/chromeos/streams/tls_stream.cc b/chromeos/streams/tls_stream.cc
index 8c3c2ee..6dc5ef5 100644
--- a/chromeos/streams/tls_stream.cc
+++ b/chromeos/streams/tls_stream.cc
@@ -56,7 +56,12 @@
 int ssl_ctx_private_data_index = -1;
 
 // Default trusted certificate store location.
-const char kChromeOSCACertificatePath[] = "/usr/share/chromeos-ca-certificates";
+const char kCACertificatePath[] =
+#ifdef __ANDROID__
+    "/system/etc/security/cacerts";
+#else
+    "/usr/share/chromeos-ca-certificates";
+#endif
 
 }  // anonymous namespace
 
@@ -351,7 +356,7 @@
     return ReportError(error, FROM_HERE, "Cannot set the cipher list");
 
   res = SSL_CTX_load_verify_locations(ctx_.get(), nullptr,
-                                      kChromeOSCACertificatePath);
+                                      kCACertificatePath);
   if (res != 1) {
     return ReportError(error, FROM_HERE,
                        "Failed to specify trusted certificate location");