Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: lib/io.js

Issue 29363560: Issue 4552 - Drop jshydra dependency (adblockpluschrome) (Closed)
Patch Set: Remove require parameter Created Nov. 30, 2016, 2:35 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/compat.js ('k') | metadata.common » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 24 matching lines...) Expand all
35 else 35 else
36 errorCallback(new Error("File doesn't exist")); 36 errorCallback(new Error("File doesn't exist"));
37 }); 37 });
38 } 38 }
39 39
40 function saveFile(file, data, callback) 40 function saveFile(file, data, callback)
41 { 41 {
42 ext.storage.set( 42 ext.storage.set(
43 fileToKey(file), 43 fileToKey(file),
44 { 44 {
45 content: data, 45 content: Array.from(data),
46 lastModified: Date.now() 46 lastModified: Date.now()
47 }, 47 },
48 callback 48 callback
49 ); 49 );
50 } 50 }
51 51
52 exports.IO = 52 exports.IO =
53 { 53 {
54 resolveFilePath: function(path) 54 resolveFilePath: function(path)
55 { 55 {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 { 109 {
110 callback(null, { 110 callback(null, {
111 exists: true, 111 exists: true,
112 lastModified: entry.lastModified 112 lastModified: entry.lastModified
113 }); 113 });
114 } 114 }
115 115
116 loadFile(file, onLoaded, callback); 116 loadFile(file, onLoaded, callback);
117 } 117 }
118 }; 118 };
OLDNEW
« no previous file with comments | « lib/compat.js ('k') | metadata.common » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld