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

Side by Side Diff: lib/compat.js

Issue 29339346: Noissue - Removed obsolete nsIURI compatbility code (Closed)
Patch Set: Created April 4, 2016, 11:20 a.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 | « no previous file | lib/utils.js » ('j') | lib/utils.js » ('J')
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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 }, 126 },
127 normalize: function() {} 127 normalize: function() {}
128 }; 128 };
129 129
130 // 130 //
131 // Services.jsm module emulation 131 // Services.jsm module emulation
132 // 132 //
133 133
134 var Services = 134 var Services =
135 { 135 {
136 io: {
137 newURI: function(uri)
Sebastian Noack 2016/04/04 11:22:26 These functions aren't called (directly) on Chrome
138 {
139 if (!uri.length || uri[0] == "~")
140 throw new Error("Invalid URI");
141
142 /^([^:\/]*)/.test(uri);
143 var scheme = RegExp.$1.toLowerCase();
144
145 return {
146 scheme: scheme,
147 spec: uri,
148 QueryInterface: function()
149 {
150 return this;
151 }
152 };
153 },
154 newFileURI: function(file)
155 {
156 var result = this.newURI("file:///" + file.path);
157 result.file = file;
158 return result;
159 }
160 },
161 obs: { 136 obs: {
162 addObserver: function() {}, 137 addObserver: function() {},
163 removeObserver: function() {} 138 removeObserver: function() {}
164 }, 139 },
165 vc: { 140 vc: {
166 compare: function(v1, v2) 141 compare: function(v1, v2)
167 { 142 {
168 function parsePart(s) 143 function parsePart(s)
169 { 144 {
170 if (!s) 145 if (!s)
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 status: -1, 256 status: -1,
282 notificationCallbacks: {}, 257 notificationCallbacks: {},
283 loadFlags: 0, 258 loadFlags: 0,
284 INHIBIT_CACHING: 0, 259 INHIBIT_CACHING: 0,
285 VALIDATE_ALWAYS: 0, 260 VALIDATE_ALWAYS: 0,
286 QueryInterface: function() 261 QueryInterface: function()
287 { 262 {
288 return this; 263 return this;
289 } 264 }
290 }; 265 };
OLDNEW
« no previous file with comments | « no previous file | lib/utils.js » ('j') | lib/utils.js » ('J')

Powered by Google App Engine
This is Rietveld