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

Side by Side Diff: content/child/appcache/web_application_cache_host_impl.cc

Issue 2816403002: test all
Patch Set: fix sharedworker Created 3 years, 8 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/child/appcache/web_application_cache_host_impl.h" 5 #include "content/child/appcache/web_application_cache_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/id_map.h" 10 #include "base/id_map.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 void WebApplicationCacheHostImpl::GetAssociatedCacheInfo( 305 void WebApplicationCacheHostImpl::GetAssociatedCacheInfo(
306 WebApplicationCacheHost::CacheInfo* info) { 306 WebApplicationCacheHost::CacheInfo* info) {
307 info->manifest_url = cache_info_.manifest_url; 307 info->manifest_url = cache_info_.manifest_url;
308 if (!cache_info_.is_complete) 308 if (!cache_info_.is_complete)
309 return; 309 return;
310 info->creation_time = cache_info_.creation_time.ToDoubleT(); 310 info->creation_time = cache_info_.creation_time.ToDoubleT();
311 info->update_time = cache_info_.last_update_time.ToDoubleT(); 311 info->update_time = cache_info_.last_update_time.ToDoubleT();
312 info->total_size = cache_info_.size; 312 info->total_size = cache_info_.size;
313 } 313 }
314 314
315 int WebApplicationCacheHostImpl::GetHostID() const {
316 return host_id_;
317 }
318
315 void WebApplicationCacheHostImpl::GetResourceList( 319 void WebApplicationCacheHostImpl::GetResourceList(
316 WebVector<ResourceInfo>* resources) { 320 WebVector<ResourceInfo>* resources) {
317 if (!cache_info_.is_complete) 321 if (!cache_info_.is_complete)
318 return; 322 return;
319 std::vector<AppCacheResourceInfo> resource_infos; 323 std::vector<AppCacheResourceInfo> resource_infos;
320 backend_->GetResourceList(host_id_, &resource_infos); 324 backend_->GetResourceList(host_id_, &resource_infos);
321 325
322 WebVector<ResourceInfo> web_resources(resource_infos.size()); 326 WebVector<ResourceInfo> web_resources(resource_infos.size());
323 for (size_t i = 0; i < resource_infos.size(); ++i) { 327 for (size_t i = 0; i < resource_infos.size(); ++i) {
324 web_resources[i].size = resource_infos[i].size; 328 web_resources[i].size = resource_infos[i].size;
325 web_resources[i].is_master = resource_infos[i].is_master; 329 web_resources[i].is_master = resource_infos[i].is_master;
326 web_resources[i].is_explicit = resource_infos[i].is_explicit; 330 web_resources[i].is_explicit = resource_infos[i].is_explicit;
327 web_resources[i].is_manifest = resource_infos[i].is_manifest; 331 web_resources[i].is_manifest = resource_infos[i].is_manifest;
328 web_resources[i].is_foreign = resource_infos[i].is_foreign; 332 web_resources[i].is_foreign = resource_infos[i].is_foreign;
329 web_resources[i].is_fallback = resource_infos[i].is_fallback; 333 web_resources[i].is_fallback = resource_infos[i].is_fallback;
330 web_resources[i].url = resource_infos[i].url; 334 web_resources[i].url = resource_infos[i].url;
331 } 335 }
332 resources->Swap(web_resources); 336 resources->Swap(web_resources);
333 } 337 }
334 338
335 } // namespace content 339 } // namespace content
OLDNEW
« no previous file with comments | « content/child/appcache/web_application_cache_host_impl.h ('k') | content/child/resource_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698