| 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_UPDATE_JOB_H_ | 5 #ifndef WEBKIT_APPCACHE_APPCACHE_UPDATE_JOB_H_ |
| 6 #define WEBKIT_APPCACHE_APPCACHE_UPDATE_JOB_H_ | 6 #define WEBKIT_APPCACHE_APPCACHE_UPDATE_JOB_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 GURL url_; | 137 GURL url_; |
| 138 AppCacheUpdateJob* job_; | 138 AppCacheUpdateJob* job_; |
| 139 FetchType fetch_type_; | 139 FetchType fetch_type_; |
| 140 int retry_503_attempts_; | 140 int retry_503_attempts_; |
| 141 scoped_refptr<net::IOBuffer> buffer_; | 141 scoped_refptr<net::IOBuffer> buffer_; |
| 142 scoped_ptr<net::URLRequest> request_; | 142 scoped_ptr<net::URLRequest> request_; |
| 143 AppCacheEntry existing_entry_; | 143 AppCacheEntry existing_entry_; |
| 144 scoped_refptr<net::HttpResponseHeaders> existing_response_headers_; | 144 scoped_refptr<net::HttpResponseHeaders> existing_response_headers_; |
| 145 std::string manifest_data_; | 145 std::string manifest_data_; |
| 146 scoped_ptr<AppCacheResponseWriter> response_writer_; | 146 scoped_ptr<AppCacheResponseWriter> response_writer_; |
| 147 net::OldCompletionCallbackImpl<URLFetcher> write_callback_; | |
| 148 }; // class URLFetcher | 147 }; // class URLFetcher |
| 149 | 148 |
| 150 AppCacheResponseWriter* CreateResponseWriter(); | 149 AppCacheResponseWriter* CreateResponseWriter(); |
| 151 | 150 |
| 152 // Methods for AppCacheStorage::Delegate. | 151 // Methods for AppCacheStorage::Delegate. |
| 153 virtual void OnResponseInfoLoaded(AppCacheResponseInfo* response_info, | 152 virtual void OnResponseInfoLoaded(AppCacheResponseInfo* response_info, |
| 154 int64 response_id) OVERRIDE; | 153 int64 response_id) OVERRIDE; |
| 155 virtual void OnGroupAndNewestCacheStored(AppCacheGroup* group, | 154 virtual void OnGroupAndNewestCacheStored(AppCacheGroup* group, |
| 156 AppCache* newest_cache, | 155 AppCache* newest_cache, |
| 157 bool success, | 156 bool success, |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 // In some cases we fetch the same resource multiple times, and then | 297 // In some cases we fetch the same resource multiple times, and then |
| 299 // have to delete the duplicates upon successful update. These ids | 298 // have to delete the duplicates upon successful update. These ids |
| 300 // are also in the stored_response_ids_ collection so we only schedule | 299 // are also in the stored_response_ids_ collection so we only schedule |
| 301 // these for deletion on success. | 300 // these for deletion on success. |
| 302 // TODO(michaeln): Rework when we no longer fetches master entries directly. | 301 // TODO(michaeln): Rework when we no longer fetches master entries directly. |
| 303 std::vector<int64> duplicate_response_ids_; | 302 std::vector<int64> duplicate_response_ids_; |
| 304 | 303 |
| 305 // Whether we've stored the resulting group/cache yet. | 304 // Whether we've stored the resulting group/cache yet. |
| 306 StoredState stored_state_; | 305 StoredState stored_state_; |
| 307 | 306 |
| 308 net::OldCompletionCallbackImpl<AppCacheUpdateJob> manifest_info_write_callback
_; | |
| 309 net::OldCompletionCallbackImpl<AppCacheUpdateJob> manifest_data_write_callback
_; | |
| 310 net::OldCompletionCallbackImpl<AppCacheUpdateJob> manifest_data_read_callback_
; | |
| 311 | |
| 312 FRIEND_TEST_ALL_PREFIXES(AppCacheGroupTest, QueueUpdate); | 307 FRIEND_TEST_ALL_PREFIXES(AppCacheGroupTest, QueueUpdate); |
| 313 | 308 |
| 314 DISALLOW_COPY_AND_ASSIGN(AppCacheUpdateJob); | 309 DISALLOW_COPY_AND_ASSIGN(AppCacheUpdateJob); |
| 315 }; | 310 }; |
| 316 | 311 |
| 317 } // namespace appcache | 312 } // namespace appcache |
| 318 | 313 |
| 319 #endif // WEBKIT_APPCACHE_APPCACHE_UPDATE_JOB_H_ | 314 #endif // WEBKIT_APPCACHE_APPCACHE_UPDATE_JOB_H_ |
| OLD | NEW |