| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_GROUP_H_ | 5 #ifndef WEBKIT_APPCACHE_APPCACHE_GROUP_H_ |
| 6 #define WEBKIT_APPCACHE_APPCACHE_GROUP_H_ | 6 #define WEBKIT_APPCACHE_APPCACHE_GROUP_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 UpdateStatus update_status() const { return update_status_; } | 64 UpdateStatus update_status() const { return update_status_; } |
| 65 | 65 |
| 66 // Starts an update via update() javascript API. | 66 // Starts an update via update() javascript API. |
| 67 void StartUpdate() { | 67 void StartUpdate() { |
| 68 StartUpdateWithHost(NULL); | 68 StartUpdateWithHost(NULL); |
| 69 } | 69 } |
| 70 | 70 |
| 71 // Starts an update for a doc loaded from an application cache. | 71 // Starts an update for a doc loaded from an application cache. |
| 72 void StartUpdateWithHost(AppCacheHost* host) { | 72 void StartUpdateWithHost(AppCacheHost* host) { |
| 73 StartUpdateWithNewMasterEntry(host, GURL::EmptyGURL()); | 73 StartUpdateWithNewMasterEntry(host, GURL()); |
| 74 } | 74 } |
| 75 | 75 |
| 76 // Starts an update for a doc loaded using HTTP GET or equivalent with | 76 // Starts an update for a doc loaded using HTTP GET or equivalent with |
| 77 // an <html> tag manifest attribute value that matches this group's | 77 // an <html> tag manifest attribute value that matches this group's |
| 78 // manifest url. | 78 // manifest url. |
| 79 void StartUpdateWithNewMasterEntry(AppCacheHost* host, | 79 void StartUpdateWithNewMasterEntry(AppCacheHost* host, |
| 80 const GURL& new_master_resource); | 80 const GURL& new_master_resource); |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 class HostObserver; | 83 class HostObserver; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 FRIEND_TEST(AppCacheGroupTest, CancelUpdate); | 137 FRIEND_TEST(AppCacheGroupTest, CancelUpdate); |
| 138 FRIEND_TEST(AppCacheGroupTest, QueueUpdate); | 138 FRIEND_TEST(AppCacheGroupTest, QueueUpdate); |
| 139 FRIEND_TEST(AppCacheUpdateJobTest, AlreadyChecking); | 139 FRIEND_TEST(AppCacheUpdateJobTest, AlreadyChecking); |
| 140 FRIEND_TEST(AppCacheUpdateJobTest, AlreadyDownloading); | 140 FRIEND_TEST(AppCacheUpdateJobTest, AlreadyDownloading); |
| 141 DISALLOW_COPY_AND_ASSIGN(AppCacheGroup); | 141 DISALLOW_COPY_AND_ASSIGN(AppCacheGroup); |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 } // namespace appcache | 144 } // namespace appcache |
| 145 | 145 |
| 146 #endif // WEBKIT_APPCACHE_APPCACHE_GROUP_H_ | 146 #endif // WEBKIT_APPCACHE_APPCACHE_GROUP_H_ |
| OLD | NEW |