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

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

Issue 2440953003: DevTools: use semicolons after each statement. (Closed)
Patch Set: rebaseline Created 4 years, 1 month 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 23 matching lines...) Expand all
34 */ 34 */
35 WebInspector.resourceForURL = function(url) 35 WebInspector.resourceForURL = function(url)
36 { 36 {
37 var targets = WebInspector.targetManager.targets(WebInspector.Target.Capabil ity.DOM); 37 var targets = WebInspector.targetManager.targets(WebInspector.Target.Capabil ity.DOM);
38 for (var i = 0; i < targets.length; ++i) { 38 for (var i = 0; i < targets.length; ++i) {
39 var resource = WebInspector.ResourceTreeModel.fromTarget(targets[i]).res ourceForURL(url); 39 var resource = WebInspector.ResourceTreeModel.fromTarget(targets[i]).res ourceForURL(url);
40 if (resource) 40 if (resource)
41 return resource; 41 return resource;
42 } 42 }
43 return null; 43 return null;
44 } 44 };
45 45
46 /** 46 /**
47 * @param {function(!WebInspector.Resource)} callback 47 * @param {function(!WebInspector.Resource)} callback
48 */ 48 */
49 WebInspector.forAllResources = function(callback) 49 WebInspector.forAllResources = function(callback)
50 { 50 {
51 var targets = WebInspector.targetManager.targets(WebInspector.Target.Capabil ity.DOM); 51 var targets = WebInspector.targetManager.targets(WebInspector.Target.Capabil ity.DOM);
52 for (var i = 0; i < targets.length; ++i) 52 for (var i = 0; i < targets.length; ++i)
53 WebInspector.ResourceTreeModel.fromTarget(targets[i]).forAllResources(ca llback); 53 WebInspector.ResourceTreeModel.fromTarget(targets[i]).forAllResources(ca llback);
54 } 54 };
55 55
56 /** 56 /**
57 * @param {string} url 57 * @param {string} url
58 * @return {string} 58 * @return {string}
59 */ 59 */
60 WebInspector.displayNameForURL = function(url) 60 WebInspector.displayNameForURL = function(url)
61 { 61 {
62 if (!url) 62 if (!url)
63 return ""; 63 return "";
64 64
(...skipping 17 matching lines...) Expand all
82 var baseURL = inspectedURL.substring(0, index); 82 var baseURL = inspectedURL.substring(0, index);
83 if (url.startsWith(baseURL)) 83 if (url.startsWith(baseURL))
84 return url.substring(index); 84 return url.substring(index);
85 } 85 }
86 86
87 if (!parsedURL) 87 if (!parsedURL)
88 return url; 88 return url;
89 89
90 var displayName = url.trimURL(parsedURL.host); 90 var displayName = url.trimURL(parsedURL.host);
91 return displayName === "/" ? parsedURL.host + "/" : displayName; 91 return displayName === "/" ? parsedURL.host + "/" : displayName;
92 } 92 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698