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

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

Issue 2186753002: [DevTools] Track URL through the target (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 4 years, 4 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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 var maxTime = -1; 385 var maxTime = -1;
386 var nodes = this._nodesByRequestId.valuesArray(); 386 var nodes = this._nodesByRequestId.valuesArray();
387 for (var i = 0; i < nodes.length; ++i) { 387 for (var i = 0; i < nodes.length; ++i) {
388 var request = nodes[i].request(); 388 var request = nodes[i].request();
389 var requestTransferSize = request.transferSize; 389 var requestTransferSize = request.transferSize;
390 transferSize += requestTransferSize; 390 transferSize += requestTransferSize;
391 if (!nodes[i][WebInspector.NetworkLogView._isFilteredOutSymbol]) { 391 if (!nodes[i][WebInspector.NetworkLogView._isFilteredOutSymbol]) {
392 selectedRequestsNumber++; 392 selectedRequestsNumber++;
393 selectedTransferSize += requestTransferSize; 393 selectedTransferSize += requestTransferSize;
394 } 394 }
395 if (request.url === request.target().resourceTreeModel.inspectedPage URL() && request.resourceType() === WebInspector.resourceTypes.Document) 395 if (request.url === request.target().inspectedURL() && request.resou rceType() === WebInspector.resourceTypes.Document)
396 baseTime = request.startTime; 396 baseTime = request.startTime;
397 if (request.endTime > maxTime) 397 if (request.endTime > maxTime)
398 maxTime = request.endTime; 398 maxTime = request.endTime;
399 } 399 }
400 400
401 var summaryBar = this._summaryBarElement; 401 var summaryBar = this._summaryBarElement;
402 summaryBar.removeChildren(); 402 summaryBar.removeChildren();
403 var separator = "\u2002\u2758\u2002"; 403 var separator = "\u2002\u2758\u2002";
404 var text = ""; 404 var text = "";
405 /** 405 /**
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 * @param {!WebInspector.NetworkRequest} request 948 * @param {!WebInspector.NetworkRequest} request
949 * @param {string} platform 949 * @param {string} platform
950 */ 950 */
951 _copyCurlCommand: function(request, platform) 951 _copyCurlCommand: function(request, platform)
952 { 952 {
953 InspectorFrontendHost.copyText(this._generateCurlCommand(request, platfo rm)); 953 InspectorFrontendHost.copyText(this._generateCurlCommand(request, platfo rm));
954 }, 954 },
955 955
956 _exportAll: function() 956 _exportAll: function()
957 { 957 {
958 var filename = WebInspector.targetManager.inspectedPageDomain() + ".har" ; 958 var url = WebInspector.targetManager.mainTarget().inspectedURL();
959 var filename = url.asParsedURL().host + ".har";
959 var stream = new WebInspector.FileOutputStream(); 960 var stream = new WebInspector.FileOutputStream();
960 stream.open(filename, openCallback.bind(this)); 961 stream.open(filename, openCallback.bind(this));
961 962
962 /** 963 /**
963 * @param {boolean} accepted 964 * @param {boolean} accepted
964 * @this {WebInspector.NetworkLogView} 965 * @this {WebInspector.NetworkLogView}
965 */ 966 */
966 function openCallback(accepted) 967 function openCallback(accepted)
967 { 968 {
968 if (!accepted) 969 if (!accepted)
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
1688 return false; 1689 return false;
1689 return true; 1690 return true;
1690 } 1691 }
1691 1692
1692 WebInspector.NetworkLogView.EventTypes = { 1693 WebInspector.NetworkLogView.EventTypes = {
1693 RequestSelected: "RequestSelected", 1694 RequestSelected: "RequestSelected",
1694 SearchCountUpdated: "SearchCountUpdated", 1695 SearchCountUpdated: "SearchCountUpdated",
1695 SearchIndexUpdated: "SearchIndexUpdated", 1696 SearchIndexUpdated: "SearchIndexUpdated",
1696 UpdateRequest: "UpdateRequest" 1697 UpdateRequest: "UpdateRequest"
1697 }; 1698 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698