| 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_factory_impl.h" | 5 #include "content/browser/indexed_db/indexed_db_factory_impl.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 DLOG(ERROR) << "Internal error getting database names"; | 245 DLOG(ERROR) << "Internal error getting database names"; |
| 246 IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError, | 246 IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError, |
| 247 "Internal error opening backing store for " | 247 "Internal error opening backing store for " |
| 248 "indexedDB.deleteDatabase."); | 248 "indexedDB.deleteDatabase."); |
| 249 callbacks->OnError(error); | 249 callbacks->OnError(error); |
| 250 backing_store = NULL; | 250 backing_store = NULL; |
| 251 if (s.IsCorruption()) | 251 if (s.IsCorruption()) |
| 252 HandleBackingStoreCorruption(origin, error); | 252 HandleBackingStoreCorruption(origin, error); |
| 253 return; | 253 return; |
| 254 } | 254 } |
| 255 if (!ContainsValue(names, name)) { | 255 if (!base::ContainsValue(names, name)) { |
| 256 const int64_t version = 0; | 256 const int64_t version = 0; |
| 257 callbacks->OnSuccess(version); | 257 callbacks->OnSuccess(version); |
| 258 backing_store = NULL; | 258 backing_store = NULL; |
| 259 ReleaseBackingStore(origin, false /* immediate */); | 259 ReleaseBackingStore(origin, false /* immediate */); |
| 260 return; | 260 return; |
| 261 } | 261 } |
| 262 | 262 |
| 263 scoped_refptr<IndexedDBDatabase> database = IndexedDBDatabase::Create( | 263 scoped_refptr<IndexedDBDatabase> database = IndexedDBDatabase::Create( |
| 264 name, backing_store.get(), this, unique_identifier, &s); | 264 name, backing_store.get(), this, unique_identifier, &s); |
| 265 if (!database.get()) { | 265 if (!database.get()) { |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 size_t count(0); | 474 size_t count(0); |
| 475 | 475 |
| 476 OriginDBs range = GetOpenDatabasesForOrigin(origin); | 476 OriginDBs range = GetOpenDatabasesForOrigin(origin); |
| 477 for (OriginDBMapIterator it = range.first; it != range.second; ++it) | 477 for (OriginDBMapIterator it = range.first; it != range.second; ++it) |
| 478 count += it->second->ConnectionCount(); | 478 count += it->second->ConnectionCount(); |
| 479 | 479 |
| 480 return count; | 480 return count; |
| 481 } | 481 } |
| 482 | 482 |
| 483 } // namespace content | 483 } // namespace content |
| OLD | NEW |