| 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 "net/disk_cache/simple/simple_entry_impl.h" | 5 #include "net/disk_cache/simple/simple_entry_impl.h" | 
| 6 | 6 | 
| 7 #include <algorithm> | 7 #include <algorithm> | 
| 8 #include <cstring> | 8 #include <cstring> | 
| 9 #include <vector> | 9 #include <vector> | 
| 10 | 10 | 
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 135   DCHECK(!completion_callback.is_null()); | 135   DCHECK(!completion_callback.is_null()); | 
| 136   if (!backend.get()) | 136   if (!backend.get()) | 
| 137     return; | 137     return; | 
| 138   completion_callback.Run(result); | 138   completion_callback.Run(result); | 
| 139 } | 139 } | 
| 140 | 140 | 
| 141 }  // namespace | 141 }  // namespace | 
| 142 | 142 | 
| 143 using base::Closure; | 143 using base::Closure; | 
| 144 using base::FilePath; | 144 using base::FilePath; | 
|  | 145 using base::MessageLoopProxy; | 
| 145 using base::Time; | 146 using base::Time; | 
| 146 using base::TaskRunner; | 147 using base::TaskRunner; | 
| 147 | 148 | 
| 148 // A helper class to insure that RunNextOperationIfNeeded() is called when | 149 // A helper class to insure that RunNextOperationIfNeeded() is called when | 
| 149 // exiting the current stack frame. | 150 // exiting the current stack frame. | 
| 150 class SimpleEntryImpl::ScopedOperationRunner { | 151 class SimpleEntryImpl::ScopedOperationRunner { | 
| 151  public: | 152  public: | 
| 152   explicit ScopedOperationRunner(SimpleEntryImpl* entry) : entry_(entry) { | 153   explicit ScopedOperationRunner(SimpleEntryImpl* entry) : entry_(entry) { | 
| 153   } | 154   } | 
| 154 | 155 | 
| (...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1523     } | 1524     } | 
| 1524     crc32s_end_offset_[stream_index] = offset + length; | 1525     crc32s_end_offset_[stream_index] = offset + length; | 
| 1525   } else if (offset < crc32s_end_offset_[stream_index]) { | 1526   } else if (offset < crc32s_end_offset_[stream_index]) { | 
| 1526     // If a range for which the crc32 was already computed is rewritten, the | 1527     // If a range for which the crc32 was already computed is rewritten, the | 
| 1527     // computation of the crc32 need to start from 0 again. | 1528     // computation of the crc32 need to start from 0 again. | 
| 1528     crc32s_end_offset_[stream_index] = 0; | 1529     crc32s_end_offset_[stream_index] = 0; | 
| 1529   } | 1530   } | 
| 1530 } | 1531 } | 
| 1531 | 1532 | 
| 1532 }  // namespace disk_cache | 1533 }  // namespace disk_cache | 
| OLD | NEW | 
|---|