Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: webkit/appcache/appcache_group.h

Issue 3009005: Chrome side of changes required to populate appcache resource list.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 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
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 AppCacheGroup(AppCacheService* service, const GURL& manifest_url, 47 AppCacheGroup(AppCacheService* service, const GURL& manifest_url,
48 int64 group_id); 48 int64 group_id);
49 49
50 // Adds/removes an update observer, the AppCacheGroup does not take 50 // Adds/removes an update observer, the AppCacheGroup does not take
51 // ownership of the observer. 51 // ownership of the observer.
52 void AddUpdateObserver(UpdateObserver* observer); 52 void AddUpdateObserver(UpdateObserver* observer);
53 void RemoveUpdateObserver(UpdateObserver* observer); 53 void RemoveUpdateObserver(UpdateObserver* observer);
54 54
55 int64 group_id() const { return group_id_; } 55 int64 group_id() const { return group_id_; }
56 const GURL& manifest_url() const { return manifest_url_; } 56 const GURL& manifest_url() const { return manifest_url_; }
57 57 const base::Time& creation_time() const { return creation_time_; }
58 void set_creation_time(const base::Time& time) { creation_time_ = time; }
58 bool is_obsolete() const { return is_obsolete_; } 59 bool is_obsolete() const { return is_obsolete_; }
59 void set_obsolete(bool value) { is_obsolete_ = value; } 60 void set_obsolete(bool value) { is_obsolete_ = value; }
60 61
61 bool is_being_deleted() const { return is_being_deleted_; } 62 bool is_being_deleted() const { return is_being_deleted_; }
62 void set_being_deleted(bool value) { is_being_deleted_ = value; } 63 void set_being_deleted(bool value) { is_being_deleted_ = value; }
63 64
64 AppCache* newest_complete_cache() const { return newest_complete_cache_; } 65 AppCache* newest_complete_cache() const { return newest_complete_cache_; }
65 66
66 void AddCache(AppCache* complete_cache); 67 void AddCache(AppCache* complete_cache);
67 void RemoveCache(AppCache* cache); 68 void RemoveCache(AppCache* cache);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // Update cannot be processed at this time. Queue it for a later run. 116 // Update cannot be processed at this time. Queue it for a later run.
116 void QueueUpdate(AppCacheHost* host, const GURL& new_master_resource); 117 void QueueUpdate(AppCacheHost* host, const GURL& new_master_resource);
117 void RunQueuedUpdates(); 118 void RunQueuedUpdates();
118 bool FindObserver(UpdateObserver* find_me, 119 bool FindObserver(UpdateObserver* find_me,
119 const ObserverList<UpdateObserver>& observer_list); 120 const ObserverList<UpdateObserver>& observer_list);
120 void ScheduleUpdateRestart(int delay_ms); 121 void ScheduleUpdateRestart(int delay_ms);
121 void HostDestructionImminent(AppCacheHost* host); 122 void HostDestructionImminent(AppCacheHost* host);
122 123
123 const int64 group_id_; 124 const int64 group_id_;
124 const GURL manifest_url_; 125 const GURL manifest_url_;
126 base::Time creation_time_;
125 UpdateStatus update_status_; 127 UpdateStatus update_status_;
126 bool is_obsolete_; 128 bool is_obsolete_;
127 bool is_being_deleted_; 129 bool is_being_deleted_;
128 std::vector<int64> newly_deletable_response_ids_; 130 std::vector<int64> newly_deletable_response_ids_;
129 131
130 // Old complete app caches. 132 // Old complete app caches.
131 Caches old_caches_; 133 Caches old_caches_;
132 134
133 // Newest cache in this group to be complete, aka relevant cache. 135 // Newest cache in this group to be complete, aka relevant cache.
134 AppCache* newest_complete_cache_; 136 AppCache* newest_complete_cache_;
(...skipping 20 matching lines...) Expand all
155 FRIEND_TEST(AppCacheGroupTest, CancelUpdate); 157 FRIEND_TEST(AppCacheGroupTest, CancelUpdate);
156 FRIEND_TEST(AppCacheGroupTest, QueueUpdate); 158 FRIEND_TEST(AppCacheGroupTest, QueueUpdate);
157 FRIEND_TEST(AppCacheUpdateJobTest, AlreadyChecking); 159 FRIEND_TEST(AppCacheUpdateJobTest, AlreadyChecking);
158 FRIEND_TEST(AppCacheUpdateJobTest, AlreadyDownloading); 160 FRIEND_TEST(AppCacheUpdateJobTest, AlreadyDownloading);
159 DISALLOW_COPY_AND_ASSIGN(AppCacheGroup); 161 DISALLOW_COPY_AND_ASSIGN(AppCacheGroup);
160 }; 162 };
161 163
162 } // namespace appcache 164 } // namespace appcache
163 165
164 #endif // WEBKIT_APPCACHE_APPCACHE_GROUP_H_ 166 #endif // WEBKIT_APPCACHE_APPCACHE_GROUP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698