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

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

Issue 2903183002: [Devtools] Moved preserve log to a setting (Closed)
Patch Set: changes Created 3 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 /** @type {?Network.NetworkNode} */ 89 /** @type {?Network.NetworkNode} */
90 this._hoveredNode = null; 90 this._hoveredNode = null;
91 91
92 this._currentMatchedRequestNode = null; 92 this._currentMatchedRequestNode = null;
93 this._currentMatchedRequestIndex = -1; 93 this._currentMatchedRequestIndex = -1;
94 94
95 this.linkifier = new Components.Linkifier(); 95 this.linkifier = new Components.Linkifier();
96 this.badgePool = new ProductRegistry.BadgePool(); 96 this.badgePool = new ProductRegistry.BadgePool();
97 97
98 this._recording = false; 98 this._recording = false;
99 this._preserveLog = false;
100 99
101 this._headerHeight = 0; 100 this._headerHeight = 0;
102 101
103 /** @type {!Map<string, !Network.GroupLookupInterface>} */ 102 /** @type {!Map<string, !Network.GroupLookupInterface>} */
104 this._groupLookups = new Map(); 103 this._groupLookups = new Map();
105 this._groupLookups.set('Frame', new Network.NetworkFrameGrouper(this)); 104 this._groupLookups.set('Frame', new Network.NetworkFrameGrouper(this));
106 105
107 /** @type {?Network.GroupLookupInterface} */ 106 /** @type {?Network.GroupLookupInterface} */
108 this._activeGroupLookup = null; 107 this._activeGroupLookup = null;
109 108
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 391
393 /** 392 /**
394 * @param {boolean} recording 393 * @param {boolean} recording
395 */ 394 */
396 setRecording(recording) { 395 setRecording(recording) {
397 this._recording = recording; 396 this._recording = recording;
398 this._updateSummaryBar(); 397 this._updateSummaryBar();
399 } 398 }
400 399
401 /** 400 /**
402 * @param {boolean} preserveLog
403 */
404 setPreserveLog(preserveLog) {
405 this._preserveLog = preserveLog;
406 }
407
408 /**
409 * @override 401 * @override
410 * @param {!SDK.NetworkManager} networkManager 402 * @param {!SDK.NetworkManager} networkManager
411 */ 403 */
412 modelAdded(networkManager) { 404 modelAdded(networkManager) {
413 if (!networkManager.target().parentTarget()) { 405 if (!networkManager.target().parentTarget()) {
414 var resourceTreeModel = networkManager.target().model(SDK.ResourceTreeMode l); 406 var resourceTreeModel = networkManager.target().model(SDK.ResourceTreeMode l);
415 if (resourceTreeModel) { 407 if (resourceTreeModel) {
416 resourceTreeModel.addEventListener( 408 resourceTreeModel.addEventListener(
417 SDK.ResourceTreeModel.Events.MainFrameNavigated, this._mainFrameNavi gated, this); 409 SDK.ResourceTreeModel.Events.MainFrameNavigated, this._mainFrameNavi gated, this);
418 resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.Load, th is._loadEventFired, this); 410 resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.Load, th is._loadEventFired, this);
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 // Pick provisional load requests. 1055 // Pick provisional load requests.
1064 var requestsToPick = []; 1056 var requestsToPick = [];
1065 var networkManager = frame.resourceTreeModel().target().model(SDK.NetworkMan ager); 1057 var networkManager = frame.resourceTreeModel().target().model(SDK.NetworkMan ager);
1066 var requests = networkManager ? NetworkLog.networkLog.requestsForManager(net workManager) : []; 1058 var requests = networkManager ? NetworkLog.networkLog.requestsForManager(net workManager) : [];
1067 for (var i = 0; i < requests.length; ++i) { 1059 for (var i = 0; i < requests.length; ++i) {
1068 var request = requests[i]; 1060 var request = requests[i];
1069 if (request.loaderId === loaderId) 1061 if (request.loaderId === loaderId)
1070 requestsToPick.push(request); 1062 requestsToPick.push(request);
1071 } 1063 }
1072 1064
1073 if (!this._preserveLog) { 1065 if (!Common.moduleSetting('network.preserve-log').get()) {
1074 this.reset(); 1066 this.reset();
1075 for (var i = 0; i < requestsToPick.length; ++i) 1067 for (var i = 0; i < requestsToPick.length; ++i)
1076 this._appendRequest(requestsToPick[i]); 1068 this._appendRequest(requestsToPick[i]);
1077 } 1069 }
1078 for (var i = 0; i < requestsToPick.length; ++i) { 1070 for (var i = 0; i < requestsToPick.length; ++i) {
1079 var request = requestsToPick[i]; 1071 var request = requestsToPick[i];
1080 var node = this._nodesByRequestId.get(request.requestId()); 1072 var node = this._nodesByRequestId.get(request.requestId());
1081 if (node) { 1073 if (node) {
1082 node.markAsNavigationRequest(); 1074 node.markAsNavigationRequest();
1083 break; 1075 break;
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
1830 1822
1831 Network.GroupLookupInterface.prototype = { 1823 Network.GroupLookupInterface.prototype = {
1832 /** 1824 /**
1833 * @param {!SDK.NetworkRequest} request 1825 * @param {!SDK.NetworkRequest} request
1834 * @return {?Network.NetworkGroupNode} 1826 * @return {?Network.NetworkGroupNode}
1835 */ 1827 */
1836 groupNodeForRequest: function(request) {}, 1828 groupNodeForRequest: function(request) {},
1837 1829
1838 reset: function() {} 1830 reset: function() {}
1839 }; 1831 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698