diff options
Diffstat (limited to 'net/http/http_cache.cc')
-rw-r--r-- | net/http/http_cache.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc index 913dc00..e447031 100644 --- a/net/http/http_cache.cc +++ b/net/http/http_cache.cc @@ -606,6 +606,15 @@ void HttpCache::Transaction::SetRequest(const HttpRequestInfo* request) { if (cache_->mode() == RECORD) effective_load_flags_ |= LOAD_BYPASS_CACHE; + // If HttpCache has type MEDIA make sure LOAD_ENABLE_DOWNLOAD_FILE is set, + // otherwise make sure LOAD_ENABLE_DOWNLOAD_FILE is not set when HttpCache + // has type other than MEDIA. + if (cache_->type() == HttpCache::MEDIA) { + DCHECK(effective_load_flags_ & LOAD_ENABLE_DOWNLOAD_FILE); + } else { + DCHECK(!(effective_load_flags_ & LOAD_ENABLE_DOWNLOAD_FILE)); + } + // Some headers imply load flags. The order here is significant. // // LOAD_DISABLE_CACHE : no cache read or write |