Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 500 WebInspector.IndexedDBModel.ObjectStore = function(name, keyPath, autoIncrement) | 500 WebInspector.IndexedDBModel.ObjectStore = function(name, keyPath, autoIncrement) |
| 501 { | 501 { |
| 502 this.name = name; | 502 this.name = name; |
| 503 this.keyPath = keyPath; | 503 this.keyPath = keyPath; |
| 504 this.autoIncrement = autoIncrement; | 504 this.autoIncrement = autoIncrement; |
| 505 this.indexes = {}; | 505 this.indexes = {}; |
| 506 }; | 506 }; |
| 507 | 507 |
| 508 WebInspector.IndexedDBModel.ObjectStore.prototype = { | 508 WebInspector.IndexedDBModel.ObjectStore.prototype = { |
| 509 /** | 509 /** |
| 510 * @type {string} | 510 * @return {string} |
| 511 */ | 511 */ |
| 512 get keyPathString() | 512 get keyPathString() |
| 513 { | 513 { |
| 514 return WebInspector.IndexedDBModel.keyPathStringFromIDBKeyPath(this.keyP ath); | 514 return /** @type {string}*/ (WebInspector.IndexedDBModel.keyPathStringFr omIDBKeyPath(/** @type {string}*/(this.keyPath))); |
|
dgozman
2016/11/01 00:04:07
Remove second.
| |
| 515 } | 515 } |
| 516 }; | 516 }; |
| 517 | 517 |
| 518 /** | 518 /** |
| 519 * @constructor | 519 * @constructor |
| 520 * @param {string} name | 520 * @param {string} name |
| 521 * @param {*} keyPath | 521 * @param {*} keyPath |
| 522 * @param {boolean} unique | 522 * @param {boolean} unique |
| 523 * @param {boolean} multiEntry | 523 * @param {boolean} multiEntry |
| 524 */ | 524 */ |
| 525 WebInspector.IndexedDBModel.Index = function(name, keyPath, unique, multiEntry) | 525 WebInspector.IndexedDBModel.Index = function(name, keyPath, unique, multiEntry) |
| 526 { | 526 { |
| 527 this.name = name; | 527 this.name = name; |
| 528 this.keyPath = keyPath; | 528 this.keyPath = keyPath; |
| 529 this.unique = unique; | 529 this.unique = unique; |
| 530 this.multiEntry = multiEntry; | 530 this.multiEntry = multiEntry; |
| 531 }; | 531 }; |
| 532 | 532 |
| 533 WebInspector.IndexedDBModel.Index.prototype = { | 533 WebInspector.IndexedDBModel.Index.prototype = { |
| 534 /** | 534 /** |
| 535 * @type {string} | 535 * @return {string} |
| 536 */ | 536 */ |
| 537 get keyPathString() | 537 get keyPathString() |
| 538 { | 538 { |
| 539 return WebInspector.IndexedDBModel.keyPathStringFromIDBKeyPath(this.keyP ath); | 539 return /** @type {string}*/(WebInspector.IndexedDBModel.keyPathStringFro mIDBKeyPath(/** @type {string}*/(this.keyPath))); |
|
dgozman
2016/11/01 00:04:07
ditto
| |
| 540 } | 540 } |
| 541 }; | 541 }; |
| 542 | 542 |
| 543 /** | 543 /** |
| 544 * @param {!WebInspector.Target} target | 544 * @param {!WebInspector.Target} target |
| 545 * @return {!WebInspector.IndexedDBModel} | 545 * @return {!WebInspector.IndexedDBModel} |
| 546 */ | 546 */ |
| 547 WebInspector.IndexedDBModel.fromTarget = function(target) | 547 WebInspector.IndexedDBModel.fromTarget = function(target) |
| 548 { | 548 { |
| 549 var model = /** @type {?WebInspector.IndexedDBModel} */ (target.model(WebIns pector.IndexedDBModel)); | 549 var model = /** @type {?WebInspector.IndexedDBModel} */ (target.model(WebIns pector.IndexedDBModel)); |
| 550 if (!model) | 550 if (!model) |
| 551 model = new WebInspector.IndexedDBModel(target, WebInspector.SecurityOri ginManager.fromTarget(target)); | 551 model = new WebInspector.IndexedDBModel(target, WebInspector.SecurityOri ginManager.fromTarget(target)); |
| 552 return model; | 552 return model; |
| 553 }; | 553 }; |
| OLD | NEW |