| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 COMPLETED, | 76 COMPLETED, |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 enum StoredState { | 79 enum StoredState { |
| 80 UNSTORED, | 80 UNSTORED, |
| 81 STORING, | 81 STORING, |
| 82 STORED, | 82 STORED, |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 struct UrlToFetch { | 85 struct UrlToFetch { |
| 86 UrlToFetch(const GURL& url, bool checked, AppCacheResponseInfo* info); |
| 87 ~UrlToFetch(); |
| 88 |
| 86 GURL url; | 89 GURL url; |
| 87 bool storage_checked; | 90 bool storage_checked; |
| 88 scoped_refptr<AppCacheResponseInfo> existing_response_info; | 91 scoped_refptr<AppCacheResponseInfo> existing_response_info; |
| 89 UrlToFetch(const GURL& url, bool checked, AppCacheResponseInfo* info) | |
| 90 : url(url), storage_checked(checked), existing_response_info(info) {} | |
| 91 }; | 92 }; |
| 92 | 93 |
| 93 UpdateJobInfo* GetUpdateJobInfo(URLRequest* request); | 94 UpdateJobInfo* GetUpdateJobInfo(URLRequest* request); |
| 94 | 95 |
| 95 // Methods for URLRequest::Delegate. | 96 // Methods for URLRequest::Delegate. |
| 96 void OnResponseStarted(URLRequest* request); | 97 void OnResponseStarted(URLRequest* request); |
| 97 void OnReadCompleted(URLRequest* request, int bytes_read); | 98 void OnReadCompleted(URLRequest* request, int bytes_read); |
| 98 void OnReceivedRedirect(URLRequest* request, | 99 void OnReceivedRedirect(URLRequest* request, |
| 99 const GURL& new_url, | 100 const GURL& new_url, |
| 100 bool* defer_redirect); | 101 bool* defer_redirect); |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 policy_callback_; | 290 policy_callback_; |
| 290 | 291 |
| 291 FRIEND_TEST_ALL_PREFIXES(AppCacheGroupTest, QueueUpdate); | 292 FRIEND_TEST_ALL_PREFIXES(AppCacheGroupTest, QueueUpdate); |
| 292 | 293 |
| 293 DISALLOW_COPY_AND_ASSIGN(AppCacheUpdateJob); | 294 DISALLOW_COPY_AND_ASSIGN(AppCacheUpdateJob); |
| 294 }; | 295 }; |
| 295 | 296 |
| 296 } // namespace appcache | 297 } // namespace appcache |
| 297 | 298 |
| 298 #endif // WEBKIT_APPCACHE_APPCACHE_UPDATE_JOB_H_ | 299 #endif // WEBKIT_APPCACHE_APPCACHE_UPDATE_JOB_H_ |
| OLD | NEW |