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

Side by Side Diff: content/browser/indexed_db/indexed_db_database_impl.cc

Issue 15724006: Migrate IDBDatabaseBackendTest from blink to chromium (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix exports for WebIDBDatabase too Created 7 years, 6 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/indexed_db/indexed_db_database_impl.h" 5 #include "content/browser/indexed_db/indexed_db_database_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 new IndexedDBKey(current_number, WebIDBKey::NumberType)); 884 new IndexedDBKey(current_number, WebIDBKey::NumberType));
885 } 885 }
886 886
887 static bool UpdateKeyGenerator( 887 static bool UpdateKeyGenerator(
888 scoped_refptr<IndexedDBBackingStore> backing_store, 888 scoped_refptr<IndexedDBBackingStore> backing_store,
889 scoped_refptr<IndexedDBTransaction> transaction, 889 scoped_refptr<IndexedDBTransaction> transaction,
890 int64 database_id, 890 int64 database_id,
891 int64 object_store_id, 891 int64 object_store_id,
892 const IndexedDBKey* key, 892 const IndexedDBKey* key,
893 bool check_current) { 893 bool check_current) {
894 DCHECK(key && key->type() == WebIDBKey::NumberType); 894 DCHECK(key);
895 DCHECK_EQ(WebIDBKey::NumberType, key->type());
895 return backing_store->MaybeUpdateKeyGeneratorCurrentNumber( 896 return backing_store->MaybeUpdateKeyGeneratorCurrentNumber(
896 transaction->BackingStoreTransaction(), 897 transaction->BackingStoreTransaction(),
897 database_id, 898 database_id,
898 object_store_id, 899 object_store_id,
899 static_cast<int64>(floor(key->number())) + 1, 900 static_cast<int64>(floor(key->number())) + 1,
900 check_current); 901 check_current);
901 } 902 }
902 903
903 void IndexedDBDatabaseImpl::Put( 904 void IndexedDBDatabaseImpl::Put(
904 int64 transaction_id, 905 int64 transaction_id,
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1814 1815
1815 void IndexedDBDatabaseImpl::VersionChangeAbortOperation::Perform( 1816 void IndexedDBDatabaseImpl::VersionChangeAbortOperation::Perform(
1816 IndexedDBTransaction* transaction) { 1817 IndexedDBTransaction* transaction) {
1817 IDB_TRACE("VersionChangeAbortOperation"); 1818 IDB_TRACE("VersionChangeAbortOperation");
1818 DCHECK(!transaction); 1819 DCHECK(!transaction);
1819 database_->metadata_.version = previous_version_; 1820 database_->metadata_.version = previous_version_;
1820 database_->metadata_.int_version = previous_int_version_; 1821 database_->metadata_.int_version = previous_int_version_;
1821 } 1822 }
1822 1823
1823 } // namespace content 1824 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_database_impl.h ('k') | content/browser/indexed_db/indexed_db_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698