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

Unified Diff: Source/devtools/front_end/sdk/NetworkRequest.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/NetworkManager.js ('k') | Source/devtools/front_end/sdk/Resource.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/NetworkRequest.js
diff --git a/Source/devtools/front_end/sdk/NetworkRequest.js b/Source/devtools/front_end/sdk/NetworkRequest.js
index 0646fcb2cbb799fc0a19cef7bc9a682bc146804a..8e78a7b28a5ed4cc180d51ad0ddd171fbc029ffe 100644
--- a/Source/devtools/front_end/sdk/NetworkRequest.js
+++ b/Source/devtools/front_end/sdk/NetworkRequest.js
@@ -59,7 +59,8 @@ WebInspector.NetworkRequest = function(target, requestId, url, documentURL, fram
this.requestMethod = "";
this.requestTime = 0;
- this._type = WebInspector.resourceTypes.Other;
+ /** @type {!WebInspector.ResourceType} */
+ this._resourceType = WebInspector.resourceTypes.Other;
this._contentEncoded = false;
this._pendingContentCallbacks = [];
/** @type {!Array.<!WebInspector.NetworkRequest.WebSocketFrame>} */
@@ -487,14 +488,17 @@ WebInspector.NetworkRequest.prototype = {
/**
* @return {!WebInspector.ResourceType}
*/
- get type()
+ resourceType: function()
{
- return this._type;
+ return this._resourceType;
},
- set type(x)
+ /**
+ * @param {!WebInspector.ResourceType} resourceType
+ */
+ setResourceType: function(resourceType)
{
- this._type = x;
+ this._resourceType = resourceType;
},
/**
@@ -822,7 +826,7 @@ WebInspector.NetworkRequest.prototype = {
*/
contentType: function()
{
- return this._type;
+ return this._resourceType;
},
/**
@@ -833,7 +837,7 @@ WebInspector.NetworkRequest.prototype = {
// We do not support content retrieval for WebSockets at the moment.
// Since WebSockets are potentially long-living, fail requests immediately
// to prevent caller blocking until resource is marked as finished.
- if (this.type === WebInspector.resourceTypes.WebSocket) {
+ if (this._resourceType === WebInspector.resourceTypes.WebSocket) {
callback(null);
return;
}
« no previous file with comments | « Source/devtools/front_end/sdk/NetworkManager.js ('k') | Source/devtools/front_end/sdk/Resource.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698