| Index: net/http/http_cache.cc
|
| diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
|
| index eaaffe48c1bf538768e39d46bd5505b71f7e0614..8e55ef64c3de27ea873aa46832ac0d2c1ddbe8f3 100644
|
| --- a/net/http/http_cache.cc
|
| +++ b/net/http/http_cache.cc
|
| @@ -739,7 +739,9 @@ void HttpCache::DeletePendingOp(PendingOp* pending_op) {
|
| delete pending_op;
|
| }
|
|
|
| -int HttpCache::OpenEntry(const std::string& key, ActiveEntry** entry,
|
| +int HttpCache::OpenEntry(const std::string& key,
|
| + ActiveEntry** entry,
|
| + disk_cache::Backend::OracleCallback oracle_callback,
|
| Transaction* trans) {
|
| ActiveEntry* active_entry = FindActiveEntry(key);
|
| if (active_entry) {
|
| @@ -747,6 +749,7 @@ int HttpCache::OpenEntry(const std::string& key, ActiveEntry** entry,
|
| return OK;
|
| }
|
|
|
| + // ### store the oracle callback in this case?
|
| std::unique_ptr<WorkItem> item =
|
| base::MakeUnique<WorkItem>(WI_OPEN_ENTRY, trans, entry);
|
| PendingOp* pending_op = GetPendingOp(key);
|
| @@ -761,8 +764,13 @@ int HttpCache::OpenEntry(const std::string& key, ActiveEntry** entry,
|
| pending_op->callback = base::Bind(&HttpCache::OnPendingOpComplete,
|
| GetWeakPtr(), pending_op);
|
|
|
| - int rv = disk_cache_->OpenEntry(key, &(pending_op->disk_entry),
|
| - pending_op->callback);
|
| + int rv;
|
| + if (oracle_callback.is_null())
|
| + rv = disk_cache_->OpenEntry(key, &(pending_op->disk_entry),
|
| + pending_op->callback);
|
| + else
|
| + rv = disk_cache_->OpenEntryWithOracleByte(
|
| + key, &(pending_op->disk_entry), oracle_callback, pending_op->callback);
|
| if (rv != ERR_IO_PENDING) {
|
| pending_op->writer->ClearTransaction();
|
| pending_op->callback.Run(rv);
|
|
|