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

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

Issue 2697403003: DevTools: "Delete File" in navigator should actually delete a file (Closed)
Patch Set: address comments Created 3 years, 10 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 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 if (success) { 159 if (success) {
160 this._updateName( 160 this._updateName(
161 /** @type {string} */ (newName), /** @type {string} */ (newURL), 161 /** @type {string} */ (newName), /** @type {string} */ (newURL),
162 /** @type {!Common.ResourceType} */ (newContentType)); 162 /** @type {!Common.ResourceType} */ (newContentType));
163 } 163 }
164 callback(success); 164 callback(success);
165 } 165 }
166 } 166 }
167 167
168 remove() { 168 remove() {
169 this._project.deleteFile(this.url()); 169 this._project.deleteFile(this);
170 } 170 }
171 171
172 /** 172 /**
173 * @param {string} name 173 * @param {string} name
174 * @param {string} url 174 * @param {string} url
175 * @param {!Common.ResourceType=} contentType 175 * @param {!Common.ResourceType=} contentType
176 */ 176 */
177 _updateName(name, url, contentType) { 177 _updateName(name, url, contentType) {
178 this._url = this._url.substring(0, this._url.length - this._name.length) + n ame; 178 this._url = this._url.substring(0, this._url.length - this._name.length) + n ame;
179 this._name = name; 179 this._name = name;
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 Workspace.UISourceCodeMetadata = class { 920 Workspace.UISourceCodeMetadata = class {
921 /** 921 /**
922 * @param {?Date} modificationTime 922 * @param {?Date} modificationTime
923 * @param {?number} contentSize 923 * @param {?number} contentSize
924 */ 924 */
925 constructor(modificationTime, contentSize) { 925 constructor(modificationTime, contentSize) {
926 this.modificationTime = modificationTime; 926 this.modificationTime = modificationTime;
927 this.contentSize = contentSize; 927 this.contentSize = contentSize;
928 } 928 }
929 }; 929 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698