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

Unified Diff: third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js

Issue 1564113003: DevTools: merge uisourcecode's url-alike members. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 years, 11 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
Index: third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js b/third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js
index e22858aeb344120fc4aff84020abaf6a02d27715..6efb01f28cf37b42ba89cf05aa2fa273ad646d01 100644
--- a/third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js
@@ -137,11 +137,11 @@ WebInspector.ScriptSnippetModel.prototype = {
},
/**
- * @param {string} path
+ * @param {string} url
*/
- deleteScriptSnippet: function(path)
+ deleteScriptSnippet: function(url)
{
- var uiSourceCode = this._project.uiSourceCode(path);
+ var uiSourceCode = this._project.uiSourceCodeForURL(url);
if (!uiSourceCode)
return;
var snippetId = this._snippetIdForUISourceCode.get(uiSourceCode) || "";
@@ -622,7 +622,7 @@ WebInspector.SnippetsProject.prototype = {
*/
setFileContent: function(uiSourceCode, newContent, callback)
{
- this._model._setScriptSnippetContent(uiSourceCode.path(), newContent);
+ this._model._setScriptSnippetContent(uiSourceCode.url(), newContent);
callback("");
},
@@ -637,34 +637,34 @@ WebInspector.SnippetsProject.prototype = {
/**
* @override
- * @param {string} path
+ * @param {string} url
* @param {string} newName
* @param {function(boolean, string=)} callback
*/
- performRename: function(path, newName, callback)
+ performRename: function(url, newName, callback)
{
- this._model.renameScriptSnippet(path, newName, callback);
+ this._model.renameScriptSnippet(url, newName, callback);
},
/**
* @override
- * @param {string} path
+ * @param {string} url
* @param {?string} name
* @param {string} content
* @param {function(?WebInspector.UISourceCode)} callback
*/
- createFile: function(path, name, content, callback)
+ createFile: function(url, name, content, callback)
{
callback(this._model.createScriptSnippet(content));
},
/**
* @override
- * @param {string} path
+ * @param {string} url
*/
- deleteFile: function(path)
+ deleteFile: function(url)
{
- this._model.deleteScriptSnippet(path);
+ this._model.deleteScriptSnippet(url);
},
__proto__: WebInspector.ContentProviderBasedProject.prototype

Powered by Google App Engine
This is Rietveld 408576698