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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/audits/AuditRules.js

Issue 2466123002: DevTools: reformat front-end code to match chromium style. (Closed)
Patch Set: 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 /** 769 /**
770 * @constructor 770 * @constructor
771 * @extends {WebInspector.AuditRules.CacheControlRule} 771 * @extends {WebInspector.AuditRules.CacheControlRule}
772 */ 772 */
773 WebInspector.AuditRules.BrowserCacheControlRule = function() 773 WebInspector.AuditRules.BrowserCacheControlRule = function()
774 { 774 {
775 WebInspector.AuditRules.CacheControlRule.call(this, "http-browsercache", Web Inspector.UIString("Leverage browser caching")); 775 WebInspector.AuditRules.CacheControlRule.call(this, "http-browsercache", Web Inspector.UIString("Leverage browser caching"));
776 }; 776 };
777 777
778 WebInspector.AuditRules.BrowserCacheControlRule.prototype = { 778 WebInspector.AuditRules.BrowserCacheControlRule.prototype = {
779 /**
780 * @override
781 */
779 handleNonCacheableResources: function(requests, result) 782 handleNonCacheableResources: function(requests, result)
780 { 783 {
781 if (requests.length) { 784 if (requests.length) {
782 var entry = result.addChild(WebInspector.UIString("The following res ources are explicitly non-cacheable. Consider making them cacheable if possible: "), true); 785 var entry = result.addChild(WebInspector.UIString("The following res ources are explicitly non-cacheable. Consider making them cacheable if possible: "), true);
783 result.violationCount += requests.length; 786 result.violationCount += requests.length;
784 for (var i = 0; i < requests.length; ++i) 787 for (var i = 0; i < requests.length; ++i)
785 entry.addURL(requests[i].url); 788 entry.addURL(requests[i].url);
786 } 789 }
787 }, 790 },
788 791
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
1555 result.violationCount = badUrls.length; 1558 result.violationCount = badUrls.length;
1556 }, 1559 },
1557 1560
1558 _collectorCallback: function(matchingResourceData, request, cookie) 1561 _collectorCallback: function(matchingResourceData, request, cookie)
1559 { 1562 {
1560 matchingResourceData[request.url] = (matchingResourceData[request.url] | | 0) + cookie.size(); 1563 matchingResourceData[request.url] = (matchingResourceData[request.url] | | 0) + cookie.size();
1561 }, 1564 },
1562 1565
1563 __proto__: WebInspector.AuditRules.CookieRuleBase.prototype 1566 __proto__: WebInspector.AuditRules.CookieRuleBase.prototype
1564 }; 1567 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698