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

Unified Diff: net/disk_cache/bitmap.h

Issue 6263010: More net/ header/implementation method reordering. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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
« no previous file with comments | « no previous file | net/disk_cache/bitmap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/bitmap.h
diff --git a/net/disk_cache/bitmap.h b/net/disk_cache/bitmap.h
index 8e24e15e6d7dd589e7254732340b8de7d5db38b4..8b3324c5110a114442bceacefb12a2461f405f26 100644
--- a/net/disk_cache/bitmap.h
+++ b/net/disk_cache/bitmap.h
@@ -6,8 +6,6 @@
#define NET_DISK_CACHE_BITMAP_H_
#pragma once
-#include <algorithm>
-
#include "base/basictypes.h"
namespace disk_cache {
@@ -19,30 +17,14 @@ class Bitmap {
// This constructor will allocate on a uint32 boundary. If |clear_bits| is
// false, the bitmap bits will not be initialized.
- Bitmap(int num_bits, bool clear_bits)
- : num_bits_(num_bits), array_size_(RequiredArraySize(num_bits)),
- alloc_(true) {
- map_ = new uint32[array_size_];
-
- // Initialize all of the bits.
- if (clear_bits)
- Clear();
- }
+ Bitmap(int num_bits, bool clear_bits);
// Constructs a Bitmap with the actual storage provided by the caller. |map|
// has to be valid until this object destruction. |num_bits| is the number of
// bits in the bitmap, and |num_words| is the size of |map| in 32-bit words.
- Bitmap(uint32* map, int num_bits, int num_words)
- : map_(map), num_bits_(num_bits),
- // If size is larger than necessary, trim because array_size_ is used
- // as a bound by various methods.
- array_size_(std::min(RequiredArraySize(num_bits), num_words)),
- alloc_(false) {}
-
- ~Bitmap() {
- if (alloc_)
- delete[] map_;
- }
+ Bitmap(uint32* map, int num_bits, int num_words);
+
+ ~Bitmap();
// Resizes the bitmap.
// If |num_bits| < Size(), the extra bits will be discarded.
« no previous file with comments | « no previous file | net/disk_cache/bitmap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698