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

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

Issue 2168323002: [DevTools] Explicitly require ResourceTreeModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 _parseNameAndPathFromURL: function() 554 _parseNameAndPathFromURL: function()
555 { 555 {
556 if (this._parsedURL.isDataURL()) { 556 if (this._parsedURL.isDataURL()) {
557 this._name = this._parsedURL.dataURLDisplayName(); 557 this._name = this._parsedURL.dataURLDisplayName();
558 this._path = ""; 558 this._path = "";
559 } else if (this._parsedURL.isAboutBlank()) { 559 } else if (this._parsedURL.isAboutBlank()) {
560 this._name = this._parsedURL.url; 560 this._name = this._parsedURL.url;
561 this._path = ""; 561 this._path = "";
562 } else { 562 } else {
563 this._path = this._parsedURL.host + this._parsedURL.folderPathCompon ents; 563 this._path = this._parsedURL.host + this._parsedURL.folderPathCompon ents;
564 this._path = this._path.trimURL(this.target().resourceTreeModel.insp ectedPageDomain()); 564 var resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(th is.target());
565 if (resourceTreeModel)
566 this._path = this._path.trimURL(resourceTreeModel.inspectedPageD omain());
dgozman 2016/07/22 17:19:44 I don't like dependency from network to resource t
eostroukhov-old 2016/07/25 19:36:11 I don't know :) I think this might overlap wit Joe
565 if (this._parsedURL.lastPathComponent || this._parsedURL.queryParams ) 567 if (this._parsedURL.lastPathComponent || this._parsedURL.queryParams )
566 this._name = this._parsedURL.lastPathComponent + (this._parsedUR L.queryParams ? "?" + this._parsedURL.queryParams : ""); 568 this._name = this._parsedURL.lastPathComponent + (this._parsedUR L.queryParams ? "?" + this._parsedURL.queryParams : "");
567 else if (this._parsedURL.folderPathComponents) { 569 else if (this._parsedURL.folderPathComponents) {
568 this._name = this._parsedURL.folderPathComponents.substring(this ._parsedURL.folderPathComponents.lastIndexOf("/") + 1) + "/"; 570 this._name = this._parsedURL.folderPathComponents.substring(this ._parsedURL.folderPathComponents.lastIndexOf("/") + 1) + "/";
569 this._path = this._path.substring(0, this._path.lastIndexOf("/") ); 571 this._path = this._path.substring(0, this._path.lastIndexOf("/") );
570 } else { 572 } else {
571 this._name = this._parsedURL.host; 573 this._name = this._parsedURL.host;
572 this._path = ""; 574 this._path = "";
573 } 575 }
574 } 576 }
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 /** 1222 /**
1221 * @return {!WebInspector.NetworkManager} 1223 * @return {!WebInspector.NetworkManager}
1222 */ 1224 */
1223 networkManager: function() 1225 networkManager: function()
1224 { 1226 {
1225 return this._networkManager; 1227 return this._networkManager;
1226 }, 1228 },
1227 1229
1228 __proto__: WebInspector.SDKObject.prototype 1230 __proto__: WebInspector.SDKObject.prototype
1229 } 1231 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698