naiveproxy/net/disk_cache/simple/simple_entry_format.cc

27 lines
748 B
C++
Raw Permalink Normal View History

2018-01-28 19:30:36 +03:00
// Copyright (c) 2013 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/disk_cache/simple/simple_entry_format.h"
#include <cstring>
namespace disk_cache {
SimpleFileHeader::SimpleFileHeader() {
// Make hashing repeatable: leave no padding bytes untouched.
std::memset(this, 0, sizeof(*this));
}
SimpleFileEOF::SimpleFileEOF() {
// Make hashing repeatable: leave no padding bytes untouched.
std::memset(this, 0, sizeof(*this));
}
SimpleFileSparseRangeHeader::SimpleFileSparseRangeHeader() {
// Make hashing repeatable: leave no padding bytes untouched.
std::memset(this, 0, sizeof(*this));
}
} // namespace disk_cache