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

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

Issue 2662513003: DevTools: make StylesSourceMapping in charge of creating and removing UISourceCodes (Closed)
Patch Set: cleanup & addres 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) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 if (url.startsWith(baseURL)) 79 if (url.startsWith(baseURL))
80 return url.substring(index); 80 return url.substring(index);
81 } 81 }
82 82
83 if (!parsedURL) 83 if (!parsedURL)
84 return url; 84 return url;
85 85
86 var displayName = url.trimURL(parsedURL.host); 86 var displayName = url.trimURL(parsedURL.host);
87 return displayName === '/' ? parsedURL.host + '/' : displayName; 87 return displayName === '/' ? parsedURL.host + '/' : displayName;
88 }; 88 };
89
90 /**
91 * @param {?SDK.Resource} resource
92 * @return {?Workspace.UISourceCodeMetadata}
93 */
94 Bindings.resourceMetadata = function(resource) {
95 if (!resource || (typeof resource.contentSize() !== 'number' && !resource.last Modified()))
96 return null;
97 return new Workspace.UISourceCodeMetadata(resource.lastModified(), resource.co ntentSize());
98 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698