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

Unified Diff: webkit/appcache/appcache.cc

Issue 201070: Implementation of application cache update algorithm.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 | « webkit/appcache/appcache.h ('k') | webkit/appcache/appcache_group.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/appcache.cc
===================================================================
--- webkit/appcache/appcache.cc (revision 26887)
+++ webkit/appcache/appcache.cc (working copy)
@@ -7,17 +7,17 @@
#include "base/logging.h"
#include "webkit/appcache/appcache_group.h"
#include "webkit/appcache/appcache_host.h"
+#include "webkit/appcache/appcache_interfaces.h"
#include "webkit/appcache/appcache_service.h"
namespace appcache {
AppCache::AppCache(AppCacheService *service, int64 cache_id)
- : cache_id_(cache_id),
- manifest_(NULL),
- owning_group_(NULL),
- online_whitelist_all_(false),
- is_complete_(false),
- service_(service) {
+ : cache_id_(cache_id),
+ owning_group_(NULL),
+ online_whitelist_all_(false),
+ is_complete_(false),
+ service_(service) {
service_->AddCache(this);
}
@@ -42,7 +42,7 @@
void AppCache::AddOrModifyEntry(const GURL& url, const AppCacheEntry& entry) {
std::pair<EntryMap::iterator, bool> ret =
- entries_.insert(EntryMap::value_type(url, entry));
+ entries_.insert(EntryMap::value_type(url, entry));
// Entry already exists. Merge the types of the new and existing entries.
if (!ret.second)
@@ -54,4 +54,11 @@
return (it != entries_.end()) ? &(it->second) : NULL;
}
+void AppCache::InitializeWithManifest(Manifest* manifest) {
+ DCHECK(manifest);
+ fallback_namespaces_.swap(manifest->fallback_namespaces);
+ online_whitelist_namespaces_.swap(manifest->online_whitelist_namespaces);
+ online_whitelist_all_ = manifest->online_whitelist_all;
+}
+
} // namespace appcache
« no previous file with comments | « webkit/appcache/appcache.h ('k') | webkit/appcache/appcache_group.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698