Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * | 10 * |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 var splittedPath = folderPath.split("/"); | 113 var splittedPath = folderPath.split("/"); |
| 114 for (var i = 1; i < splittedPath.length; ++i) { | 114 for (var i = 1; i < splittedPath.length; ++i) { |
| 115 if (!splittedPath[i]) | 115 if (!splittedPath[i]) |
| 116 continue; | 116 continue; |
| 117 result.push(splittedPath[i]); | 117 result.push(splittedPath[i]); |
| 118 } | 118 } |
| 119 result.push(name); | 119 result.push(name); |
| 120 return result; | 120 return result; |
| 121 } | 121 } |
| 122 | 122 |
| 123 | |
|
sergeyv
2014/08/13 14:14:58
Do you really need want to do this?
| |
| 124 /** | 123 /** |
| 125 * http://tools.ietf.org/html/rfc3986#section-5.2.4 | 124 * http://tools.ietf.org/html/rfc3986#section-5.2.4 |
| 126 * @param {string} path | 125 * @param {string} path |
| 127 * @return {string} | 126 * @return {string} |
| 128 */ | 127 */ |
| 129 | 128 |
| 130 WebInspector.ParsedURL.normalizePath = function(path) | 129 WebInspector.ParsedURL.normalizePath = function(path) |
| 131 { | 130 { |
| 132 if (path.indexOf("..") === -1 && path.indexOf('.') === -1) | 131 if (path.indexOf("..") === -1 && path.indexOf('.') === -1) |
| 133 return path; | 132 return path; |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 272 /** | 271 /** |
| 273 * @return {?WebInspector.ParsedURL} | 272 * @return {?WebInspector.ParsedURL} |
| 274 */ | 273 */ |
| 275 String.prototype.asParsedURL = function() | 274 String.prototype.asParsedURL = function() |
| 276 { | 275 { |
| 277 var parsedURL = new WebInspector.ParsedURL(this.toString()); | 276 var parsedURL = new WebInspector.ParsedURL(this.toString()); |
| 278 if (parsedURL.isValid) | 277 if (parsedURL.isValid) |
| 279 return parsedURL; | 278 return parsedURL; |
| 280 return null; | 279 return null; |
| 281 } | 280 } |
| OLD | NEW |