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

Side by Side Diff: Source/core/fetch/CachedMetadataHandler.h

Issue 929953002: CachedMetadata support for ServiceWorker script. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated vivekg's comment Created 5 years, 10 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CachedMetadataHandler_h
6 #define CachedMetadataHandler_h
7
8 #include "wtf/Forward.h"
9
10 namespace blink {
11
12 class CachedMetadata;
13
14 class CachedMetadataHandler {
kinuko 2015/02/16 14:18:38 Can we have a brief class comment for this?
horo 2015/02/16 16:20:11 Done.
15 public:
16 enum CacheType {
17 SendToPlatform, // send cache data to blink::Platform::cacheMetadata
18 CacheLocally // cache only in Resource's member variables
19 };
20 virtual ~CachedMetadataHandler() { }
21 // Caches the given metadata in association with this resource and suggests
22 // that the platform persist it. The dataTypeID is a pseudo-randomly chosen
23 // identifier that is used to distinguish data generated by the caller.
24 virtual void setCachedMetadata(unsigned, const char*, size_t, CacheType = Se ndToPlatform) = 0;
kinuko 2015/02/16 14:18:38 unsigned -> unsigned dataTypeID otherwise the com
horo 2015/02/16 16:20:11 Done.
25 // Reset existing metadata, to allow setting new data.
26 virtual void clearCachedMetadata(CacheType = CacheLocally) = 0;
27 // Returns cached metadata of the given type associated with this resource.
28 virtual CachedMetadata* cachedMetadata(unsigned dataTypeID) const = 0;
29 // Returns the encoding to which the cache is specific.
30 virtual String encoding() const = 0;
31
32 protected:
33 CachedMetadataHandler() { }
34 };
35
36 }
37
38 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698