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

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: Put and Match mostly work with blobs but the first few bytes are screwy 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..8dc17cbca837a18815a2130d8c4bbd83d91e6424 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"
#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"
@@ -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