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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js

Issue 2626553002: [Devtools][Code health] Changed NetworkRequest.url to proper getter/setter (Closed)
Patch Set: changes Created 3 years, 11 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 return; 670 return;
671 } 671 }
672 this._resourcesMap[resource.url] = resource; 672 this._resourcesMap[resource.url] = resource;
673 this._model.dispatchEventToListeners(SDK.ResourceTreeModel.Events.ResourceAd ded, resource); 673 this._model.dispatchEventToListeners(SDK.ResourceTreeModel.Events.ResourceAd ded, resource);
674 } 674 }
675 675
676 /** 676 /**
677 * @param {!SDK.NetworkRequest} request 677 * @param {!SDK.NetworkRequest} request
678 */ 678 */
679 _addRequest(request) { 679 _addRequest(request) {
680 var resource = this._resourcesMap[request.url]; 680 var resource = this._resourcesMap[request.url()];
681 if (resource && resource.request === request) { 681 if (resource && resource.request === request) {
682 // Already in the tree, we just got an extra update. 682 // Already in the tree, we just got an extra update.
683 return; 683 return;
684 } 684 }
685 resource = new SDK.Resource( 685 resource = new SDK.Resource(
686 this.target(), request, request.url, request.documentURL, request.frameI d, request.loaderId, 686 this.target(), request, request.url(), request.documentURL, request.fram eId, request.loaderId,
687 request.resourceType(), request.mimeType, null, null); 687 request.resourceType(), request.mimeType, null, null);
688 this._resourcesMap[resource.url] = resource; 688 this._resourcesMap[resource.url] = resource;
689 this._model.dispatchEventToListeners(SDK.ResourceTreeModel.Events.ResourceAd ded, resource); 689 this._model.dispatchEventToListeners(SDK.ResourceTreeModel.Events.ResourceAd ded, resource);
690 } 690 }
691 691
692 /** 692 /**
693 * @return {!Array.<!SDK.Resource>} 693 * @return {!Array.<!SDK.Resource>}
694 */ 694 */
695 resources() { 695 resources() {
696 var result = []; 696 var result = [];
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 this._resourceTreeModel.dispatchEventToListeners(SDK.ResourceTreeModel.Event s.InterstitialHidden); 893 this._resourceTreeModel.dispatchEventToListeners(SDK.ResourceTreeModel.Event s.InterstitialHidden);
894 } 894 }
895 895
896 /** 896 /**
897 * @override 897 * @override
898 */ 898 */
899 navigationRequested() { 899 navigationRequested() {
900 // Frontend is not interested in when navigations are requested. 900 // Frontend is not interested in when navigations are requested.
901 } 901 }
902 }; 902 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698