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

Unified Diff: Source/devtools/front_end/sdk/Resource.js

Issue 667743002: DevTools: remove "type" getters in Resource and NetworkRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/sdk/NetworkRequest.js ('k') | Source/devtools/front_end/sdk/ResourceTreeModel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/Resource.js
diff --git a/Source/devtools/front_end/sdk/Resource.js b/Source/devtools/front_end/sdk/Resource.js
index aa24be558595c1c8962acd9a4e95c53faaac221f..422ff18af4d4e0981dbc7553d0f08ea11c8ac0ae 100644
--- a/Source/devtools/front_end/sdk/Resource.js
+++ b/Source/devtools/front_end/sdk/Resource.js
@@ -164,9 +164,9 @@ WebInspector.Resource.prototype = {
/**
* @return {!WebInspector.ResourceType}
*/
- get type()
+ resourceType: function()
{
- return this._request ? this._request.type : this._type;
+ return this._request ? this._request.resourceType() : this._type;
},
/**
@@ -262,7 +262,7 @@ WebInspector.Resource.prototype = {
*/
contentType: function()
{
- return this.type;
+ return this.resourceType();
},
/**
@@ -285,7 +285,7 @@ WebInspector.Resource.prototype = {
*/
canonicalMimeType: function()
{
- return this.type.canonicalMimeType() || this.mimeType;
+ return this.resourceType().canonicalMimeType() || this.mimeType;
},
/**
@@ -305,7 +305,7 @@ WebInspector.Resource.prototype = {
callback(searchMatches || []);
}
- if (this.type === WebInspector.resourceTypes.Document) {
+ if (this.resourceType() === WebInspector.resourceTypes.Document) {
callback([]);
return;
}
« no previous file with comments | « Source/devtools/front_end/sdk/NetworkRequest.js ('k') | Source/devtools/front_end/sdk/ResourceTreeModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698