| 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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 class BackendImplV3::IteratorImpl : public Backend::Iterator { | 664 class BackendImplV3::IteratorImpl : public Backend::Iterator { |
| 665 public: | 665 public: |
| 666 explicit IteratorImpl(base::WeakPtr<InFlightBackendIO> background_queue) | 666 explicit IteratorImpl(base::WeakPtr<InFlightBackendIO> background_queue) |
| 667 : background_queue_(background_queue), data_(NULL) { | 667 : background_queue_(background_queue), data_(NULL) { |
| 668 } | 668 } |
| 669 | 669 |
| 670 virtual int OpenNextEntry(Entry** next_entry, | 670 int OpenNextEntry(Entry** next_entry, |
| 671 const net::CompletionCallback& callback) override { | 671 const net::CompletionCallback& callback) override { |
| 672 if (!background_queue_) | 672 if (!background_queue_) |
| 673 return net::ERR_FAILED; | 673 return net::ERR_FAILED; |
| 674 background_queue_->OpenNextEntry(&data_, next_entry, callback); | 674 background_queue_->OpenNextEntry(&data_, next_entry, callback); |
| 675 return net::ERR_IO_PENDING; | 675 return net::ERR_IO_PENDING; |
| 676 } | 676 } |
| 677 | 677 |
| 678 private: | 678 private: |
| 679 const base::WeakPtr<InFlightBackendIO> background_queue_; | 679 const base::WeakPtr<InFlightBackendIO> background_queue_; |
| 680 void* data_; | 680 void* data_; |
| 681 }; | 681 }; |
| (...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1526 } | 1526 } |
| 1527 | 1527 |
| 1528 void BackendImplV3::OnExternalCacheHit(const std::string& key) { | 1528 void BackendImplV3::OnExternalCacheHit(const std::string& key) { |
| 1529 NOTIMPLEMENTED(); | 1529 NOTIMPLEMENTED(); |
| 1530 } | 1530 } |
| 1531 | 1531 |
| 1532 void BackendImplV3::CleanupCache() { | 1532 void BackendImplV3::CleanupCache() { |
| 1533 } | 1533 } |
| 1534 | 1534 |
| 1535 } // namespace disk_cache | 1535 } // namespace disk_cache |
| OLD | NEW |