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

Side by Side Diff: third_party/WebKit/Source/modules/cachestorage/CacheStorageError.cpp

Issue 2161423003: CacheStorage: caches.match with bad cacheName should resolve with undefined. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "modules/cachestorage/CacheStorageError.h" 5 #include "modules/cachestorage/CacheStorageError.h"
6 6
7 #include "core/dom/DOMException.h" 7 #include "core/dom/DOMException.h"
8 #include "core/dom/ExceptionCode.h" 8 #include "core/dom/ExceptionCode.h"
9 #include "modules/cachestorage/Cache.h" 9 #include "modules/cachestorage/Cache.h"
10 #include "public/platform/modules/serviceworker/WebServiceWorkerCacheError.h" 10 #include "public/platform/modules/serviceworker/WebServiceWorkerCacheError.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 DOMException* CacheStorageError::createException(WebServiceWorkerCacheError webE rror) 14 DOMException* CacheStorageError::createException(WebServiceWorkerCacheError webE rror)
15 { 15 {
16 switch (webError) { 16 switch (webError) {
17 case WebServiceWorkerCacheErrorNotImplemented: 17 case WebServiceWorkerCacheErrorNotImplemented:
18 return DOMException::create(NotSupportedError, "Method is not implemente d."); 18 return DOMException::create(NotSupportedError, "Method is not implemente d.");
19 case WebServiceWorkerCacheErrorNotFound: 19 case WebServiceWorkerCacheErrorNotFound:
20 return DOMException::create(NotFoundError, "Entry was not found."); 20 return DOMException::create(NotFoundError, "Entry was not found.");
21 case WebServiceWorkerCacheErrorExists: 21 case WebServiceWorkerCacheErrorExists:
22 return DOMException::create(InvalidAccessError, "Entry already exists.") ; 22 return DOMException::create(InvalidAccessError, "Entry already exists.") ;
23 case WebServiceWorkerCacheErrorQuotaExceeded: 23 case WebServiceWorkerCacheErrorQuotaExceeded:
24 return DOMException::create(QuotaExceededError, "Quota exceeded."); 24 return DOMException::create(QuotaExceededError, "Quota exceeded.");
25 case WebServiceWorkerCacheErrorCacheNameNotFound:
26 return DOMException::create(NotFoundError, "Cache name was not found.");
27 default: 25 default:
28 ASSERT_NOT_REACHED(); 26 ASSERT_NOT_REACHED();
29 return DOMException::create(NotSupportedError, "Unknown error."); 27 return DOMException::create(NotSupportedError, "Unknown error.");
30 } 28 }
31 } 29 }
32 30
33 } // namespace blink 31 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698