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

Unified Diff: content/browser/appcache/appcache_job.h

Issue 2934953003: Add support for HTTP range requests in the AppCacheURLLoaderImpl class. (Closed)
Patch Set: Fix SetupRangeResponse definition Created 3 years, 6 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 | content/browser/appcache/appcache_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/appcache/appcache_job.h
diff --git a/content/browser/appcache/appcache_job.h b/content/browser/appcache/appcache_job.h
index c18c772eb8a5ea5ba60756215ac147f7be8e5f71..f1af703099f56d0ffa4303cc126b7b8f1fabd972 100644
--- a/content/browser/appcache/appcache_job.h
+++ b/content/browser/appcache/appcache_job.h
@@ -12,9 +12,12 @@
#include "base/sequence_checker.h"
#include "base/strings/string16.h"
#include "content/common/content_export.h"
+#include "net/http/http_byte_range.h"
#include "url/gurl.h"
namespace net {
+class HttpRequestHeaders;
+class HttpResponseInfo;
class NetworkDelegate;
class URLRequestJob;
}
@@ -24,6 +27,8 @@ namespace content {
class AppCacheEntry;
class AppCacheHost;
class AppCacheRequest;
+class AppCacheResponseInfo;
+class AppCacheResponseReader;
class AppCacheStorage;
class AppCacheURLLoaderJob;
class URLRequestJob;
@@ -116,6 +121,11 @@ class CONTENT_EXPORT AppCacheJob : public base::SupportsWeakPtr<AppCacheJob> {
protected:
AppCacheJob();
+ bool is_range_request() const { return range_requested_.IsValid(); }
+
+ void InitializeRangeRequestInfo(const net::HttpRequestHeaders& headers);
+ void SetupRangeResponse();
+
SEQUENCE_CHECKER(sequence_checker_);
// Set to true if the AppCache entry is not found.
@@ -124,6 +134,17 @@ class CONTENT_EXPORT AppCacheJob : public base::SupportsWeakPtr<AppCacheJob> {
// The jobs delivery status.
DeliveryType delivery_type_;
+ // Byte range request if any.
+ net::HttpByteRange range_requested_;
+
+ std::unique_ptr<net::HttpResponseInfo> range_response_info_;
+
+ // The response details.
+ scoped_refptr<AppCacheResponseInfo> info_;
+
+ // Used to read the cache.
+ std::unique_ptr<AppCacheResponseReader> reader_;
+
base::WeakPtrFactory<AppCacheJob> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(AppCacheJob);
« no previous file with comments | « no previous file | content/browser/appcache/appcache_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698