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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js

Issue 2906843002: [Devtools] Move to canReplayRequest in NetworkRequest (Closed)
Patch Set: [Devtools] Move to canReplayRequest in NetworkRequest Created 3 years, 6 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) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org>
4 * Copyright (C) 2011 Google Inc. All rights reserved. 4 * Copyright (C) 2011 Google Inc. All rights reserved.
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 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 /** 1174 /**
1175 * @param {string} url 1175 * @param {string} url
1176 */ 1176 */
1177 function removeBlockedURL(url) { 1177 function removeBlockedURL(url) {
1178 patterns = patterns.filter(pattern => pattern.url !== url); 1178 patterns = patterns.filter(pattern => pattern.url !== url);
1179 manager.setBlockedPatterns(patterns); 1179 manager.setBlockedPatterns(patterns);
1180 UI.viewManager.showView('network.blocked-urls'); 1180 UI.viewManager.showView('network.blocked-urls');
1181 } 1181 }
1182 } 1182 }
1183 1183
1184 if (request && request.resourceType() === Common.resourceTypes.XHR) { 1184 if (request && request.canReplayRequest()) {
1185 contextMenu.appendSeparator(); 1185 contextMenu.appendSeparator();
1186 contextMenu.appendItem(Common.UIString('Replay XHR'), request.replayXHR.bi nd(request)); 1186 contextMenu.appendItem(Common.UIString('Replay XHR'), request.replayReques t.bind(request));
1187 contextMenu.appendSeparator(); 1187 contextMenu.appendSeparator();
1188 } 1188 }
1189 } 1189 }
1190 1190
1191 _harRequests() { 1191 _harRequests() {
1192 var requests = this._nodesByRequestId.valuesArray().map(function(node) { 1192 var requests = this._nodesByRequestId.valuesArray().map(function(node) {
1193 return node.request(); 1193 return node.request();
1194 }); 1194 });
1195 var httpRequests = requests.filter(Network.NetworkLogView.HTTPRequestsFilter ); 1195 var httpRequests = requests.filter(Network.NetworkLogView.HTTPRequestsFilter );
1196 return httpRequests.filter(Network.NetworkLogView.FinishedRequestsFilter); 1196 return httpRequests.filter(Network.NetworkLogView.FinishedRequestsFilter);
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1822 1822
1823 Network.GroupLookupInterface.prototype = { 1823 Network.GroupLookupInterface.prototype = {
1824 /** 1824 /**
1825 * @param {!SDK.NetworkRequest} request 1825 * @param {!SDK.NetworkRequest} request
1826 * @return {?Network.NetworkGroupNode} 1826 * @return {?Network.NetworkGroupNode}
1827 */ 1827 */
1828 groupNodeForRequest: function(request) {}, 1828 groupNodeForRequest: function(request) {},
1829 1829
1830 reset: function() {} 1830 reset: function() {}
1831 }; 1831 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698