| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_APPCACHE_APPCACHE_UPDATE_JOB_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_UPDATE_JOB_H_ |
| 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_UPDATE_JOB_H_ | 6 #define CONTENT_BROWSER_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 24 matching lines...) Expand all Loading... |
| 35 // Application cache Update algorithm and state. | 35 // Application cache Update algorithm and state. |
| 36 class CONTENT_EXPORT AppCacheUpdateJob | 36 class CONTENT_EXPORT AppCacheUpdateJob |
| 37 : public AppCacheStorage::Delegate, | 37 : public AppCacheStorage::Delegate, |
| 38 public AppCacheHost::Observer, | 38 public AppCacheHost::Observer, |
| 39 public AppCacheServiceImpl::Observer { | 39 public AppCacheServiceImpl::Observer { |
| 40 public: | 40 public: |
| 41 // Used for uma stats only for now, so new values are append only. | 41 // Used for uma stats only for now, so new values are append only. |
| 42 enum ResultType { | 42 enum ResultType { |
| 43 UPDATE_OK, DB_ERROR, DISKCACHE_ERROR, QUOTA_ERROR, REDIRECT_ERROR, | 43 UPDATE_OK, DB_ERROR, DISKCACHE_ERROR, QUOTA_ERROR, REDIRECT_ERROR, |
| 44 MANIFEST_ERROR, NETWORK_ERROR, SERVER_ERROR, CANCELLED_ERROR, | 44 MANIFEST_ERROR, NETWORK_ERROR, SERVER_ERROR, CANCELLED_ERROR, |
| 45 NUM_UPDATE_JOB_RESULT_TYPES | 45 SECURITY_ERROR, NUM_UPDATE_JOB_RESULT_TYPES |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 AppCacheUpdateJob(AppCacheServiceImpl* service, AppCacheGroup* group); | 48 AppCacheUpdateJob(AppCacheServiceImpl* service, AppCacheGroup* group); |
| 49 virtual ~AppCacheUpdateJob(); | 49 virtual ~AppCacheUpdateJob(); |
| 50 | 50 |
| 51 // Triggers the update process or adds more info if this update is already | 51 // Triggers the update process or adds more info if this update is already |
| 52 // in progress. | 52 // in progress. |
| 53 void StartUpdate(AppCacheHost* host, const GURL& new_master_resource); | 53 void StartUpdate(AppCacheHost* host, const GURL& new_master_resource); |
| 54 | 54 |
| 55 private: | 55 private: |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 AppCacheStorage* storage_; | 339 AppCacheStorage* storage_; |
| 340 | 340 |
| 341 FRIEND_TEST_ALL_PREFIXES(content::AppCacheGroupTest, QueueUpdate); | 341 FRIEND_TEST_ALL_PREFIXES(content::AppCacheGroupTest, QueueUpdate); |
| 342 | 342 |
| 343 DISALLOW_COPY_AND_ASSIGN(AppCacheUpdateJob); | 343 DISALLOW_COPY_AND_ASSIGN(AppCacheUpdateJob); |
| 344 }; | 344 }; |
| 345 | 345 |
| 346 } // namespace content | 346 } // namespace content |
| 347 | 347 |
| 348 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_UPDATE_JOB_H_ | 348 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_UPDATE_JOB_H_ |
| OLD | NEW |