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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js

Issue 1957053002: DevTools: simplify NetworkProject.addFileForURL method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 7 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 | « third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js b/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
index 17bab00c98257cdb27b4cc039338c38c2106d968..d83e91346ec25612b3206c05a79ea988615bfaa4 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
@@ -368,8 +368,9 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
function innerCallback(formattedContent, formatterMapping)
{
var scripts = this._scriptsForUISourceCode(uiSourceCode);
- var contentProvider = new WebInspector.StaticContentProvider(uiSourceCode.contentType(), formattedContent);
- var formattedUISourceCode = this._project.addContentProvider(uiSourceCode.url() + ":formatted", contentProvider);
+ var formattedURL = uiSourceCode.url() + ":formatted";
+ var contentProvider = new WebInspector.StaticContentProvider(uiSourceCode.contentType(), formattedContent, formattedURL);
+ var formattedUISourceCode = this._project.addContentProvider(formattedURL, contentProvider);
var formattedPath = formattedUISourceCode.url();
var formatData = new WebInspector.FormatterScriptMapping.FormatData(uiSourceCode.project().id(), uiSourceCode.url(), formatterMapping, scripts);
this._formatData.set(formattedUISourceCode, formatData);
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698