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

Unified Diff: webkit/appcache/appcache.h

Issue 192043: AppCacheHost cache selection algorithm (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/appcache/appcache_dispatcher_host.cc ('k') | webkit/appcache/appcache_backend_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/appcache.h
===================================================================
--- webkit/appcache/appcache.h (revision 26254)
+++ webkit/appcache/appcache.h (working copy)
@@ -30,14 +30,16 @@
AppCache(AppCacheService *service, int64 cache_id);
~AppCache();
- int64 cache_id() { return cache_id_; }
+ int64 cache_id() const { return cache_id_; }
- AppCacheGroup* owning_group() { return owning_group_; }
+ AppCacheGroup* owning_group() const { return owning_group_; }
void set_owning_group(AppCacheGroup* group) { owning_group_ = group; }
- bool is_complete() { return is_complete_; }
+ bool is_complete() const { return is_complete_; }
void set_complete(bool value) { is_complete_ = value; }
+ AppCacheService* service() const { return service_; }
+
// Adds a new entry. Entry must not already be in cache.
void AddEntry(const GURL& url, const AppCacheEntry& entry);
@@ -49,9 +51,9 @@
AppCacheEntry* GetEntry(const GURL& url);
typedef std::map<GURL, AppCacheEntry> EntryMap;
- const EntryMap& entries() { return entries_; }
+ const EntryMap& entries() const { return entries_; }
- bool IsNewerThan(AppCache* cache) {
+ bool IsNewerThan(AppCache* cache) const {
return update_time_ > cache->update_time_;
}
@@ -62,13 +64,13 @@
private:
friend class AppCacheHost;
- // Use AppCacheHost::set_selected_cache() to manipulate host association.
+ // Use AppCacheHost::AssociateCache() to manipulate host association.
void AssociateHost(AppCacheHost* host) {
associated_hosts_.insert(host);
}
void UnassociateHost(AppCacheHost* host);
- int64 cache_id_;
+ const int64 cache_id_;
AppCacheEntry* manifest_; // also in entry map
AppCacheGroup* owning_group_;
std::set<AppCacheHost*> associated_hosts_;
« no previous file with comments | « chrome/common/appcache/appcache_dispatcher_host.cc ('k') | webkit/appcache/appcache_backend_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698