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

Side by Side Diff: third_party/WebKit/Source/devtools/hosted_mode/cache.js

Issue 2167413002: DevTools: implement proxy server for hosted mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
OLDNEW
(Empty)
1 var Cache = function()
lushnikov 2016/07/22 02:56:21 inline this all into protocol_files_proxy.js
chenwilliam 2016/07/22 17:35:25 Done.
2 {
3 this._data = new Map();
4 this._version = null;
5 };
6
7 Cache.prototype = {
8
9 setVersion: function(version)
10 {
11 this._version = version;
12 },
13
14 hasFile: function(file)
15 {
16 return this._data.has(this._getKey(file));
17 },
18
19 getFile: function(file)
20 {
21 return this._data.get(this._getKey(file));
22 },
23
24 cacheFile: function(file, data)
25 {
26 this._data.set(this._getKey(file), data);
27 },
28
29 _getKey: function(file)
30 {
31 return `${file}__version:${this._version}`;
32 }
33 };
34
35 module.exports = Cache;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698