summaryrefslogtreecommitdiff
path: root/content/browser/download/base_file.cc
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2014-02-21 12:16:55 +0000
committerTorne (Richard Coles) <torne@google.com>2014-02-21 12:16:55 +0000
commit5d1f7b1de12d16ceb2c938c56701a3e8bfa558f7 (patch)
tree5d4ae202b870bd86673f596f0d424bc4b3e55ebe /content/browser/download/base_file.cc
parente862bac9c33104a29d98631d62668ae7b6676510 (diff)
downloadchromium_org-5d1f7b1de12d16ceb2c938c56701a3e8bfa558f7.tar.gz
Merge from Chromium at DEPS revision 251904
This commit was generated by merge_to_master.py. Change-Id: I1f9543259d7d2a57d81aa41a1b84f85837439d21
Diffstat (limited to 'content/browser/download/base_file.cc')
-rw-r--r--content/browser/download/base_file.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/content/browser/download/base_file.cc b/content/browser/download/base_file.cc
index 1de3e842dd..560b399822 100644
--- a/content/browser/download/base_file.cc
+++ b/content/browser/download/base_file.cc
@@ -42,7 +42,7 @@ BaseFile::BaseFile(const base::FilePath& full_path,
calculate_hash_(calculate_hash),
detached_(false),
bound_net_log_(bound_net_log) {
- memcpy(sha256_hash_, kEmptySha256Hash, kSha256HashLen);
+ memcpy(sha256_hash_, kEmptySha256Hash, crypto::kSHA256Length);
if (calculate_hash_) {
secure_hash_.reset(crypto::SecureHash::Create(crypto::SecureHash::SHA256));
if ((bytes_so_far_ > 0) && // Not starting at the beginning.
@@ -206,7 +206,7 @@ void BaseFile::Finish() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
if (calculate_hash_)
- secure_hash_->Finish(sha256_hash_, kSha256HashLen);
+ secure_hash_->Finish(sha256_hash_, crypto::kSHA256Length);
Close();
}
@@ -243,8 +243,8 @@ std::string BaseFile::GetHashState() {
// static
bool BaseFile::IsEmptyHash(const std::string& hash) {
- return (hash.size() == kSha256HashLen &&
- 0 == memcmp(hash.data(), kEmptySha256Hash, sizeof(kSha256HashLen)));
+ return (hash.size() == crypto::kSHA256Length &&
+ 0 == memcmp(hash.data(), kEmptySha256Hash, crypto::kSHA256Length));
}
std::string BaseFile::DebugString() const {