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

Side by Side Diff: Source/modules/serviceworkers/CacheStorage.cpp

Issue 489473002: refer to WebServiceWorkerCacheError values in c++03 style (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | 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 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 #include "config.h" 5 #include "config.h"
6 #include "modules/serviceworkers/CacheStorage.h" 6 #include "modules/serviceworkers/CacheStorage.h"
7 7
8 #include "bindings/core/v8/ScriptPromiseResolver.h" 8 #include "bindings/core/v8/ScriptPromiseResolver.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "modules/serviceworkers/Cache.h" 10 #include "modules/serviceworkers/Cache.h"
11 #include "public/platform/WebServiceWorkerCacheError.h" 11 #include "public/platform/WebServiceWorkerCacheError.h"
12 #include "public/platform/WebServiceWorkerCacheStorage.h" 12 #include "public/platform/WebServiceWorkerCacheStorage.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 namespace { 16 namespace {
17 17
18 const char* CacheErrorToString(WebServiceWorkerCacheError reason) 18 const char* CacheErrorToString(WebServiceWorkerCacheError reason)
19 { 19 {
20 // FIXME: Construct correct DOM error objects rather than returning strings. 20 // FIXME: Construct correct DOM error objects rather than returning strings.
21 switch (reason) { 21 switch (reason) {
22 case WebServiceWorkerCacheError::WebServiceWorkerCacheErrorNotImplemented: 22 case WebServiceWorkerCacheErrorNotImplemented:
23 return "not implemented"; 23 return "not implemented";
24 case WebServiceWorkerCacheError::WebServiceWorkerCacheErrorNotFound: 24 case WebServiceWorkerCacheErrorNotFound:
25 return "not found"; 25 return "not found";
26 case WebServiceWorkerCacheError::WebServiceWorkerCacheErrorExists: 26 case WebServiceWorkerCacheErrorExists:
27 return "entry already exists"; 27 return "entry already exists";
28 default: 28 default:
29 ASSERT_NOT_REACHED(); 29 ASSERT_NOT_REACHED();
30 return "unknown error"; 30 return "unknown error";
31 } 31 }
32 } 32 }
33 33
34 class CacheStorageCallbacks : public WebServiceWorkerCacheStorage::CacheStorageC allbacks { 34 class CacheStorageCallbacks : public WebServiceWorkerCacheStorage::CacheStorageC allbacks {
35 WTF_MAKE_NONCOPYABLE(CacheStorageCallbacks); 35 WTF_MAKE_NONCOPYABLE(CacheStorageCallbacks);
36 public: 36 public:
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 return promise; 166 return promise;
167 } 167 }
168 168
169 CacheStorage::CacheStorage(WebServiceWorkerCacheStorage* webCacheStorage) : m_we bCacheStorage(webCacheStorage) 169 CacheStorage::CacheStorage(WebServiceWorkerCacheStorage* webCacheStorage) : m_we bCacheStorage(webCacheStorage)
170 { 170 {
171 ScriptWrappable::init(this); 171 ScriptWrappable::init(this);
172 } 172 }
173 173
174 } // namespace blink 174 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698