OLD | NEW |
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 Loading... |
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, see the bug for details. |
| 63 // http://code.google.com/p/chromium/issues/detail?id=68479 |
| 64 return true; |
| 65 } |
| 66 |
56 bool AppCacheBackendImpl::SelectCache( | 67 bool AppCacheBackendImpl::SelectCache( |
57 int host_id, | 68 int host_id, |
58 const GURL& document_url, | 69 const GURL& document_url, |
59 const int64 cache_document_was_loaded_from, | 70 const int64 cache_document_was_loaded_from, |
60 const GURL& manifest_url) { | 71 const GURL& manifest_url) { |
61 AppCacheHost* host = GetHost(host_id); | 72 AppCacheHost* host = GetHost(host_id); |
62 if (!host) | 73 if (!host) |
63 return false; | 74 return false; |
64 | 75 |
65 host->SelectCache(document_url, cache_document_was_loaded_from, | 76 host->SelectCache(document_url, cache_document_was_loaded_from, |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 void AppCacheBackendImpl::GetResourceList( | 143 void AppCacheBackendImpl::GetResourceList( |
133 int host_id, std::vector<appcache::AppCacheResourceInfo>* resource_infos) { | 144 int host_id, std::vector<appcache::AppCacheResourceInfo>* resource_infos) { |
134 AppCacheHost* host = GetHost(host_id); | 145 AppCacheHost* host = GetHost(host_id); |
135 if (!host) | 146 if (!host) |
136 return; | 147 return; |
137 | 148 |
138 host->GetResourceList(resource_infos); | 149 host->GetResourceList(resource_infos); |
139 } | 150 } |
140 | 151 |
141 } // namespace appcache | 152 } // namespace appcache |
OLD | NEW |