| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef WEBKIT_APPCACHE_APPCACHE_RESPONSE_H_ | 5 #ifndef WEBKIT_APPCACHE_APPCACHE_RESPONSE_H_ |
| 6 #define WEBKIT_APPCACHE_APPCACHE_RESPONSE_H_ | 6 #define WEBKIT_APPCACHE_APPCACHE_RESPONSE_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 | 186 |
| 187 protected: | 187 protected: |
| 188 friend class AppCacheStorageImpl; | 188 friend class AppCacheStorageImpl; |
| 189 friend class MockAppCacheStorage; | 189 friend class MockAppCacheStorage; |
| 190 | 190 |
| 191 // Should only be constructed by the storage class. | 191 // Should only be constructed by the storage class. |
| 192 AppCacheResponseReader(int64 response_id, | 192 AppCacheResponseReader(int64 response_id, |
| 193 int64 group_id, | 193 int64 group_id, |
| 194 AppCacheDiskCacheInterface* disk_cache); | 194 AppCacheDiskCacheInterface* disk_cache); |
| 195 | 195 |
| 196 virtual void OnIOComplete(int result); | 196 virtual void OnIOComplete(int result) OVERRIDE; |
| 197 void ContinueReadInfo(); | 197 void ContinueReadInfo(); |
| 198 void ContinueReadData(); | 198 void ContinueReadData(); |
| 199 void OpenEntryIfNeededAndContinue(); | 199 void OpenEntryIfNeededAndContinue(); |
| 200 void OnOpenEntryComplete(int rv); | 200 void OnOpenEntryComplete(int rv); |
| 201 | 201 |
| 202 int range_offset_; | 202 int range_offset_; |
| 203 int range_length_; | 203 int range_length_; |
| 204 int read_position_; | 204 int read_position_; |
| 205 scoped_refptr<EntryCallback<AppCacheResponseReader> > open_callback_; | 205 scoped_refptr<EntryCallback<AppCacheResponseReader> > open_callback_; |
| 206 }; | 206 }; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 INITIAL_ATTEMPT, | 249 INITIAL_ATTEMPT, |
| 250 DOOM_EXISTING, | 250 DOOM_EXISTING, |
| 251 SECOND_ATTEMPT | 251 SECOND_ATTEMPT |
| 252 }; | 252 }; |
| 253 | 253 |
| 254 // Should only be constructed by the storage class. | 254 // Should only be constructed by the storage class. |
| 255 AppCacheResponseWriter(int64 response_id, | 255 AppCacheResponseWriter(int64 response_id, |
| 256 int64 group_id, | 256 int64 group_id, |
| 257 AppCacheDiskCacheInterface* disk_cache); | 257 AppCacheDiskCacheInterface* disk_cache); |
| 258 | 258 |
| 259 virtual void OnIOComplete(int result); | 259 virtual void OnIOComplete(int result) OVERRIDE; |
| 260 void ContinueWriteInfo(); | 260 void ContinueWriteInfo(); |
| 261 void ContinueWriteData(); | 261 void ContinueWriteData(); |
| 262 void CreateEntryIfNeededAndContinue(); | 262 void CreateEntryIfNeededAndContinue(); |
| 263 void OnCreateEntryComplete(int rv); | 263 void OnCreateEntryComplete(int rv); |
| 264 | 264 |
| 265 int info_size_; | 265 int info_size_; |
| 266 int write_position_; | 266 int write_position_; |
| 267 int write_amount_; | 267 int write_amount_; |
| 268 CreationPhase creation_phase_; | 268 CreationPhase creation_phase_; |
| 269 scoped_refptr<EntryCallback<AppCacheResponseWriter> > create_callback_; | 269 scoped_refptr<EntryCallback<AppCacheResponseWriter> > create_callback_; |
| 270 }; | 270 }; |
| 271 | 271 |
| 272 } // namespace appcache | 272 } // namespace appcache |
| 273 | 273 |
| 274 #endif // WEBKIT_APPCACHE_APPCACHE_RESPONSE_H_ | 274 #endif // WEBKIT_APPCACHE_APPCACHE_RESPONSE_H_ |
| 275 | 275 |
| OLD | NEW |