Commit 8d717973 authored by lzheng@chromium.org's avatar lzheng@chromium.org

Remove the unused enlarge.

TEST=none
BUG=none

Review URL: http://codereview.chromium.org/6151010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71462 0039d316-1c4b-4281-b951-d872f2087c98
parent 001f08ab
......@@ -111,16 +111,6 @@ int SBEntry::Size(Type type, int prefix_count) {
return sizeof(Data) + prefix_count * PrefixSize(type);
}
SBEntry* SBEntry::Enlarge(int extra_prefixes) {
int new_prefix_count = prefix_count() + extra_prefixes;
SBEntry* rv = SBEntry::Create(type(), new_prefix_count);
memcpy(rv, this, Size()); // NOTE: Blows away rv.data_!
// We have to re-set |rv|'s prefix count since we just copied our own over it.
rv->set_prefix_count(new_prefix_count);
Destroy();
return rv;
}
int SBEntry::ChunkIdAtPrefix(int index) const {
if (type() == SUB_PREFIX)
return sub_prefixes_[index].add_chunk;
......
......@@ -157,10 +157,6 @@ class SBEntry {
int chunk_id() const { return data_.chunk_id; }
int prefix_count() const { return data_.prefix_count; }
// Returns a new entry that is larger by the given number of prefixes, with
// all the existing data already copied over. The old entry is destroyed.
SBEntry* Enlarge(int extra_prefixes);
// Returns true if this is a prefix as opposed to a full hash.
bool IsPrefix() const {
return type() == ADD_PREFIX || type() == SUB_PREFIX;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment