| Index: net/http/mock_http_cache.h
|
| diff --git a/net/http/mock_http_cache.h b/net/http/mock_http_cache.h
|
| index bc7847b7bfff8b541ada5049b7a6c2453141b661..97bfded034d76bb41dc5fd360cff9b7d1d688544 100644
|
| --- a/net/http/mock_http_cache.h
|
| +++ b/net/http/mock_http_cache.h
|
| @@ -70,6 +70,9 @@ class MockDiskEntry : public disk_cache::Entry,
|
| void CancelSparseIO() override;
|
| int ReadyForSparseIO(const CompletionCallback& completion_callback) override;
|
|
|
| + uint8_t in_memory_data() const { return in_memory_data_; }
|
| + void set_in_memory_data(uint8_t val) { in_memory_data_ = val; }
|
| +
|
| // Fail most subsequent requests.
|
| void set_fail_requests() { fail_requests_ = true; }
|
|
|
| @@ -112,6 +115,7 @@ class MockDiskEntry : public disk_cache::Entry,
|
|
|
| std::string key_;
|
| std::vector<char> data_[kNumCacheEntryDataIndices];
|
| + uint8_t in_memory_data_;
|
| int test_mode_;
|
| bool doomed_;
|
| bool sparse_;
|
| @@ -157,6 +161,8 @@ class MockDiskCache : public disk_cache::Backend {
|
| size_t DumpMemoryStats(
|
| base::trace_event::ProcessMemoryDump* pmd,
|
| const std::string& parent_absolute_name) const override;
|
| + uint8_t GetEntryInMemoryData(const std::string& key) override;
|
| + void SetEntryInMemoryData(const std::string& key, uint8_t data) override;
|
|
|
| // Returns number of times a cache entry was successfully opened.
|
| int open_count() const { return open_count_; }
|
| @@ -176,6 +182,12 @@ class MockDiskCache : public disk_cache::Backend {
|
| // Makes sure that CreateEntry is not called twice for a given key.
|
| void set_double_create_check(bool value) { double_create_check_ = value; }
|
|
|
| + // Determines whether to provide the GetEntryInMemoryData/SetEntryInMemoryData
|
| + // interface. Default is true.
|
| + void set_support_in_memory_entry_data(bool value) {
|
| + support_in_memory_entry_data_ = value;
|
| + }
|
| +
|
| // Makes all requests for data ranges to fail as not implemented.
|
| void set_fail_sparse_requests() { fail_sparse_requests_ = true; }
|
|
|
| @@ -209,6 +221,7 @@ class MockDiskCache : public disk_cache::Backend {
|
| bool soft_failures_;
|
| bool double_create_check_;
|
| bool fail_sparse_requests_;
|
| + bool support_in_memory_entry_data_;
|
|
|
| // Used for pause and restart.
|
| MockDiskEntry::DeferOp defer_op_;
|
|
|