| 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> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/task.h" | 16 #include "base/task.h" |
| 17 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
| 18 #include "net/base/completion_callback.h" | 18 #include "net/base/completion_callback.h" |
| 19 #include "net/http/http_response_headers.h" | 19 #include "net/http/http_response_headers.h" |
| 20 #include "net/url_request/url_request.h" | 20 #include "net/url_request/url_request.h" |
| 21 #include "webkit/appcache/appcache.h" | 21 #include "webkit/appcache/appcache.h" |
| 22 #include "webkit/appcache/appcache_export.h" |
| 22 #include "webkit/appcache/appcache_host.h" | 23 #include "webkit/appcache/appcache_host.h" |
| 23 #include "webkit/appcache/appcache_interfaces.h" | 24 #include "webkit/appcache/appcache_interfaces.h" |
| 24 #include "webkit/appcache/appcache_response.h" | 25 #include "webkit/appcache/appcache_response.h" |
| 25 #include "webkit/appcache/appcache_storage.h" | 26 #include "webkit/appcache/appcache_storage.h" |
| 26 | 27 |
| 27 namespace appcache { | 28 namespace appcache { |
| 28 | 29 |
| 29 class HostNotifier; | 30 class HostNotifier; |
| 30 | 31 |
| 31 // Application cache Update algorithm and state. | 32 // Application cache Update algorithm and state. |
| 32 class AppCacheUpdateJob : public AppCacheStorage::Delegate, | 33 class APPCACHE_EXPORT AppCacheUpdateJob : public AppCacheStorage::Delegate, |
| 33 public AppCacheHost::Observer { | 34 public AppCacheHost::Observer { |
| 34 public: | 35 public: |
| 35 AppCacheUpdateJob(AppCacheService* service, AppCacheGroup* group); | 36 AppCacheUpdateJob(AppCacheService* service, AppCacheGroup* group); |
| 36 virtual ~AppCacheUpdateJob(); | 37 virtual ~AppCacheUpdateJob(); |
| 37 | 38 |
| 38 // Triggers the update process or adds more info if this update is already | 39 // Triggers the update process or adds more info if this update is already |
| 39 // in progress. | 40 // in progress. |
| 40 void StartUpdate(AppCacheHost* host, const GURL& new_master_resource); | 41 void StartUpdate(AppCacheHost* host, const GURL& new_master_resource); |
| 41 | 42 |
| 42 private: | 43 private: |
| 43 friend class ScopedRunnableMethodFactory<AppCacheUpdateJob>; | 44 friend class ScopedRunnableMethodFactory<AppCacheUpdateJob>; |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 net::CompletionCallbackImpl<AppCacheUpdateJob> manifest_data_read_callback_; | 309 net::CompletionCallbackImpl<AppCacheUpdateJob> manifest_data_read_callback_; |
| 309 | 310 |
| 310 FRIEND_TEST_ALL_PREFIXES(AppCacheGroupTest, QueueUpdate); | 311 FRIEND_TEST_ALL_PREFIXES(AppCacheGroupTest, QueueUpdate); |
| 311 | 312 |
| 312 DISALLOW_COPY_AND_ASSIGN(AppCacheUpdateJob); | 313 DISALLOW_COPY_AND_ASSIGN(AppCacheUpdateJob); |
| 313 }; | 314 }; |
| 314 | 315 |
| 315 } // namespace appcache | 316 } // namespace appcache |
| 316 | 317 |
| 317 #endif // WEBKIT_APPCACHE_APPCACHE_UPDATE_JOB_H_ | 318 #endif // WEBKIT_APPCACHE_APPCACHE_UPDATE_JOB_H_ |
| OLD | NEW |