| 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 "net/disk_cache/blockfile/backend_impl_v3.h" | 5 #include "net/disk_cache/blockfile/backend_impl_v3.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 SyncEndEnumeration(iter); | 654 SyncEndEnumeration(iter); |
| 655 return net::OK; | 655 return net::OK; |
| 656 } | 656 } |
| 657 | 657 |
| 658 entry->DoomImpl(); | 658 entry->DoomImpl(); |
| 659 entry->Release(); | 659 entry->Release(); |
| 660 SyncEndEnumeration(iter); // Dooming the entry invalidates the iterator. | 660 SyncEndEnumeration(iter); // Dooming the entry invalidates the iterator. |
| 661 } | 661 } |
| 662 } | 662 } |
| 663 | 663 |
| 664 int BackendImplV3::DoomEntriesBetween(base::Time initial_time, |
| 665 base::Time end_time, |
| 666 const CompletionCallback& callback) { |
| 667 // TODO(msramek): Implement. |
| 668 return net::ERR_NOT_IMPLEMENTED; |
| 669 } |
| 670 |
| 664 class BackendImplV3::IteratorImpl : public Backend::Iterator { | 671 class BackendImplV3::IteratorImpl : public Backend::Iterator { |
| 665 public: | 672 public: |
| 666 explicit IteratorImpl(base::WeakPtr<InFlightBackendIO> background_queue) | 673 explicit IteratorImpl(base::WeakPtr<InFlightBackendIO> background_queue) |
| 667 : background_queue_(background_queue), data_(NULL) { | 674 : background_queue_(background_queue), data_(NULL) { |
| 668 } | 675 } |
| 669 | 676 |
| 670 int OpenNextEntry(Entry** next_entry, | 677 int OpenNextEntry(Entry** next_entry, |
| 671 const net::CompletionCallback& callback) override { | 678 const net::CompletionCallback& callback) override { |
| 672 if (!background_queue_) | 679 if (!background_queue_) |
| 673 return net::ERR_FAILED; | 680 return net::ERR_FAILED; |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1501 base::Time end_time, | 1508 base::Time end_time, |
| 1502 const CompletionCallback& callback) { | 1509 const CompletionCallback& callback) { |
| 1503 return net::ERR_FAILED; | 1510 return net::ERR_FAILED; |
| 1504 } | 1511 } |
| 1505 | 1512 |
| 1506 int BackendImplV3::DoomEntriesSince(base::Time initial_time, | 1513 int BackendImplV3::DoomEntriesSince(base::Time initial_time, |
| 1507 const CompletionCallback& callback) { | 1514 const CompletionCallback& callback) { |
| 1508 return net::ERR_FAILED; | 1515 return net::ERR_FAILED; |
| 1509 } | 1516 } |
| 1510 | 1517 |
| 1518 int BackendImplV3::CalculateSizeOfEntriesBetween( |
| 1519 base::Time initial_time, |
| 1520 base::Time end_time, |
| 1521 const CompletionCallback& callback) { |
| 1522 return net::ERR_FAILED; |
| 1523 } |
| 1511 | 1524 |
| 1512 class BackendImplV3::NotImplementedIterator : public Backend::Iterator { | 1525 class BackendImplV3::NotImplementedIterator : public Backend::Iterator { |
| 1513 public: | 1526 public: |
| 1514 int OpenNextEntry(disk_cache::Entry** next_entry, | 1527 int OpenNextEntry(disk_cache::Entry** next_entry, |
| 1515 const net::CompletionCallback& callback) override { | 1528 const net::CompletionCallback& callback) override { |
| 1516 return net::ERR_NOT_IMPLEMENTED; | 1529 return net::ERR_NOT_IMPLEMENTED; |
| 1517 } | 1530 } |
| 1518 }; | 1531 }; |
| 1519 | 1532 |
| 1520 scoped_ptr<Backend::Iterator> BackendImplV3::CreateIterator() { | 1533 scoped_ptr<Backend::Iterator> BackendImplV3::CreateIterator() { |
| 1521 return scoped_ptr<Iterator>(new NotImplementedIterator()); | 1534 return scoped_ptr<Iterator>(new NotImplementedIterator()); |
| 1522 } | 1535 } |
| 1523 | 1536 |
| 1524 void BackendImplV3::GetStats(StatsItems* stats) { | 1537 void BackendImplV3::GetStats(StatsItems* stats) { |
| 1525 NOTIMPLEMENTED(); | 1538 NOTIMPLEMENTED(); |
| 1526 } | 1539 } |
| 1527 | 1540 |
| 1528 void BackendImplV3::OnExternalCacheHit(const std::string& key) { | 1541 void BackendImplV3::OnExternalCacheHit(const std::string& key) { |
| 1529 NOTIMPLEMENTED(); | 1542 NOTIMPLEMENTED(); |
| 1530 } | 1543 } |
| 1531 | 1544 |
| 1532 void BackendImplV3::CleanupCache() { | 1545 void BackendImplV3::CleanupCache() { |
| 1533 } | 1546 } |
| 1534 | 1547 |
| 1535 } // namespace disk_cache | 1548 } // namespace disk_cache |
| OLD | NEW |