Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(393)

Unified Diff: net/cert/x509_cert_types_mac.cc

Issue 125103006: Delete char32 from base/basictypes.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: foo Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/basictypes.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/x509_cert_types_mac.cc
diff --git a/net/cert/x509_cert_types_mac.cc b/net/cert/x509_cert_types_mac.cc
index 2e4f28c8fd3ee0ff332ff800a70753e77d22b0a7..0798807fc244857cf554381ea2bfdadb7f0c4598 100644
--- a/net/cert/x509_cert_types_mac.cc
+++ b/net/cert/x509_cert_types_mac.cc
@@ -1,9 +1,11 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/cert/x509_cert_types.h"
+#include <stdint.h>
+
#include <CoreServices/CoreServices.h>
#include <Security/SecAsn1Coder.h>
#include <Security/Security.h>
@@ -130,7 +132,7 @@ bool UTF16BigEndianToUTF8(base::char16* chars, size_t length,
// Converts big-endian UTF-32 to UTF-8 in a std::string.
// Note: The byte-order flipping is done in place on the input buffer!
-bool UTF32BigEndianToUTF8(char32* chars, size_t length,
+bool UTF32BigEndianToUTF8(int32_t* chars, size_t length,
std::string* out_string) {
for (size_t i = 0; i < length; ++i)
chars[i] = EndianS32_BtoN(chars[i]);
@@ -250,8 +252,8 @@ bool CertPrincipal::ParseDistinguishedName(const void* ber_name_data,
}
case BER_TAG_PKIX_UNIVERSAL_STRING: { // UTF-32, big-endian
std::string value;
- UTF32BigEndianToUTF8(reinterpret_cast<char32*>(pair->value.Data),
- pair->value.Length / sizeof(char32),
+ UTF32BigEndianToUTF8(reinterpret_cast<int32_t*>(pair->value.Data),
+ pair->value.Length / sizeof(int32_t),
&value);
AddTypeValuePair(pair->type, value, values);
break;
« no previous file with comments | « base/basictypes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698