| Index: net/disk_cache/simple/simple_index.h
|
| diff --git a/net/disk_cache/simple/simple_index.h b/net/disk_cache/simple/simple_index.h
|
| index 44fdf1725f55d4c89a32e501d00bbadfd6c8c016..f91506594ad6f18edb93abc0eb250f43f33a0a56 100644
|
| --- a/net/disk_cache/simple/simple_index.h
|
| +++ b/net/disk_cache/simple/simple_index.h
|
| @@ -5,8 +5,9 @@
|
| #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_H_
|
| #define NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_H_
|
|
|
| -#include <map>
|
| +#include <list>
|
| #include <string>
|
| +#include <vector>
|
|
|
| #include "base/basictypes.h"
|
| #include "base/callback.h"
|
| @@ -16,6 +17,7 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/threading/thread_checker.h"
|
| #include "base/time.h"
|
| +#include "net/base/completion_callback.h"
|
| #include "net/base/net_export.h"
|
|
|
| class Pickle;
|
| @@ -101,6 +103,20 @@ class NET_EXPORT_PRIVATE SimpleIndex
|
| static void InsertInEntrySet(const EntryMetadata& entry_metadata,
|
| EntrySet* entry_set);
|
|
|
| + // Executes the |callback| when the index is ready. Allows multiple callbacks.
|
| + int ExecuteWhenReady(const net::CompletionCallback& callback);
|
| +
|
| + // Takes out entries from the index that have last accessed time matching the
|
| + // range between |initial_time| and |end_time| where open intervals are
|
| + // possible according to the definition given in |DoomEntriesBetween()| in the
|
| + // disk cache backend interface. Returns the set of hashes taken out.
|
| + scoped_ptr<std::vector<uint64> > ExtractEntriesBetween(
|
| + const base::Time initial_time,
|
| + const base::Time end_time);
|
| +
|
| + // Returns number of indexed entries.
|
| + int32 GetEntryCount() const;
|
| +
|
| private:
|
| typedef base::Callback<void(scoped_ptr<EntrySet>)> IndexCompletionCallback;
|
|
|
| @@ -137,6 +153,9 @@ class NET_EXPORT_PRIVATE SimpleIndex
|
| // All nonstatic SimpleEntryImpl methods should always be called on the IO
|
| // thread, in all cases. |io_thread_checker_| documents and enforces this.
|
| base::ThreadChecker io_thread_checker_;
|
| +
|
| + typedef std::list<net::CompletionCallback> CallbackList;
|
| + CallbackList to_run_when_initialized_;
|
| };
|
|
|
| } // namespace disk_cache
|
|
|