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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/resources/IndexedDBModel.js

Issue 2543633009: [Devtools] Template fromTarget() function calls to model (Closed)
Patch Set: fix Created 4 years 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 if (idbKeyPath instanceof Array) 137 if (idbKeyPath instanceof Array)
138 return '["' + idbKeyPath.join('", "') + '"]'; 138 return '["' + idbKeyPath.join('", "') + '"]';
139 return null; 139 return null;
140 } 140 }
141 141
142 /** 142 /**
143 * @param {!SDK.Target} target 143 * @param {!SDK.Target} target
144 * @return {!Resources.IndexedDBModel} 144 * @return {!Resources.IndexedDBModel}
145 */ 145 */
146 static fromTarget(target) { 146 static fromTarget(target) {
147 var model = /** @type {?Resources.IndexedDBModel} */ (target.model(Resources .IndexedDBModel)); 147 var model = target.model(Resources.IndexedDBModel);
148 if (!model) 148 if (!model)
149 model = new Resources.IndexedDBModel(target, SDK.SecurityOriginManager.fro mTarget(target)); 149 model = new Resources.IndexedDBModel(target, SDK.SecurityOriginManager.fro mTarget(target));
150 return model; 150 return model;
151 } 151 }
152 152
153 enable() { 153 enable() {
154 if (this._enabled) 154 if (this._enabled)
155 return; 155 return;
156 156
157 this._agent.enable(); 157 this._agent.enable();
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 } 532 }
533 533
534 /** 534 /**
535 * @return {string} 535 * @return {string}
536 */ 536 */
537 get keyPathString() { 537 get keyPathString() {
538 return /** @type {string}*/ ( 538 return /** @type {string}*/ (
539 Resources.IndexedDBModel.keyPathStringFromIDBKeyPath(/** @type {string}* / (this.keyPath))); 539 Resources.IndexedDBModel.keyPathStringFromIDBKeyPath(/** @type {string}* / (this.keyPath)));
540 } 540 }
541 }; 541 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698