diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-07-14 17:41:05 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-08-04 12:37:36 +0000 |
commit | 399c965b6064c440ddcf4015f5f8e9d131c7a0a6 (patch) | |
tree | 6b06b60ff365abef0e13b3503d593a0df48d20e8 /chromium/net/disk_cache/simple/simple_entry_impl.h | |
parent | 7366110654eec46f21b6824f302356426f48cd74 (diff) | |
download | qtwebengine-chromium-399c965b6064c440ddcf4015f5f8e9d131c7a0a6.tar.gz |
BASELINE: Update Chromium to 52.0.2743.76 and Ninja to 1.7.1
Change-Id: I382f51b959689505a60f8b707255ecb344f7d8b4
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/net/disk_cache/simple/simple_entry_impl.h')
-rw-r--r-- | chromium/net/disk_cache/simple/simple_entry_impl.h | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/chromium/net/disk_cache/simple/simple_entry_impl.h b/chromium/net/disk_cache/simple/simple_entry_impl.h index 4d41edc00f2..3a0317c0ddb 100644 --- a/chromium/net/disk_cache/simple/simple_entry_impl.h +++ b/chromium/net/disk_cache/simple/simple_entry_impl.h @@ -7,12 +7,12 @@ #include <stdint.h> +#include <memory> #include <queue> #include <string> #include "base/files/file_path.h" #include "base/memory/ref_counted.h" -#include "base/memory/scoped_ptr.h" #include "base/threading/thread_checker.h" #include "net/base/cache_type.h" #include "net/base/net_export.h" @@ -65,7 +65,7 @@ class NET_EXPORT_PRIVATE SimpleEntryImpl : public Entry, net::NetLog* net_log); void SetActiveEntryProxy( - scoped_ptr<ActiveEntryProxy> active_entry_proxy); + std::unique_ptr<ActiveEntryProxy> active_entry_proxy); // Adds another reader/writer to this entry, if possible, returning |this| to // |entry|. @@ -79,6 +79,11 @@ class NET_EXPORT_PRIVATE SimpleEntryImpl : public Entry, const std::string& key() const { return key_; } uint64_t entry_hash() const { return entry_hash_; } + + // The key is not a constructor parameter to the SimpleEntryImpl, because + // during cache iteration, it's necessary to open entries by their hash + // alone. In that case, the SimpleSynchronousEntry will read the key from disk + // and it will be set. void SetKey(const std::string& key); // From Entry: @@ -219,7 +224,7 @@ class NET_EXPORT_PRIVATE SimpleEntryImpl : public Entry, void CreationOperationComplete( const CompletionCallback& completion_callback, const base::TimeTicks& start_time, - scoped_ptr<SimpleEntryCreationResults> in_results, + std::unique_ptr<SimpleEntryCreationResults> in_results, Entry** out_entry, net::NetLog::EventType end_event_type); @@ -232,35 +237,35 @@ class NET_EXPORT_PRIVATE SimpleEntryImpl : public Entry, // |completion_callback| after updating state and dooming on errors. void EntryOperationComplete(const CompletionCallback& completion_callback, const SimpleEntryStat& entry_stat, - scoped_ptr<int> result); + std::unique_ptr<int> result); // Called after an asynchronous read. Updates |crc32s_| if possible. void ReadOperationComplete(int stream_index, int offset, const CompletionCallback& completion_callback, - scoped_ptr<uint32_t> read_crc32, - scoped_ptr<SimpleEntryStat> entry_stat, - scoped_ptr<int> result); + std::unique_ptr<uint32_t> read_crc32, + std::unique_ptr<SimpleEntryStat> entry_stat, + std::unique_ptr<int> result); // Called after an asynchronous write completes. void WriteOperationComplete(int stream_index, const CompletionCallback& completion_callback, - scoped_ptr<SimpleEntryStat> entry_stat, - scoped_ptr<int> result); + std::unique_ptr<SimpleEntryStat> entry_stat, + std::unique_ptr<int> result); void ReadSparseOperationComplete( const CompletionCallback& completion_callback, - scoped_ptr<base::Time> last_used, - scoped_ptr<int> result); + std::unique_ptr<base::Time> last_used, + std::unique_ptr<int> result); void WriteSparseOperationComplete( const CompletionCallback& completion_callback, - scoped_ptr<SimpleEntryStat> entry_stat, - scoped_ptr<int> result); + std::unique_ptr<SimpleEntryStat> entry_stat, + std::unique_ptr<int> result); void GetAvailableRangeOperationComplete( const CompletionCallback& completion_callback, - scoped_ptr<int> result); + std::unique_ptr<int> result); // Called after an asynchronous doom completes. void DoomOperationComplete(const CompletionCallback& callback, @@ -270,11 +275,10 @@ class NET_EXPORT_PRIVATE SimpleEntryImpl : public Entry, // Called after validating the checksums on an entry. Passes through the // original result if successful, propagates the error if the checksum does // not validate. - void ChecksumOperationComplete( - int stream_index, - int orig_result, - const CompletionCallback& completion_callback, - scoped_ptr<int> result); + void ChecksumOperationComplete(int stream_index, + int orig_result, + const CompletionCallback& completion_callback, + std::unique_ptr<int> result); // Called after completion of asynchronous IO and receiving file metadata for // the entry in |entry_stat|. Updates the metadata in the entry and in the @@ -304,7 +308,7 @@ class NET_EXPORT_PRIVATE SimpleEntryImpl : public Entry, int length, int stream_index); - scoped_ptr<ActiveEntryProxy> active_entry_proxy_; + std::unique_ptr<ActiveEntryProxy> active_entry_proxy_; // All nonstatic SimpleEntryImpl methods should always be called on the IO // thread, in all cases. |io_thread_checker_| documents and enforces this. @@ -366,7 +370,7 @@ class NET_EXPORT_PRIVATE SimpleEntryImpl : public Entry, net::BoundNetLog net_log_; - scoped_ptr<SimpleEntryOperation> executing_operation_; + std::unique_ptr<SimpleEntryOperation> executing_operation_; // Unlike other streams, stream 0 data is read from the disk when the entry is // opened, and then kept in memory. All read/write operations on stream 0 |