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

Unified Diff: third_party/WebKit/Source/devtools/front_end/resources/ApplicationCacheModel.js

Issue 2782773002: [DevTools] Remove SDKModels' fromTarget methods (Closed)
Patch Set: addressed review comments Created 3 years, 9 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
Index: third_party/WebKit/Source/devtools/front_end/resources/ApplicationCacheModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/ApplicationCacheModel.js b/third_party/WebKit/Source/devtools/front_end/resources/ApplicationCacheModel.js
index 6ee773f923aac437f71e139ee7a6401a46beeb6d..9114b726d876c4a95901995e87e2cb323b429fa2 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/ApplicationCacheModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/ApplicationCacheModel.js
@@ -40,7 +40,7 @@ Resources.ApplicationCacheModel = class extends SDK.SDKModel {
this._agent = target.applicationCacheAgent();
this._agent.enable();
- var resourceTreeModel = SDK.ResourceTreeModel.fromTarget(target);
+ var resourceTreeModel = target.model(SDK.ResourceTreeModel);
resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.FrameNavigated, this._frameNavigated, this);
resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.FrameDetached, this._frameDetached, this);
@@ -51,14 +51,6 @@ Resources.ApplicationCacheModel = class extends SDK.SDKModel {
this._onLine = true;
}
- /**
- * @param {!SDK.Target} target
- * @return {?Resources.ApplicationCacheModel}
- */
- static fromTarget(target) {
- return target.model(Resources.ApplicationCacheModel);
- }
-
_frameNavigated(event) {
var frame = /** @type {!SDK.ResourceTreeFrame} */ (event.data);
if (frame.isMainFrame()) {

Powered by Google App Engine
This is Rietveld 408576698