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

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

Issue 311233007: ServiceWorker, remove old Cache API implementation to make way for the polyfill. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
« no previous file with comments | « Source/modules/serviceworkers/Cache.h ('k') | Source/modules/serviceworkers/Cache.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "modules/serviceworkers/Cache.h"
7
8 #include "bindings/v8/ScriptPromise.h"
9 #include "bindings/v8/ScriptPromiseResolver.h"
10 #include "core/dom/DOMError.h"
11 #include "core/dom/ExceptionCode.h"
12 #include "platform/NotImplemented.h"
13
14 namespace WebCore {
15
16 PassRefPtr<Cache> Cache::create(const Vector<String>& urlStrings)
17 {
18 RefPtr<Cache> cache = adoptRef(new Cache);
19 // FIXME: Implement.
20 notImplemented();
21 return cache;
22 }
23
24 Cache::~Cache()
25 {
26 }
27
28 ScriptPromise Cache::match(ScriptState* scriptState, const String& urlString)
29 {
30 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip tState);
31 ScriptPromise promise = resolver->promise();
32
33 // FIXME: Implement.
34 notImplemented();
35 resolver->reject(DOMError::create(NotSupportedError));
36 return promise;
37 }
38
39 ScriptPromise Cache::ready(ScriptState* scriptState)
40 {
41 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip tState);
42 ScriptPromise promise = resolver->promise();
43
44 // FIXME: Implement.
45 notImplemented();
46 resolver->reject(DOMError::create(NotSupportedError));
47 return promise;
48 }
49
50 Cache::Cache()
51 {
52 ScriptWrappable::init(this);
53 }
54
55 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/Cache.h ('k') | Source/modules/serviceworkers/Cache.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698