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

Side by Side Diff: content/browser/service_worker/service_worker_cache_storage.h

Issue 539673003: Service Workers: Allow empty string as cache name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sw-gavin
Patch Set: Update test, remove unused enum value Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_STORAGE_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_STORAGE_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_STORAGE_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_STORAGE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 29 matching lines...) Expand all
40 40
41 // The CacheID returned on failed cache operations. 41 // The CacheID returned on failed cache operations.
42 const static int kInvalidCacheID; 42 const static int kInvalidCacheID;
43 43
44 enum CacheStorageError { 44 enum CacheStorageError {
45 CACHE_STORAGE_ERROR_NO_ERROR, 45 CACHE_STORAGE_ERROR_NO_ERROR,
46 CACHE_STORAGE_ERROR_NOT_IMPLEMENTED, 46 CACHE_STORAGE_ERROR_NOT_IMPLEMENTED,
47 CACHE_STORAGE_ERROR_NOT_FOUND, 47 CACHE_STORAGE_ERROR_NOT_FOUND,
48 CACHE_STORAGE_ERROR_EXISTS, 48 CACHE_STORAGE_ERROR_EXISTS,
49 CACHE_STORAGE_ERROR_STORAGE, 49 CACHE_STORAGE_ERROR_STORAGE,
50 CACHE_STORAGE_ERROR_EMPTY_KEY,
51 CACHE_STORAGE_ERROR_CLOSING 50 CACHE_STORAGE_ERROR_CLOSING
52 }; 51 };
53 52
54 typedef base::Callback<void(bool, CacheStorageError)> BoolAndErrorCallback; 53 typedef base::Callback<void(bool, CacheStorageError)> BoolAndErrorCallback;
55 typedef base::Callback<void(int, CacheStorageError)> CacheAndErrorCallback; 54 typedef base::Callback<void(int, CacheStorageError)> CacheAndErrorCallback;
56 typedef base::Callback<void(const std::vector<std::string>&, 55 typedef base::Callback<void(const std::vector<std::string>&,
57 CacheStorageError)> StringsAndErrorCallback; 56 CacheStorageError)> StringsAndErrorCallback;
58 57
59 ServiceWorkerCacheStorage( 58 ServiceWorkerCacheStorage(
60 const base::FilePath& origin_path, 59 const base::FilePath& origin_path,
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 scoped_ptr<CacheLoader> cache_loader_; 162 scoped_ptr<CacheLoader> cache_loader_;
164 163
165 base::WeakPtrFactory<ServiceWorkerCacheStorage> weak_factory_; 164 base::WeakPtrFactory<ServiceWorkerCacheStorage> weak_factory_;
166 165
167 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerCacheStorage); 166 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerCacheStorage);
168 }; 167 };
169 168
170 } // namespace content 169 } // namespace content
171 170
172 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_STORAGE_H_ 171 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_STORAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698