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

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

Issue 1262603004: Move ServiceWorker public headers to public/{web,platform}/modules/serviceworker (3/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
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 "config.h" 5 #include "config.h"
6 #include "modules/cachestorage/CacheStorageError.h" 6 #include "modules/cachestorage/CacheStorageError.h"
7 7
8 #include "core/dom/DOMException.h" 8 #include "core/dom/DOMException.h"
9 #include "core/dom/ExceptionCode.h" 9 #include "core/dom/ExceptionCode.h"
10 #include "modules/cachestorage/Cache.h" 10 #include "modules/cachestorage/Cache.h"
11 #include "public/platform/WebServiceWorkerCacheError.h" 11 #include "public/platform/modules/serviceworker/WebServiceWorkerCacheError.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 DOMException* CacheStorageError::createException(WebServiceWorkerCacheError webE rror) 15 DOMException* CacheStorageError::createException(WebServiceWorkerCacheError webE rror)
16 { 16 {
17 switch (webError) { 17 switch (webError) {
18 case WebServiceWorkerCacheErrorNotImplemented: 18 case WebServiceWorkerCacheErrorNotImplemented:
19 return DOMException::create(NotSupportedError, "Method is not implemente d."); 19 return DOMException::create(NotSupportedError, "Method is not implemente d.");
20 case WebServiceWorkerCacheErrorNotFound: 20 case WebServiceWorkerCacheErrorNotFound:
21 return DOMException::create(NotFoundError, "Entry was not found."); 21 return DOMException::create(NotFoundError, "Entry was not found.");
22 case WebServiceWorkerCacheErrorExists: 22 case WebServiceWorkerCacheErrorExists:
23 return DOMException::create(InvalidAccessError, "Entry already exists.") ; 23 return DOMException::create(InvalidAccessError, "Entry already exists.") ;
24 default: 24 default:
25 ASSERT_NOT_REACHED(); 25 ASSERT_NOT_REACHED();
26 return DOMException::create(NotSupportedError, "Unknown error."); 26 return DOMException::create(NotSupportedError, "Unknown error.");
27 } 27 }
28 } 28 }
29 29
30 } // namespace blink 30 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/cachestorage/CacheStorageError.h ('k') | Source/modules/cachestorage/CacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698