Index: content/browser/appcache/appcache_job.cc |
diff --git a/content/browser/appcache/appcache_job.cc b/content/browser/appcache/appcache_job.cc |
index 27a5897298f9aef2f51c2c5714d95333554a012a..fa8f185892d94306d8a5156860146037658fd665 100644 |
--- a/content/browser/appcache/appcache_job.cc |
+++ b/content/browser/appcache/appcache_job.cc |
@@ -23,7 +23,8 @@ std::unique_ptr<AppCacheJob> AppCacheJob::Create( |
std::unique_ptr<AppCacheJob> job; |
if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kEnableNetworkService)) { |
- job.reset(new AppCacheURLLoaderJob); |
+ job.reset( |
+ new AppCacheURLLoaderJob(*(request->GetResourceRequest()), storage)); |
} else { |
job.reset(new AppCacheURLRequestJob(request->GetURLRequest(), |
network_delegate, storage, host, |
@@ -34,6 +35,26 @@ std::unique_ptr<AppCacheJob> AppCacheJob::Create( |
AppCacheJob::~AppCacheJob() {} |
+bool AppCacheJob::IsWaiting() const { |
+ return delivery_type_ == AWAITING_DELIVERY_ORDERS; |
+} |
+ |
+bool AppCacheJob::IsDeliveringAppCacheResponse() const { |
+ return delivery_type_ == APPCACHED_DELIVERY; |
+} |
+ |
+bool AppCacheJob::IsDeliveringNetworkResponse() const { |
+ return delivery_type_ == NETWORK_DELIVERY; |
+} |
+ |
+bool AppCacheJob::IsDeliveringErrorResponse() const { |
+ return delivery_type_ == ERROR_DELIVERY; |
+} |
+ |
+bool AppCacheJob::IsCacheEntryNotFound() const { |
+ return cache_entry_not_found_; |
+} |
+ |
base::WeakPtr<AppCacheJob> AppCacheJob::GetWeakPtr() { |
return weak_factory_.GetWeakPtr(); |
} |
@@ -46,6 +67,9 @@ AppCacheURLLoaderJob* AppCacheJob::AsURLLoaderJob() { |
return nullptr; |
} |
-AppCacheJob::AppCacheJob() : weak_factory_(this) {} |
+AppCacheJob::AppCacheJob() |
+ : cache_entry_not_found_(false), |
+ delivery_type_(AWAITING_DELIVERY_ORDERS), |
+ weak_factory_(this) {} |
} // namespace content |