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 <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
230 // database. | 230 // database. |
231 it->second->DeleteDatabase(callbacks); | 231 it->second->DeleteDatabase(callbacks); |
232 return; | 232 return; |
233 } | 233 } |
234 | 234 |
235 // TODO(dgrogan): Plumb data_loss back to script eventually? | 235 // TODO(dgrogan): Plumb data_loss back to script eventually? |
236 blink::WebIDBDataLoss data_loss; | 236 blink::WebIDBDataLoss data_loss; |
237 std::string data_loss_message; | 237 std::string data_loss_message; |
238 bool disk_full = false; | 238 bool disk_full = false; |
239 leveldb::Status s; | 239 leveldb::Status s; |
240 IndexedDBBackingStoreMap::iterator it2 = backing_store_map_.find(origin_url); | |
cmumford
2015/04/08 15:14:35
Just call IsBackingStoreOpen(origin_url)
| |
241 if(it2 == backing_store_map_.end()) | |
cmumford
2015/04/08 15:14:35
spaces, and { are incorrect. Run "git cl format" t
| |
242 { | |
243 ContextDestroyed(); | |
244 return; | |
245 } | |
cmumford
2015/04/08 15:14:35
Why not have this test at the very beginning of th
| |
240 scoped_refptr<IndexedDBBackingStore> backing_store = | 246 scoped_refptr<IndexedDBBackingStore> backing_store = |
241 OpenBackingStore(origin_url, | 247 OpenBackingStore(origin_url, |
242 data_directory, | 248 data_directory, |
243 request_context, | 249 request_context, |
244 &data_loss, | 250 &data_loss, |
245 &data_loss_message, | 251 &data_loss_message, |
246 &disk_full, | 252 &disk_full, |
247 &s); | 253 &s); |
248 if (!backing_store.get()) { | 254 if (!backing_store.get()) { |
249 IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError, | 255 IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError, |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
494 size_t count(0); | 500 size_t count(0); |
495 | 501 |
496 OriginDBs range = GetOpenDatabasesForOrigin(origin_url); | 502 OriginDBs range = GetOpenDatabasesForOrigin(origin_url); |
497 for (OriginDBMapIterator it = range.first; it != range.second; ++it) | 503 for (OriginDBMapIterator it = range.first; it != range.second; ++it) |
498 count += it->second->ConnectionCount(); | 504 count += it->second->ConnectionCount(); |
499 | 505 |
500 return count; | 506 return count; |
501 } | 507 } |
502 | 508 |
503 } // namespace content | 509 } // namespace content |
OLD | NEW |