Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / enumerate_modules_model_win.cc
index 6c9e11e..2067951 100644 (file)
@@ -320,7 +320,7 @@ static void GenerateHash(const std::string& input, std::string* output) {
 
   uint8 hash[4];
   crypto::SHA256HashString(input, hash, sizeof(hash));
-  *output = StringToLowerASCII(base::HexEncode(hash, sizeof(hash)));
+  *output = base::StringToLowerASCII(base::HexEncode(hash, sizeof(hash)));
 }
 
 // -----------------------------------------------------------------------------
@@ -780,15 +780,10 @@ base::string16 ModuleEnumerator::GetSubjectNameFromDigitalSignature(
     return base::string16();
 
   // Determine the size of the Subject name.
-  DWORD subject_name_size = 0;
-  if (!(subject_name_size = CertGetNameString(cert_context,
-                                              CERT_NAME_SIMPLE_DISPLAY_TYPE,
-                                              0,
-                                              NULL,
-                                              NULL,
-                                              0))) {
+  DWORD subject_name_size = CertGetNameString(
+      cert_context, CERT_NAME_SIMPLE_DISPLAY_TYPE, 0, NULL, NULL, 0);
+  if (!subject_name_size)
     return base::string16();
-  }
 
   base::string16 subject_name;
   subject_name.resize(subject_name_size);