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

Unified Diff: components/component_updater/component_patcher_operation.cc

Issue 590333002: Replace usage of basictypes.h with a combination of stdint.h and base/macros.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 6 years, 3 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
Index: components/component_updater/component_patcher_operation.cc
diff --git a/components/component_updater/component_patcher_operation.cc b/components/component_updater/component_patcher_operation.cc
index 45d41ddcff145a447a5945d118701b2eb435d6bc..fdc5e0dad4fb11555a1a5394fb8ecc19d7718d9f 100644
--- a/components/component_updater/component_patcher_operation.cc
+++ b/components/component_updater/component_patcher_operation.cc
@@ -4,6 +4,7 @@
#include "components/component_updater/component_patcher_operation.h"
+#include <stdint.h>
#include <vector>
#include "base/bind.h"
@@ -107,7 +108,7 @@ void DeltaUpdateOp::DoneRunning(ComponentUnpacker::Error error,
// Uses the hash as a checksum to confirm that the file now residing in the
// output directory probably has the contents it should.
ComponentUnpacker::Error DeltaUpdateOp::CheckHash() {
- std::vector<uint8> expected_hash;
+ std::vector<uint8_t> expected_hash;
if (!base::HexStringToBytes(output_sha256_, &expected_hash) ||
expected_hash.size() != crypto::kSHA256Length)
return ComponentUnpacker::kDeltaVerificationFailure;
@@ -116,7 +117,7 @@ ComponentUnpacker::Error DeltaUpdateOp::CheckHash() {
if (!output_file_mmapped.Initialize(output_abs_path_))
return ComponentUnpacker::kDeltaVerificationFailure;
- uint8 actual_hash[crypto::kSHA256Length] = {0};
+ uint8_t actual_hash[crypto::kSHA256Length] = {0};
const scoped_ptr<SecureHash> hasher(SecureHash::Create(SecureHash::SHA256));
hasher->Update(output_file_mmapped.data(), output_file_mmapped.length());
hasher->Finish(actual_hash, sizeof(actual_hash));
« no previous file with comments | « components/component_updater/component_patcher_operation.h ('k') | components/component_updater/component_unpacker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698