Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2407)

Unified Diff: net/http/http_cache.h

Issue 197016: Http Cache: Add support for resuming downloading a... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/http/http_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache.h
===================================================================
--- net/http/http_cache.h (revision 25542)
+++ net/http/http_cache.h (working copy)
@@ -97,18 +97,23 @@
virtual HttpCache* GetCache();
virtual void Suspend(bool suspend);
- // Helper function for reading response info from the disk cache.
+ // Helper function for reading response info from the disk cache. If the
+ // cache doesn't have the whole resource *|request_truncated| is set to true.
static bool ReadResponseInfo(disk_cache::Entry* disk_entry,
- HttpResponseInfo* response_info);
+ HttpResponseInfo* response_info,
+ bool* response_truncated);
- // Helper function for writing response info into the disk cache.
+ // Helper function for writing response info into the disk cache. If the
+ // cache doesn't have the whole resource |request_truncated| should be true.
static bool WriteResponseInfo(disk_cache::Entry* disk_entry,
const HttpResponseInfo* response_info,
- bool skip_transient_headers);
+ bool skip_transient_headers,
+ bool response_truncated);
// Given a header data blob, convert it to a response info object.
static bool ParseResponseInfo(const char* data, int len,
- HttpResponseInfo* response_info);
+ HttpResponseInfo* response_info,
+ bool* response_truncated);
// Get/Set the cache's mode.
void set_mode(Mode value) { mode_ = value; }
@@ -162,7 +167,7 @@
ActiveEntry* CreateEntry(const std::string& cache_key);
void DestroyEntry(ActiveEntry* entry);
int AddTransactionToEntry(ActiveEntry* entry, Transaction* trans);
- void DoneWithEntry(ActiveEntry* entry, Transaction* trans);
+ void DoneWithEntry(ActiveEntry* entry, Transaction* trans, bool cancel);
void DoneWritingToEntry(ActiveEntry* entry, bool success);
void DoneReadingFromEntry(ActiveEntry* entry, Transaction* trans);
void ConvertWriterToReader(ActiveEntry* entry);
« no previous file with comments | « no previous file | net/http/http_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698