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

Unified Diff: net/disk_cache/v3/block_bitmaps.h

Issue 121643003: Reorganize net/disk_cache into backend specific directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ios breakage Created 6 years, 10 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 | « net/disk_cache/v3/backend_worker.cc ('k') | net/disk_cache/v3/block_bitmaps.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/v3/block_bitmaps.h
diff --git a/net/disk_cache/v3/block_bitmaps.h b/net/disk_cache/v3/block_bitmaps.h
deleted file mode 100644
index 111d57b0b133a869a87779ece186c63c8497b496..0000000000000000000000000000000000000000
--- a/net/disk_cache/v3/block_bitmaps.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) 2012 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.
-
-// See net/disk_cache/disk_cache.h for the public interface.
-
-#ifndef NET_DISK_CACHE_V3_BLOCK_BITMAPS_H_
-#define NET_DISK_CACHE_V3_BLOCK_BITMAPS_H_
-
-#include "base/files/file_path.h"
-#include "net/base/net_export.h"
-#include "net/disk_cache/addr.h"
-#include "net/disk_cache/block_files.h"
-
-namespace disk_cache {
-
-class BackendImplV3;
-
-// This class is the interface in the v3 disk cache to the set of files holding
-// cached data that is small enough to not be efficiently stored in a dedicated
-// file (i.e. < kMaxBlockSize). It is primarily used to allocate and free
-// regions in those files used to store data.
-class NET_EXPORT_PRIVATE BlockBitmaps {
- public:
- BlockBitmaps();
- ~BlockBitmaps();
-
- void Init(const BlockFilesBitmaps& bitmaps);
-
- // Creates a new entry on a block file. block_type indicates the size of block
- // to be used (as defined on cache_addr.h), block_count is the number of
- // blocks to allocate, and block_address is the address of the new entry.
- bool CreateBlock(FileType block_type, int block_count, Addr* block_address);
-
- // Removes an entry from the block files.
- void DeleteBlock(Addr address);
-
- // Releases the internal bitmaps. The cache is being purged.
- void Clear();
-
- // Sends UMA stats.
- void ReportStats();
-
- // Returns true if the blocks pointed by a given address are currently used.
- // This method is only intended for debugging.
- bool IsValid(Addr address);
-
- private:
- // Returns the header number that stores a given address.
- int GetHeaderNumber(Addr address);
-
- // Returns the appropriate header to use for a new block.
- int HeaderNumberForNewBlock(FileType block_type, int block_count);
-
- // Retrieves stats for the given file index.
- void GetFileStats(int index, int* used_count, int* load);
-
- BlockFilesBitmaps bitmaps_;
-
- DISALLOW_COPY_AND_ASSIGN(BlockBitmaps);
-};
-
-} // namespace disk_cache
-
-#endif // NET_DISK_CACHE_V3_BLOCK_BITMAPS_H_
« no previous file with comments | « net/disk_cache/v3/backend_worker.cc ('k') | net/disk_cache/v3/block_bitmaps.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698