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

Unified Diff: net/disk_cache/entry_impl.cc

Issue 3473006: Fix a bunch of clang warnings/errors. (Closed)
Patch Set: Created 10 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: net/disk_cache/entry_impl.cc
diff --git a/net/disk_cache/entry_impl.cc b/net/disk_cache/entry_impl.cc
index 5b65344c2354a84ae2931add0f19ede658604723..8d9fab60cf5ced0c1b79bec43c89d75d5d02aad1 100644
--- a/net/disk_cache/entry_impl.cc
+++ b/net/disk_cache/entry_impl.cc
@@ -64,19 +64,6 @@ void SyncCallback::Discard() {
OnFileIOComplete(0);
}
-// Clears buffer before offset and after valid_len, knowing that the size of
-// buffer is kMaxBlockSize.
-void ClearInvalidData(char* buffer, int offset, int valid_len) {
- DCHECK_GE(offset, 0);
- DCHECK_GE(valid_len, 0);
- DCHECK(disk_cache::kMaxBlockSize >= offset + valid_len);
- if (offset)
- memset(buffer, 0, offset);
- int end = disk_cache::kMaxBlockSize - offset - valid_len;
- if (end)
- memset(buffer + offset + valid_len, 0, end);
-}
-
const int kMaxBufferSize = 1024 * 1024; // 1 MB.
} // namespace

Powered by Google App Engine
This is Rietveld 408576698