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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 174 this._agent.deleteDatabase(databaseId.securityOrigin, databaseId.name, error => { | 174 this._agent.deleteDatabase(databaseId.securityOrigin, databaseId.name, error => { |
| 175 if (error) | 175 if (error) |
| 176 console.error('Unable to delete ' + databaseId.name, error); | 176 console.error('Unable to delete ' + databaseId.name, error); |
| 177 this._loadDatabaseNames(databaseId.securityOrigin); | 177 this._loadDatabaseNames(databaseId.securityOrigin); |
| 178 }); | 178 }); |
| 179 } | 179 } |
| 180 | 180 |
| 181 refreshDatabaseNames() { | 181 refreshDatabaseNames() { |
| 182 for (var securityOrigin in this._databaseNamesBySecurityOrigin) | 182 for (var securityOrigin in this._databaseNamesBySecurityOrigin) |
| 183 this._loadDatabaseNames(securityOrigin); | 183 this._loadDatabaseNames(securityOrigin); |
| 184 this.dispatchEventToListeners(Resources.IndexedDBModel.Events.DatabaseNamesR efreshed); | |
|
dgozman
2017/06/07 21:22:05
This should be issued after all _loadDatabaseNames
kristipark
2017/06/08 01:04:10
Now calling _loadDatabaseNames in parallel with Pr
| |
| 184 } | 185 } |
| 185 | 186 |
| 186 /** | 187 /** |
| 187 * @param {!Resources.IndexedDBModel.DatabaseId} databaseId | 188 * @param {!Resources.IndexedDBModel.DatabaseId} databaseId |
| 188 */ | 189 */ |
| 189 refreshDatabase(databaseId) { | 190 refreshDatabase(databaseId) { |
| 190 this._loadDatabase(databaseId); | 191 this._loadDatabase(databaseId); |
| 191 } | 192 } |
| 192 | 193 |
| 193 /** | 194 /** |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 432 NullType: 'null', | 433 NullType: 'null', |
| 433 StringType: 'string', | 434 StringType: 'string', |
| 434 ArrayType: 'array' | 435 ArrayType: 'array' |
| 435 }; | 436 }; |
| 436 | 437 |
| 437 | 438 |
| 438 /** @enum {symbol} */ | 439 /** @enum {symbol} */ |
| 439 Resources.IndexedDBModel.Events = { | 440 Resources.IndexedDBModel.Events = { |
| 440 DatabaseAdded: Symbol('DatabaseAdded'), | 441 DatabaseAdded: Symbol('DatabaseAdded'), |
| 441 DatabaseRemoved: Symbol('DatabaseRemoved'), | 442 DatabaseRemoved: Symbol('DatabaseRemoved'), |
| 442 DatabaseLoaded: Symbol('DatabaseLoaded') | 443 DatabaseLoaded: Symbol('DatabaseLoaded'), |
| 444 DatabaseNamesRefreshed: Symbol('DatabaseNamesRefreshed') | |
| 443 }; | 445 }; |
| 444 | 446 |
| 445 /** | 447 /** |
| 446 * @unrestricted | 448 * @unrestricted |
| 447 */ | 449 */ |
| 448 Resources.IndexedDBModel.Entry = class { | 450 Resources.IndexedDBModel.Entry = class { |
| 449 /** | 451 /** |
| 450 * @param {!SDK.RemoteObject} key | 452 * @param {!SDK.RemoteObject} key |
| 451 * @param {!SDK.RemoteObject} primaryKey | 453 * @param {!SDK.RemoteObject} primaryKey |
| 452 * @param {!SDK.RemoteObject} value | 454 * @param {!SDK.RemoteObject} value |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 538 } | 540 } |
| 539 | 541 |
| 540 /** | 542 /** |
| 541 * @return {string} | 543 * @return {string} |
| 542 */ | 544 */ |
| 543 get keyPathString() { | 545 get keyPathString() { |
| 544 return /** @type {string}*/ ( | 546 return /** @type {string}*/ ( |
| 545 Resources.IndexedDBModel.keyPathStringFromIDBKeyPath(/** @type {string}* / (this.keyPath))); | 547 Resources.IndexedDBModel.keyPathStringFromIDBKeyPath(/** @type {string}* / (this.keyPath))); |
| 546 } | 548 } |
| 547 }; | 549 }; |
| OLD | NEW |