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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "webkit/appcache/appcache_storage.h"
6
7 #include "base/stl_util-inl.h"
8
9 namespace appcache {
10
11 AppCacheStorage::AppCacheStorage(AppCacheService* service)
12 : last_cache_id_(kUnitializedId), last_group_id_(kUnitializedId),
13 last_entry_id_(kUnitializedId), last_response_id_(kUnitializedId),
14 service_(service) {
15 }
16
17 AppCacheStorage::~AppCacheStorage() {
18 STLDeleteValues(&pending_info_loads_);
19 DCHECK(delegate_references_.empty());
20 }
21
22 void AppCacheStorage::LoadResponseInfo(
23 const GURL& manifest_url, int64 id, Delegate* delegate) {
24 AppCacheResponseInfo* info = working_set_.GetResponseInfo(id);
25 if (info) {
26 delegate->OnResponseInfoLoaded(info, id);
27 return;
28 }
29 ResponseInfoLoadTask* info_load =
30 GetOrCreateResponseInfoLoadTask(manifest_url, id);
31 DCHECK(manifest_url == info_load->manifest_url());
32 DCHECK(id == info_load->response_id());
33 info_load->AddDelegate(GetOrCreateDelegateReference(delegate));
34 info_load->StartIfNeeded();
35 }
36
37 } // namespace appcache
38
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698