| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 // Overridden from net::URLRequest::Delegate: | 96 // Overridden from net::URLRequest::Delegate: |
| 97 virtual void OnResponseStarted(net::URLRequest* request); | 97 virtual void OnResponseStarted(net::URLRequest* request); |
| 98 virtual void OnReadCompleted(net::URLRequest* request, int bytes_read); | 98 virtual void OnReadCompleted(net::URLRequest* request, int bytes_read); |
| 99 virtual void OnReceivedRedirect(net::URLRequest* request, | 99 virtual void OnReceivedRedirect(net::URLRequest* request, |
| 100 const GURL& new_url, | 100 const GURL& new_url, |
| 101 bool* defer_redirect); | 101 bool* defer_redirect); |
| 102 // TODO(jennb): any other delegate callbacks to handle? certificate? | 102 // TODO(jennb): any other delegate callbacks to handle? certificate? |
| 103 | 103 |
| 104 // Methods for AppCacheStorage::Delegate. | 104 // Methods for AppCacheStorage::Delegate. |
| 105 void OnResponseInfoLoaded(AppCacheResponseInfo* response_info, | 105 virtual void OnResponseInfoLoaded(AppCacheResponseInfo* response_info, |
| 106 int64 response_id); | 106 int64 response_id); |
| 107 void OnGroupAndNewestCacheStored(AppCacheGroup* group, AppCache* newest_cache, | 107 virtual void OnGroupAndNewestCacheStored(AppCacheGroup* group, |
| 108 bool success, bool would_exceed_quota); | 108 AppCache* newest_cache, |
| 109 void OnGroupMadeObsolete(AppCacheGroup* group, bool success); | 109 bool success, |
| 110 bool would_exceed_quota); |
| 111 virtual void OnGroupMadeObsolete(AppCacheGroup* group, bool success); |
| 110 | 112 |
| 111 // Methods for AppCacheHost::Observer. | 113 // Methods for AppCacheHost::Observer. |
| 112 void OnCacheSelectionComplete(AppCacheHost* host) {} // N/A | 114 virtual void OnCacheSelectionComplete(AppCacheHost* host) {} // N/A |
| 113 void OnDestructionImminent(AppCacheHost* host); | 115 virtual void OnDestructionImminent(AppCacheHost* host); |
| 114 | 116 |
| 115 void CheckPolicy(); | 117 void CheckPolicy(); |
| 116 void OnPolicyCheckComplete(int rv); | 118 void OnPolicyCheckComplete(int rv); |
| 117 | 119 |
| 118 void HandleCacheFailure(const std::string& error_message); | 120 void HandleCacheFailure(const std::string& error_message); |
| 119 | 121 |
| 120 void FetchManifest(bool is_first_fetch); | 122 void FetchManifest(bool is_first_fetch); |
| 121 | 123 |
| 122 // Add extra conditional HTTP headers to the request based on the | 124 // Add extra conditional HTTP headers to the request based on the |
| 123 // currently cached response headers. | 125 // currently cached response headers. |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 policy_callback_; | 292 policy_callback_; |
| 291 | 293 |
| 292 FRIEND_TEST_ALL_PREFIXES(AppCacheGroupTest, QueueUpdate); | 294 FRIEND_TEST_ALL_PREFIXES(AppCacheGroupTest, QueueUpdate); |
| 293 | 295 |
| 294 DISALLOW_COPY_AND_ASSIGN(AppCacheUpdateJob); | 296 DISALLOW_COPY_AND_ASSIGN(AppCacheUpdateJob); |
| 295 }; | 297 }; |
| 296 | 298 |
| 297 } // namespace appcache | 299 } // namespace appcache |
| 298 | 300 |
| 299 #endif // WEBKIT_APPCACHE_APPCACHE_UPDATE_JOB_H_ | 301 #endif // WEBKIT_APPCACHE_APPCACHE_UPDATE_JOB_H_ |
| OLD | NEW |