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

Unified Diff: content/browser/service_worker/service_worker_cache_storage.cc

Issue 465463002: Initial implementation of ServiceWorkerCache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cache2
Patch Set: Nits Created 6 years, 4 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
Index: content/browser/service_worker/service_worker_cache_storage.cc
diff --git a/content/browser/service_worker/service_worker_cache_storage.cc b/content/browser/service_worker/service_worker_cache_storage.cc
index 8551163f806c54a6fe58242115908ff2d8d4840f..bc1898ef47f0bfbf4be7e5a3edd43b0db6e91d2d 100644
--- a/content/browser/service_worker/service_worker_cache_storage.cc
+++ b/content/browser/service_worker/service_worker_cache_storage.cc
@@ -12,6 +12,7 @@
#include "base/sha1.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
+#include "content/browser/fileapi/chrome_blob_storage_context.h"
michaeln 2014/08/14 22:59:00 is this needed or is the include for blob_storage_
jkarlin 2014/08/15 11:49:44 Done.
#include "content/browser/service_worker/service_worker_cache.h"
#include "content/browser/service_worker/service_worker_cache.pb.h"
#include "content/public/browser/browser_thread.h"
@@ -64,7 +65,7 @@ class ServiceWorkerCacheStorage::CacheLoader
friend class base::RefCountedThreadSafe<
ServiceWorkerCacheStorage::CacheLoader>;
- virtual ~CacheLoader() {};
+ virtual ~CacheLoader() {}
virtual void LoadCacheImpl(const std::string&) {}
scoped_refptr<base::SequencedTaskRunner> cache_task_runner_;
@@ -535,10 +536,10 @@ void ServiceWorkerCacheStorage::EnumerateCaches(
void ServiceWorkerCacheStorage::DidCreateBackend(
base::WeakPtr<ServiceWorkerCache> cache,
const CacheAndErrorCallback& callback,
- bool success) {
+ ServiceWorkerCache::ErrorType error) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- if (!success || !cache) {
+ if (error != ServiceWorkerCache::ErrorTypeOK) {
// TODO(jkarlin): This should delete the directory and try again in case
// the cache is simply corrupt.
callback.Run(0, CACHE_STORAGE_ERROR_STORAGE);

Powered by Google App Engine
This is Rietveld 408576698