| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 m_metadata = metadata; | 137 m_metadata = metadata; |
| 138 } | 138 } |
| 139 | 139 |
| 140 void IDBDatabase::setDatabaseMetadata(const IDBDatabaseMetadata& metadata) { | 140 void IDBDatabase::setDatabaseMetadata(const IDBDatabaseMetadata& metadata) { |
| 141 m_metadata.copyFrom(metadata); | 141 m_metadata.copyFrom(metadata); |
| 142 } | 142 } |
| 143 | 143 |
| 144 void IDBDatabase::transactionCreated(IDBTransaction* transaction) { | 144 void IDBDatabase::transactionCreated(IDBTransaction* transaction) { |
| 145 DCHECK(transaction); | 145 DCHECK(transaction); |
| 146 DCHECK(!m_transactions.contains(transaction->id())); | 146 DCHECK(!m_transactions.contains(transaction->id())); |
| 147 m_transactions.add(transaction->id(), transaction); | 147 m_transactions.insert(transaction->id(), transaction); |
| 148 | 148 |
| 149 if (transaction->isVersionChange()) { | 149 if (transaction->isVersionChange()) { |
| 150 DCHECK(!m_versionChangeTransaction); | 150 DCHECK(!m_versionChangeTransaction); |
| 151 m_versionChangeTransaction = transaction; | 151 m_versionChangeTransaction = transaction; |
| 152 } | 152 } |
| 153 } | 153 } |
| 154 | 154 |
| 155 void IDBDatabase::transactionFinished(const IDBTransaction* transaction) { | 155 void IDBDatabase::transactionFinished(const IDBTransaction* transaction) { |
| 156 DCHECK(transaction); | 156 DCHECK(transaction); |
| 157 DCHECK(m_transactions.contains(transaction->id())); | 157 DCHECK(m_transactions.contains(transaction->id())); |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 | 598 |
| 599 void IDBDatabase::recordApiCallsHistogram(IndexedDatabaseMethods method) { | 599 void IDBDatabase::recordApiCallsHistogram(IndexedDatabaseMethods method) { |
| 600 DEFINE_THREAD_SAFE_STATIC_LOCAL( | 600 DEFINE_THREAD_SAFE_STATIC_LOCAL( |
| 601 EnumerationHistogram, apiCallsHistogram, | 601 EnumerationHistogram, apiCallsHistogram, |
| 602 new EnumerationHistogram("WebCore.IndexedDB.FrontEndAPICalls", | 602 new EnumerationHistogram("WebCore.IndexedDB.FrontEndAPICalls", |
| 603 IDBMethodsMax)); | 603 IDBMethodsMax)); |
| 604 apiCallsHistogram.count(method); | 604 apiCallsHistogram.count(method); |
| 605 } | 605 } |
| 606 | 606 |
| 607 } // namespace blink | 607 } // namespace blink |
| OLD | NEW |