| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 * @param {string} origin | 170 * @param {string} origin |
| 171 */ | 171 */ |
| 172 clearForOrigin(origin) { | 172 clearForOrigin(origin) { |
| 173 if (!this._enabled) | 173 if (!this._enabled) |
| 174 return; | 174 return; |
| 175 | 175 |
| 176 this._removeOrigin(origin); | 176 this._removeOrigin(origin); |
| 177 this._addOrigin(origin); | 177 this._addOrigin(origin); |
| 178 } | 178 } |
| 179 | 179 |
| 180 /** |
| 181 * @param {!Resources.IndexedDBModel.DatabaseId} databaseId |
| 182 */ |
| 183 deleteDatabase(databaseId) { |
| 184 if (!this._enabled) |
| 185 return; |
| 186 this._agent.deleteDatabase(databaseId.securityOrigin, databaseId.name, error
=> { |
| 187 if (error) |
| 188 console.error('Unable to delete ' + databaseId.name, error); |
| 189 this._loadDatabaseNames(databaseId.securityOrigin); |
| 190 }); |
| 191 } |
| 192 |
| 180 refreshDatabaseNames() { | 193 refreshDatabaseNames() { |
| 181 for (var securityOrigin in this._databaseNamesBySecurityOrigin) | 194 for (var securityOrigin in this._databaseNamesBySecurityOrigin) |
| 182 this._loadDatabaseNames(securityOrigin); | 195 this._loadDatabaseNames(securityOrigin); |
| 183 } | 196 } |
| 184 | 197 |
| 185 /** | 198 /** |
| 186 * @param {!Resources.IndexedDBModel.DatabaseId} databaseId | 199 * @param {!Resources.IndexedDBModel.DatabaseId} databaseId |
| 187 */ | 200 */ |
| 188 refreshDatabase(databaseId) { | 201 refreshDatabase(databaseId) { |
| 189 this._loadDatabase(databaseId); | 202 this._loadDatabase(databaseId); |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 } | 547 } |
| 535 | 548 |
| 536 /** | 549 /** |
| 537 * @return {string} | 550 * @return {string} |
| 538 */ | 551 */ |
| 539 get keyPathString() { | 552 get keyPathString() { |
| 540 return /** @type {string}*/ ( | 553 return /** @type {string}*/ ( |
| 541 Resources.IndexedDBModel.keyPathStringFromIDBKeyPath(/** @type {string}*
/ (this.keyPath))); | 554 Resources.IndexedDBModel.keyPathStringFromIDBKeyPath(/** @type {string}*
/ (this.keyPath))); |
| 542 } | 555 } |
| 543 }; | 556 }; |
| OLD | NEW |