| 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" |
| 11 #include "webkit/appcache/web_application_cache_host_impl.h" | 11 #include "webkit/appcache/web_application_cache_host_impl.h" |
| 12 | 12 |
| 13 namespace appcache { | 13 namespace appcache { |
| 14 | 14 |
| 15 AppCacheBackendImpl::AppCacheBackendImpl() |
| 16 : service_(NULL), |
| 17 frontend_(NULL), |
| 18 process_id_(0) { |
| 19 } |
| 20 |
| 15 AppCacheBackendImpl::~AppCacheBackendImpl() { | 21 AppCacheBackendImpl::~AppCacheBackendImpl() { |
| 16 STLDeleteValues(&hosts_); | 22 STLDeleteValues(&hosts_); |
| 17 if (service_) | 23 if (service_) |
| 18 service_->UnregisterBackend(this); | 24 service_->UnregisterBackend(this); |
| 19 } | 25 } |
| 20 | 26 |
| 21 void AppCacheBackendImpl::Initialize(AppCacheService* service, | 27 void AppCacheBackendImpl::Initialize(AppCacheService* service, |
| 22 AppCacheFrontend* frontend, | 28 AppCacheFrontend* frontend, |
| 23 int process_id) { | 29 int process_id) { |
| 24 DCHECK(!service_ && !frontend_ && frontend && service); | 30 DCHECK(!service_ && !frontend_ && frontend && service); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 void AppCacheBackendImpl::GetResourceList( | 132 void AppCacheBackendImpl::GetResourceList( |
| 127 int host_id, std::vector<appcache::AppCacheResourceInfo>* resource_infos) { | 133 int host_id, std::vector<appcache::AppCacheResourceInfo>* resource_infos) { |
| 128 AppCacheHost* host = GetHost(host_id); | 134 AppCacheHost* host = GetHost(host_id); |
| 129 if (!host) | 135 if (!host) |
| 130 return; | 136 return; |
| 131 | 137 |
| 132 host->GetResourceList(resource_infos); | 138 host->GetResourceList(resource_infos); |
| 133 } | 139 } |
| 134 | 140 |
| 135 } // namespace appcache | 141 } // namespace appcache |
| OLD | NEW |