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

Side by Side Diff: webkit/appcache/appcache_service.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/appcache/appcache_service.h ('k') | webkit/appcache/appcache_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 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 #include "webkit/appcache/appcache_service.h" 5 #include "webkit/appcache/appcache_service.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/ref_counted.h" 8 #include "base/ref_counted.h"
9 #include "webkit/appcache/appcache.h" 9 #include "webkit/appcache/appcache.h"
10 #include "webkit/appcache/appcache_backend_impl.h" 10 #include "webkit/appcache/appcache_backend_impl.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } 54 }
55 55
56 void AppCacheService::AddGroup(AppCacheGroup* group) { 56 void AppCacheService::AddGroup(AppCacheGroup* group) {
57 const GURL& url = group->manifest_url(); 57 const GURL& url = group->manifest_url();
58 DCHECK(groups_.find(url) == groups_.end()); 58 DCHECK(groups_.find(url) == groups_.end());
59 groups_.insert(GroupMap::value_type(url, group)); 59 groups_.insert(GroupMap::value_type(url, group));
60 } 60 }
61 61
62 void AppCacheService::RemoveGroup(AppCacheGroup* group) { 62 void AppCacheService::RemoveGroup(AppCacheGroup* group) {
63 groups_.erase(group->manifest_url()); 63 groups_.erase(group->manifest_url());
64
65 // TODO(jennb): if group is obsolete, delete from storage.
64 } 66 }
65 67
66 void AppCacheService::LoadCache(int64 id, LoadClient* client) { 68 void AppCacheService::LoadCache(int64 id, LoadClient* client) {
67 // TODO(michaeln): actually retrieve from storage if needed 69 // TODO(michaeln): actually retrieve from storage if needed
68 client->CacheLoadedCallback(GetCache(id), id); 70 client->CacheLoadedCallback(GetCache(id), id);
69 } 71 }
70 72
71 void AppCacheService::LoadOrCreateGroup(const GURL& manifest_url, 73 void AppCacheService::LoadOrCreateGroup(const GURL& manifest_url,
72 LoadClient* client) { 74 LoadClient* client) {
73 // TODO(michaeln): actually retrieve from storage 75 // TODO(michaeln): actually retrieve from storage
(...skipping 18 matching lines...) Expand all
92 DCHECK(entry); 94 DCHECK(entry);
93 if (entry) 95 if (entry)
94 entry->add_types(AppCacheEntry::FOREIGN); 96 entry->add_types(AppCacheEntry::FOREIGN);
95 } 97 }
96 98
97 // TODO(michaeln): actually update in storage, and if this cache is 99 // TODO(michaeln): actually update in storage, and if this cache is
98 // being loaded be sure to update the memory cache upon load completion. 100 // being loaded be sure to update the memory cache upon load completion.
99 } 101 }
100 102
101 } // namespace appcache 103 } // namespace appcache
OLDNEW
« no previous file with comments | « webkit/appcache/appcache_service.h ('k') | webkit/appcache/appcache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698