Index: content/browser/cache_storage/cache_storage_cache.h |
diff --git a/content/browser/cache_storage/cache_storage_cache.h b/content/browser/cache_storage/cache_storage_cache.h |
index c558e2e3f5fc4b5a0e73bb1f1f364ff34474c273..2f8fa2dd0b7e215f74158d4336be9fc932b39658 100644 |
--- a/content/browser/cache_storage/cache_storage_cache.h |
+++ b/content/browser/cache_storage/cache_storage_cache.h |
@@ -39,23 +39,13 @@ class TestCacheStorageCache; |
class CONTENT_EXPORT CacheStorageCache |
: public base::RefCounted<CacheStorageCache> { |
public: |
- // This enum is used in histograms, so do not change the ordering and always |
- // append new types to the end. |
- enum ErrorType { |
- ERROR_TYPE_OK = 0, |
- ERROR_TYPE_EXISTS, |
- ERROR_TYPE_STORAGE, |
- ERROR_TYPE_NOT_FOUND, |
- ERROR_TYPE_LAST = ERROR_TYPE_NOT_FOUND |
- }; |
- |
- typedef base::Callback<void(ErrorType)> ErrorCallback; |
- typedef base::Callback<void(ErrorType, |
+ typedef base::Callback<void(CacheStorageError)> ErrorCallback; |
jkarlin
2015/05/08 12:38:19
using ErrorCallback = ...
nhiroki
2015/05/08 14:14:49
Done.
|
+ typedef base::Callback<void(CacheStorageError, |
jkarlin
2015/05/08 12:38:19
ditto
nhiroki
2015/05/08 14:14:49
Done.
|
scoped_ptr<ServiceWorkerResponse>, |
scoped_ptr<storage::BlobDataHandle>)> |
ResponseCallback; |
typedef std::vector<ServiceWorkerFetchRequest> Requests; |
- typedef base::Callback<void(ErrorType, scoped_ptr<Requests>)> |
+ typedef base::Callback<void(CacheStorageError, scoped_ptr<Requests>)> |
RequestsCallback; |
static scoped_refptr<CacheStorageCache> CreateMemoryCache( |
@@ -87,7 +77,7 @@ class CONTENT_EXPORT CacheStorageCache |
const ErrorCallback& callback); |
// TODO(jkarlin): Have keys take an optional ServiceWorkerFetchRequest. |
- // Returns ErrorTypeOK and a vector of requests if there are no errors. |
+ // Returns CACHE_STORAGE_OK and a vector of requests if there are no errors. |
void Keys(const RequestsCallback& callback); |
// Closes the backend. Future operations that require the backend |
@@ -142,7 +132,8 @@ class CONTENT_EXPORT CacheStorageCache |
// Put callbacks. |
void PutImpl(scoped_ptr<PutContext> put_context); |
- void PutDidDelete(scoped_ptr<PutContext> put_context, ErrorType delete_error); |
+ void PutDidDelete(scoped_ptr<PutContext> put_context, |
+ CacheStorageError delete_error); |
void PutDidCreateEntry(scoped_ptr<PutContext> put_context, int rv); |
void PutDidWriteHeaders(scoped_ptr<PutContext> put_context, |
int expected_bytes, |
@@ -182,17 +173,18 @@ class CONTENT_EXPORT CacheStorageCache |
int rv); |
void InitBackend(); |
- void InitDone(ErrorType error); |
+ void InitDone(CacheStorageError error); |
void PendingClosure(const base::Closure& callback); |
- void PendingErrorCallback(const ErrorCallback& callback, ErrorType error); |
+ void PendingErrorCallback(const ErrorCallback& callback, |
+ CacheStorageError error); |
void PendingResponseCallback( |
const ResponseCallback& callback, |
- ErrorType error, |
+ CacheStorageError error, |
scoped_ptr<ServiceWorkerResponse> response, |
scoped_ptr<storage::BlobDataHandle> blob_data_handle); |
void PendingRequestsCallback(const RequestsCallback& callback, |
- ErrorType error, |
+ CacheStorageError error, |
scoped_ptr<Requests> requests); |
// Be sure to check |backend_state_| before use. |