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

Unified Diff: third_party/WebKit/Source/devtools/front_end/common/ParsedURL.js

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/common/ParsedURL.js
diff --git a/third_party/WebKit/Source/devtools/front_end/common/ParsedURL.js b/third_party/WebKit/Source/devtools/front_end/common/ParsedURL.js
index 13eca1a2dc148c67e820e49ef5a34b57ff124377..a662928943705cce19fd302f1a2b73c9a074ecb0 100644
--- a/third_party/WebKit/Source/devtools/front_end/common/ParsedURL.js
+++ b/third_party/WebKit/Source/devtools/front_end/common/ParsedURL.js
@@ -29,7 +29,7 @@
/**
* @unrestricted
*/
-WebInspector.ParsedURL = class {
+Common.ParsedURL = class {
/**
* @param {string} url
*/
@@ -45,7 +45,7 @@ WebInspector.ParsedURL = class {
this.folderPathComponents = '';
this.lastPathComponent = '';
- var match = url.match(WebInspector.ParsedURL._urlRegex());
+ var match = url.match(Common.ParsedURL._urlRegex());
if (match) {
this.isValid = true;
this.scheme = match[1].toLowerCase();
@@ -94,8 +94,8 @@ WebInspector.ParsedURL = class {
* @return {!RegExp}
*/
static _urlRegex() {
- if (WebInspector.ParsedURL._urlRegexInstance)
- return WebInspector.ParsedURL._urlRegexInstance;
+ if (Common.ParsedURL._urlRegexInstance)
+ return Common.ParsedURL._urlRegexInstance;
// RegExp groups:
// 1 - scheme (using the RFC3986 grammar)
// 2 - hostname
@@ -110,10 +110,10 @@ WebInspector.ParsedURL = class {
var queryRegex = /(?:\?([^#]*))?/;
var fragmentRegex = /(?:#(.*))?/;
- WebInspector.ParsedURL._urlRegexInstance = new RegExp(
+ Common.ParsedURL._urlRegexInstance = new RegExp(
'^' + schemeRegex.source + hostRegex.source + portRegex.source + pathRegex.source + queryRegex.source +
fragmentRegex.source + '$');
- return WebInspector.ParsedURL._urlRegexInstance;
+ return Common.ParsedURL._urlRegexInstance;
}
/**
@@ -321,10 +321,10 @@ WebInspector.ParsedURL = class {
/**
- * @return {?WebInspector.ParsedURL}
+ * @return {?Common.ParsedURL}
*/
String.prototype.asParsedURL = function() {
- var parsedURL = new WebInspector.ParsedURL(this.toString());
+ var parsedURL = new Common.ParsedURL(this.toString());
if (parsedURL.isValid)
return parsedURL;
return null;

Powered by Google App Engine
This is Rietveld 408576698