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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js

Issue 2587533002: DevTools: consistently use relative name for filesystem resources. (Closed)
Patch Set: same Created 4 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 * @return {string} 102 * @return {string}
103 */ 103 */
104 origin() { 104 origin() {
105 return this._origin; 105 return this._origin;
106 } 106 }
107 107
108 /** 108 /**
109 * @return {string} 109 * @return {string}
110 */ 110 */
111 fullDisplayName() { 111 fullDisplayName() {
112 var parentPath = this._parentURL.replace(/^(?:https?|file)\:\/\//, ''); 112 return this._project.fullDisplayName(this);
113 try {
114 parentPath = decodeURI(parentPath);
115 } catch (e) {
116 }
117 return parentPath + '/' + this.displayName(true);
118 } 113 }
119 114
120 /** 115 /**
121 * @param {boolean=} skipTrim 116 * @param {boolean=} skipTrim
122 * @return {string} 117 * @return {string}
123 */ 118 */
124 displayName(skipTrim) { 119 displayName(skipTrim) {
125 if (!this._name) 120 if (!this._name)
126 return Common.UIString('(index)'); 121 return Common.UIString('(index)');
127 var name = this._name; 122 var name = this._name;
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 Workspace.UISourceCodeMetadata = class { 896 Workspace.UISourceCodeMetadata = class {
902 /** 897 /**
903 * @param {?Date} modificationTime 898 * @param {?Date} modificationTime
904 * @param {?number} contentSize 899 * @param {?number} contentSize
905 */ 900 */
906 constructor(modificationTime, contentSize) { 901 constructor(modificationTime, contentSize) {
907 this.modificationTime = modificationTime; 902 this.modificationTime = modificationTime;
908 this.contentSize = contentSize; 903 this.contentSize = contentSize;
909 } 904 }
910 }; 905 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698