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

Unified Diff: components/ownership/owner_key_util_impl.cc

Issue 1551433002: Switch to standard integer types in components/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 years 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 | « components/ownership/owner_key_util_impl.h ('k') | components/ownership/owner_key_util_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ownership/owner_key_util_impl.cc
diff --git a/components/ownership/owner_key_util_impl.cc b/components/ownership/owner_key_util_impl.cc
index 15efd1f8ba4174ccda7b6ac8aae3f59d36382a93..0d36ede6e6608bfb63b3c983cae69a057ce42d1e 100644
--- a/components/ownership/owner_key_util_impl.cc
+++ b/components/ownership/owner_key_util_impl.cc
@@ -10,6 +10,7 @@
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/sys_info.h"
+#include "build/build_config.h"
#include "crypto/nss_key_util.h"
namespace ownership {
@@ -21,9 +22,9 @@ OwnerKeyUtilImpl::OwnerKeyUtilImpl(const base::FilePath& public_key_file)
OwnerKeyUtilImpl::~OwnerKeyUtilImpl() {
}
-bool OwnerKeyUtilImpl::ImportPublicKey(std::vector<uint8>* output) {
+bool OwnerKeyUtilImpl::ImportPublicKey(std::vector<uint8_t>* output) {
// Get the file size (must fit in a 32 bit int for NSS).
- int64 file_size;
+ int64_t file_size;
if (!base::GetFileSize(public_key_file_, &file_size)) {
#if defined(OS_CHROMEOS)
LOG_IF(ERROR, base::SysInfo::IsRunningOnChromeOS())
@@ -31,12 +32,12 @@ bool OwnerKeyUtilImpl::ImportPublicKey(std::vector<uint8>* output) {
#endif // defined(OS_CHROMEOS)
return false;
}
- if (file_size > static_cast<int64>(std::numeric_limits<int>::max())) {
+ if (file_size > static_cast<int64_t>(std::numeric_limits<int>::max())) {
LOG(ERROR) << public_key_file_.value() << "is " << file_size
<< "bytes!!! Too big!";
return false;
}
- int32 safe_file_size = static_cast<int32>(file_size);
+ int32_t safe_file_size = static_cast<int32_t>(file_size);
output->resize(safe_file_size);
@@ -53,7 +54,7 @@ bool OwnerKeyUtilImpl::ImportPublicKey(std::vector<uint8>* output) {
}
crypto::ScopedSECKEYPrivateKey OwnerKeyUtilImpl::FindPrivateKeyInSlot(
- const std::vector<uint8>& key,
+ const std::vector<uint8_t>& key,
PK11SlotInfo* slot) {
if (!slot)
return nullptr;
« no previous file with comments | « components/ownership/owner_key_util_impl.h ('k') | components/ownership/owner_key_util_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698