OLD | NEW |
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.h" | 5 #include "content/browser/indexed_db/indexed_db_database.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 #include <memory> | 10 #include <memory> |
(...skipping 1906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1917 pending_second_half_open_->callbacks()->OnError( | 1917 pending_second_half_open_->callbacks()->OnError( |
1918 IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionAbortError, | 1918 IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionAbortError, |
1919 "The connection was closed.")); | 1919 "The connection was closed.")); |
1920 pending_second_half_open_.reset(); | 1920 pending_second_half_open_.reset(); |
1921 } | 1921 } |
1922 | 1922 |
1923 ProcessPendingCalls(); | 1923 ProcessPendingCalls(); |
1924 | 1924 |
1925 // TODO(jsbell): Add a test for the pending_open_calls_ cases below. | 1925 // TODO(jsbell): Add a test for the pending_open_calls_ cases below. |
1926 if (!ConnectionCount() && pending_open_calls_.empty() && | 1926 if (!ConnectionCount() && pending_open_calls_.empty() && |
1927 !pending_delete_calls_.size()) { | 1927 pending_delete_calls_.empty()) { |
1928 DCHECK(transactions_.empty()); | 1928 DCHECK(transactions_.empty()); |
1929 backing_store_ = NULL; | 1929 backing_store_ = NULL; |
1930 factory_->ReleaseDatabase(identifier_, forced); | 1930 factory_->ReleaseDatabase(identifier_, forced); |
1931 } | 1931 } |
1932 } | 1932 } |
1933 | 1933 |
1934 void IndexedDBDatabase::CreateObjectStoreAbortOperation( | 1934 void IndexedDBDatabase::CreateObjectStoreAbortOperation( |
1935 int64_t object_store_id, | 1935 int64_t object_store_id, |
1936 IndexedDBTransaction* transaction) { | 1936 IndexedDBTransaction* transaction) { |
1937 DCHECK(!transaction); | 1937 DCHECK(!transaction); |
(...skipping 12 matching lines...) Expand all Loading... |
1950 | 1950 |
1951 void IndexedDBDatabase::VersionChangeAbortOperation( | 1951 void IndexedDBDatabase::VersionChangeAbortOperation( |
1952 int64_t previous_version, | 1952 int64_t previous_version, |
1953 IndexedDBTransaction* transaction) { | 1953 IndexedDBTransaction* transaction) { |
1954 DCHECK(!transaction); | 1954 DCHECK(!transaction); |
1955 IDB_TRACE("IndexedDBDatabase::VersionChangeAbortOperation"); | 1955 IDB_TRACE("IndexedDBDatabase::VersionChangeAbortOperation"); |
1956 metadata_.version = previous_version; | 1956 metadata_.version = previous_version; |
1957 } | 1957 } |
1958 | 1958 |
1959 } // namespace content | 1959 } // namespace content |
OLD | NEW |