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

Unified Diff: third_party/WebKit/Source/devtools/front_end/bindings/ResourceUtils.js

Issue 2826173003: DevTools: prepare Navigator and Network Project for merging uiSourceCodes (Closed)
Patch Set: nice vocabulary Created 3 years, 8 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/bindings/ResourceUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/ResourceUtils.js b/third_party/WebKit/Source/devtools/front_end/bindings/ResourceUtils.js
index dec3afbe0bf96e1ce5ee45bb8fe9e425cd37c900..bd9ff59fb95caf5ad35c1aaa7df5762a5f1497a6 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/ResourceUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/ResourceUtils.js
@@ -84,3 +84,13 @@ Bindings.displayNameForURL = function(url) {
var displayName = url.trimURL(parsedURL.host);
return displayName === '/' ? parsedURL.host + '/' : displayName;
};
+
+/**
+ * @param {?SDK.Resource} resource
+ * @return {?Workspace.UISourceCodeMetadata}
+ */
+Bindings.resourceMetadata = function(resource) {
+ if (!resource || (typeof resource.contentSize() !== 'number' && !resource.lastModified()))
+ return null;
+ return new Workspace.UISourceCodeMetadata(resource.lastModified(), resource.contentSize());
+};

Powered by Google App Engine
This is Rietveld 408576698