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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
460 QueryDiskAndUpdateQuotaUsage(origin); | 460 QueryDiskAndUpdateQuotaUsage(origin); |
461 } | 461 } |
462 | 462 |
463 void IndexedDBContextImpl::DatabaseDeleted(const Origin& origin) { | 463 void IndexedDBContextImpl::DatabaseDeleted(const Origin& origin) { |
464 AddToOriginSet(origin); | 464 AddToOriginSet(origin); |
465 QueryDiskAndUpdateQuotaUsage(origin); | 465 QueryDiskAndUpdateQuotaUsage(origin); |
466 } | 466 } |
467 | 467 |
468 IndexedDBContextImpl::~IndexedDBContextImpl() { | 468 IndexedDBContextImpl::~IndexedDBContextImpl() { |
469 if (factory_.get()) { | 469 if (factory_.get()) { |
470 TaskRunner()->PostTask( | 470 TaskRunner()->PostTask(FROM_HERE, |
471 FROM_HERE, base::Bind(&IndexedDBFactory::ContextDestroyed, factory_)); | 471 base::Bind(&IndexedDBFactory::ContextDestroyed, |
472 factory_ = NULL; | 472 base::Passed(&factory_))); |
pwnall
2017/05/19 00:16:32
why not nullptr?
| |
473 } | 473 } |
474 | 474 |
475 if (data_path_.empty()) | 475 if (data_path_.empty()) |
476 return; | 476 return; |
477 | 477 |
478 if (force_keep_session_state_) | 478 if (force_keep_session_state_) |
479 return; | 479 return; |
480 | 480 |
481 bool has_session_only_databases = | 481 bool has_session_only_databases = |
482 special_storage_policy_.get() && | 482 special_storage_policy_.get() && |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
563 void IndexedDBContextImpl::ResetCaches() { | 563 void IndexedDBContextImpl::ResetCaches() { |
564 origin_set_.reset(); | 564 origin_set_.reset(); |
565 origin_size_map_.clear(); | 565 origin_size_map_.clear(); |
566 } | 566 } |
567 | 567 |
568 base::SequencedTaskRunner* IndexedDBContextImpl::TaskRunner() const { | 568 base::SequencedTaskRunner* IndexedDBContextImpl::TaskRunner() const { |
569 return task_runner_.get(); | 569 return task_runner_.get(); |
570 } | 570 } |
571 | 571 |
572 } // namespace content | 572 } // namespace content |
OLD | NEW |