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

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

Issue 1311693004: [DevTools] UI for blocked URLs. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/devtools.gypi ('k') | Source/devtools/front_end/inspectorStyle.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/common/ParsedURL.js
diff --git a/Source/devtools/front_end/common/ParsedURL.js b/Source/devtools/front_end/common/ParsedURL.js
index 2079651e6065b439efbe8208e726cd8c146a5645..b4980e1c707b58d7a9bfac9657fbd430b3ba1ccd 100644
--- a/Source/devtools/front_end/common/ParsedURL.js
+++ b/Source/devtools/front_end/common/ParsedURL.js
@@ -254,7 +254,25 @@ WebInspector.ParsedURL.prototype = {
lastPathComponentWithFragment: function()
{
return this.lastPathComponent + (this.fragment ? "#" + this.fragment : "");
- }
+ },
+
+ /**
+ * @return {string}
+ */
+ domain: function()
+ {
+ return this.host + (this.port ? ":" + this.port : "");
+ },
+
+ /**
+ * @return {string}
+ */
+ urlWithoutScheme: function()
+ {
+ if (this.scheme && this.url.startsWith(this.scheme + "://"))
+ return this.url.substring(this.scheme.length + 3);
+ return this.url;
+ },
}
/**
« no previous file with comments | « Source/devtools/devtools.gypi ('k') | Source/devtools/front_end/inspectorStyle.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698