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

Side by Side Diff: webkit/appcache/appcache_backend_impl.cc

Issue 6667057: Loading from the "most appropiate" appcache. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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
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_backend_impl.h" 5 #include "webkit/appcache/appcache_backend_impl.h"
6 6
7 #include "base/stl_util-inl.h" 7 #include "base/stl_util-inl.h"
8 #include "webkit/appcache/appcache.h" 8 #include "webkit/appcache/appcache.h"
9 #include "webkit/appcache/appcache_group.h" 9 #include "webkit/appcache/appcache_group.h"
10 #include "webkit/appcache/appcache_service.h" 10 #include "webkit/appcache/appcache_service.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 bool AppCacheBackendImpl::UnregisterHost(int id) { 46 bool AppCacheBackendImpl::UnregisterHost(int id) {
47 HostMap::iterator found = hosts_.find(id); 47 HostMap::iterator found = hosts_.find(id);
48 if (found == hosts_.end()) 48 if (found == hosts_.end())
49 return false; 49 return false;
50 50
51 delete found->second; 51 delete found->second;
52 hosts_.erase(found); 52 hosts_.erase(found);
53 return true; 53 return true;
54 } 54 }
55 55
56 bool AppCacheBackendImpl::SetSpawningHostId(
57 int host_id,
58 int spawning_host_id) {
59 AppCacheHost* host = GetHost(host_id);
60 if (!host)
61 return false;
62 // TODO(michaeln): write me
adamk 2011/03/17 23:33:29 Can this be made any more informative about what i
michaeln 2011/03/17 23:59:04 would the crbug url help? i plan on following up a
adamk 2011/03/18 00:03:29 Yeah, the bug number seems sufficient.
63 return true;
64 }
65
56 bool AppCacheBackendImpl::SelectCache( 66 bool AppCacheBackendImpl::SelectCache(
57 int host_id, 67 int host_id,
58 const GURL& document_url, 68 const GURL& document_url,
59 const int64 cache_document_was_loaded_from, 69 const int64 cache_document_was_loaded_from,
60 const GURL& manifest_url) { 70 const GURL& manifest_url) {
61 AppCacheHost* host = GetHost(host_id); 71 AppCacheHost* host = GetHost(host_id);
62 if (!host) 72 if (!host)
63 return false; 73 return false;
64 74
65 host->SelectCache(document_url, cache_document_was_loaded_from, 75 host->SelectCache(document_url, cache_document_was_loaded_from,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 void AppCacheBackendImpl::GetResourceList( 142 void AppCacheBackendImpl::GetResourceList(
133 int host_id, std::vector<appcache::AppCacheResourceInfo>* resource_infos) { 143 int host_id, std::vector<appcache::AppCacheResourceInfo>* resource_infos) {
134 AppCacheHost* host = GetHost(host_id); 144 AppCacheHost* host = GetHost(host_id);
135 if (!host) 145 if (!host)
136 return; 146 return;
137 147
138 host->GetResourceList(resource_infos); 148 host->GetResourceList(resource_infos);
139 } 149 }
140 150
141 } // namespace appcache 151 } // namespace appcache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698