| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_context_impl.h" | 5 #include "content/browser/indexed_db/indexed_db_context_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 | 259 |
| 260 std::unique_ptr<base::ListValue> scope(new base::ListValue()); | 260 std::unique_ptr<base::ListValue> scope(new base::ListValue()); |
| 261 for (const auto& id : transaction->scope()) { | 261 for (const auto& id : transaction->scope()) { |
| 262 IndexedDBDatabaseMetadata::ObjectStoreMap::const_iterator it = | 262 IndexedDBDatabaseMetadata::ObjectStoreMap::const_iterator it = |
| 263 db->metadata().object_stores.find(id); | 263 db->metadata().object_stores.find(id); |
| 264 if (it != db->metadata().object_stores.end()) | 264 if (it != db->metadata().object_stores.end()) |
| 265 scope->AppendString(it->second.name); | 265 scope->AppendString(it->second.name); |
| 266 } | 266 } |
| 267 | 267 |
| 268 transaction_info->Set("scope", scope.release()); | 268 transaction_info->Set("scope", scope.release()); |
| 269 transaction_list->Append(transaction_info.release()); | 269 transaction_list->Append(std::move(transaction_info)); |
| 270 } | 270 } |
| 271 db_info->Set("transactions", transaction_list.release()); | 271 db_info->Set("transactions", transaction_list.release()); |
| 272 | 272 |
| 273 database_list->Append(db_info.release()); | 273 database_list->Append(std::move(db_info)); |
| 274 } | 274 } |
| 275 info->Set("databases", database_list.release()); | 275 info->Set("databases", database_list.release()); |
| 276 } | 276 } |
| 277 | 277 |
| 278 list->Append(info.release()); | 278 list->Append(std::move(info)); |
| 279 } | 279 } |
| 280 return list.release(); | 280 return list.release(); |
| 281 } | 281 } |
| 282 | 282 |
| 283 int IndexedDBContextImpl::GetOriginBlobFileCount(const Origin& origin) { | 283 int IndexedDBContextImpl::GetOriginBlobFileCount(const Origin& origin) { |
| 284 DCHECK(TaskRunner()->RunsTasksOnCurrentThread()); | 284 DCHECK(TaskRunner()->RunsTasksOnCurrentThread()); |
| 285 int count = 0; | 285 int count = 0; |
| 286 base::FileEnumerator file_enumerator(GetBlobStorePath(origin), true, | 286 base::FileEnumerator file_enumerator(GetBlobStorePath(origin), true, |
| 287 base::FileEnumerator::FILES); | 287 base::FileEnumerator::FILES); |
| 288 for (base::FilePath file_path = file_enumerator.Next(); !file_path.empty(); | 288 for (base::FilePath file_path = file_enumerator.Next(); !file_path.empty(); |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 void IndexedDBContextImpl::ResetCaches() { | 569 void IndexedDBContextImpl::ResetCaches() { |
| 570 origin_set_.reset(); | 570 origin_set_.reset(); |
| 571 origin_size_map_.clear(); | 571 origin_size_map_.clear(); |
| 572 } | 572 } |
| 573 | 573 |
| 574 base::SequencedTaskRunner* IndexedDBContextImpl::TaskRunner() const { | 574 base::SequencedTaskRunner* IndexedDBContextImpl::TaskRunner() const { |
| 575 return task_runner_.get(); | 575 return task_runner_.get(); |
| 576 } | 576 } |
| 577 | 577 |
| 578 } // namespace content | 578 } // namespace content |
| OLD | NEW |