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

Unified Diff: webkit/appcache/appcache_storage.cc

Issue 269062: AppCacheResponse storage implementation (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
Index: webkit/appcache/appcache_storage.cc
===================================================================
--- webkit/appcache/appcache_storage.cc (revision 0)
+++ webkit/appcache/appcache_storage.cc (revision 0)
@@ -0,0 +1,38 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "webkit/appcache/appcache_storage.h"
+
+#include "base/stl_util-inl.h"
+
+namespace appcache {
+
+AppCacheStorage::AppCacheStorage(AppCacheService* service)
+ : last_cache_id_(kUnitializedId), last_group_id_(kUnitializedId),
+ last_entry_id_(kUnitializedId), last_response_id_(kUnitializedId),
+ service_(service) {
+}
+
+AppCacheStorage::~AppCacheStorage() {
+ STLDeleteValues(&pending_info_loads_);
+ DCHECK(delegate_references_.empty());
+}
+
+void AppCacheStorage::LoadResponseInfo(
+ const GURL& manifest_url, int64 id, Delegate* delegate) {
+ AppCacheResponseInfo* info = working_set_.GetResponseInfo(id);
+ if (info) {
+ delegate->OnResponseInfoLoaded(info, id);
+ return;
+ }
+ ResponseInfoLoadTask* info_load =
+ GetOrCreateResponseInfoLoadTask(manifest_url, id);
+ DCHECK(manifest_url == info_load->manifest_url());
+ DCHECK(id == info_load->response_id());
+ info_load->AddDelegate(GetOrCreateDelegateReference(delegate));
+ info_load->StartIfNeeded();
+}
+
+} // namespace appcache
+
Property changes on: webkit\appcache\appcache_storage.cc
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698