| Index: net/disk_cache/simple/simple_backend_impl.h
|
| diff --git a/net/disk_cache/simple/simple_backend_impl.h b/net/disk_cache/simple/simple_backend_impl.h
|
| index c8cac21124e634a0684a2dfbb4c35627c751b435..6db401637612f7426fd9d8a38a4cd77146405070 100644
|
| --- a/net/disk_cache/simple/simple_backend_impl.h
|
| +++ b/net/disk_cache/simple/simple_backend_impl.h
|
| @@ -5,6 +5,8 @@
|
| #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_
|
| #define NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_
|
|
|
| +#include <stdint.h>
|
| +
|
| #include <string>
|
| #include <utility>
|
| #include <vector>
|
| @@ -77,20 +79,20 @@ class NET_EXPORT_PRIVATE SimpleBackendImpl : public Backend,
|
|
|
| // The entry for |entry_hash| is being doomed; the backend will not attempt
|
| // run new operations for this |entry_hash| until the Doom is completed.
|
| - void OnDoomStart(uint64 entry_hash);
|
| + void OnDoomStart(uint64_t entry_hash);
|
|
|
| // The entry for |entry_hash| has been successfully doomed, we can now allow
|
| // operations on this entry, and we can run any operations enqueued while the
|
| // doom completed.
|
| - void OnDoomComplete(uint64 entry_hash);
|
| + void OnDoomComplete(uint64_t entry_hash);
|
|
|
| // SimpleIndexDelegate:
|
| - void DoomEntries(std::vector<uint64>* entry_hashes,
|
| + void DoomEntries(std::vector<uint64_t>* entry_hashes,
|
| const CompletionCallback& callback) override;
|
|
|
| // Backend:
|
| net::CacheType GetCacheType() const override;
|
| - int32 GetEntryCount() const override;
|
| + int32_t GetEntryCount() const override;
|
| int OpenEntry(const std::string& key,
|
| Entry** entry,
|
| const CompletionCallback& callback) override;
|
| @@ -114,9 +116,9 @@ class NET_EXPORT_PRIVATE SimpleBackendImpl : public Backend,
|
| class SimpleIterator;
|
| friend class SimpleIterator;
|
|
|
| - typedef base::hash_map<uint64, SimpleEntryImpl*> EntryMap;
|
| + typedef base::hash_map<uint64_t, SimpleEntryImpl*> EntryMap;
|
|
|
| - typedef base::Callback<void(base::Time mtime, uint64 max_size, int result)>
|
| + typedef base::Callback<void(base::Time mtime, uint64_t max_size, int result)>
|
| InitializeIndexCallback;
|
|
|
| class ActiveEntryProxy;
|
| @@ -125,7 +127,7 @@ class NET_EXPORT_PRIVATE SimpleBackendImpl : public Backend,
|
| // Return value of InitCacheStructureOnDisk().
|
| struct DiskStatResult {
|
| base::Time cache_dir_mtime;
|
| - uint64 max_size;
|
| + uint64_t max_size;
|
| bool detected_magic_number_mismatch;
|
| int net_error;
|
| };
|
| @@ -147,32 +149,33 @@ class NET_EXPORT_PRIVATE SimpleBackendImpl : public Backend,
|
| // Try to create the directory if it doesn't exist. This must run on the IO
|
| // thread.
|
| static DiskStatResult InitCacheStructureOnDisk(const base::FilePath& path,
|
| - uint64 suggested_max_size);
|
| + uint64_t suggested_max_size);
|
|
|
| // Searches |active_entries_| for the entry corresponding to |key|. If found,
|
| // returns the found entry. Otherwise, creates a new entry and returns that.
|
| scoped_refptr<SimpleEntryImpl> CreateOrFindActiveEntry(
|
| - uint64 entry_hash,
|
| + uint64_t entry_hash,
|
| const std::string& key);
|
|
|
| // Given a hash, will try to open the corresponding Entry. If we have an Entry
|
| // corresponding to |hash| in the map of active entries, opens it. Otherwise,
|
| // a new empty Entry will be created, opened and filled with information from
|
| // the disk.
|
| - int OpenEntryFromHash(uint64 entry_hash,
|
| + int OpenEntryFromHash(uint64_t entry_hash,
|
| Entry** entry,
|
| const CompletionCallback& callback);
|
|
|
| // Doom the entry corresponding to |entry_hash|, if it's active or currently
|
| // pending doom. This function does not block if there is an active entry,
|
| // which is very important to prevent races in DoomEntries() above.
|
| - int DoomEntryFromHash(uint64 entry_hash, const CompletionCallback & callback);
|
| + int DoomEntryFromHash(uint64_t entry_hash,
|
| + const CompletionCallback& callback);
|
|
|
| // Called when we tried to open an entry with hash alone. When a blank entry
|
| // has been created and filled in with information from the disk - based on a
|
| // hash alone - this checks that a duplicate active entry was not created
|
| // using a key in the meantime.
|
| - void OnEntryOpenedFromHash(uint64 hash,
|
| + void OnEntryOpenedFromHash(uint64_t hash,
|
| Entry** entry,
|
| const scoped_refptr<SimpleEntryImpl>& simple_entry,
|
| const CompletionCallback& callback,
|
| @@ -188,7 +191,7 @@ class NET_EXPORT_PRIVATE SimpleBackendImpl : public Backend,
|
|
|
| // A callback thunk used by DoomEntries to clear the |entries_pending_doom_|
|
| // after a mass doom.
|
| - void DoomEntriesComplete(scoped_ptr<std::vector<uint64> > entry_hashes,
|
| + void DoomEntriesComplete(scoped_ptr<std::vector<uint64_t>> entry_hashes,
|
| const CompletionCallback& callback,
|
| int result);
|
|
|
| @@ -207,7 +210,7 @@ class NET_EXPORT_PRIVATE SimpleBackendImpl : public Backend,
|
| // these entries cannot have Doom/Create/Open operations run until the doom
|
| // is complete. The base::Closure map target is used to store deferred
|
| // operations to be run at the completion of the Doom.
|
| - base::hash_map<uint64, std::vector<base::Closure> > entries_pending_doom_;
|
| + base::hash_map<uint64_t, std::vector<base::Closure>> entries_pending_doom_;
|
|
|
| net::NetLog* const net_log_;
|
| };
|
|
|