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

Side by Side Diff: third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.cpp

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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 ApplicationCacheHost::CacheInfo ApplicationCacheHost::ApplicationCacheInfo() { 234 ApplicationCacheHost::CacheInfo ApplicationCacheHost::ApplicationCacheInfo() {
235 if (!host_) 235 if (!host_)
236 return CacheInfo(KURL(), 0, 0, 0); 236 return CacheInfo(KURL(), 0, 0, 0);
237 237
238 WebApplicationCacheHost::CacheInfo web_info; 238 WebApplicationCacheHost::CacheInfo web_info;
239 host_->GetAssociatedCacheInfo(&web_info); 239 host_->GetAssociatedCacheInfo(&web_info);
240 return CacheInfo(web_info.manifest_url, web_info.creation_time, 240 return CacheInfo(web_info.manifest_url, web_info.creation_time,
241 web_info.update_time, web_info.total_size); 241 web_info.update_time, web_info.total_size);
242 } 242 }
243 243
244 int ApplicationCacheHost::GetHostID() const {
245 if (!host_)
246 return 0;
247 return host_->GetHostID();
248 }
249
244 void ApplicationCacheHost::FillResourceList(ResourceInfoList* resources) { 250 void ApplicationCacheHost::FillResourceList(ResourceInfoList* resources) {
245 if (!host_) 251 if (!host_)
246 return; 252 return;
247 253
248 WebVector<WebApplicationCacheHost::ResourceInfo> web_resources; 254 WebVector<WebApplicationCacheHost::ResourceInfo> web_resources;
249 host_->GetResourceList(&web_resources); 255 host_->GetResourceList(&web_resources);
250 for (size_t i = 0; i < web_resources.size(); ++i) { 256 for (size_t i = 0; i < web_resources.size(); ++i) {
251 resources->push_back( 257 resources->push_back(
252 ResourceInfo(web_resources[i].url, web_resources[i].is_master, 258 ResourceInfo(web_resources[i].url, web_resources[i].is_master,
253 web_resources[i].is_manifest, web_resources[i].is_fallback, 259 web_resources[i].is_manifest, web_resources[i].is_fallback,
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 NotifyApplicationCache(kErrorEvent, 0, 0, reason, url.GetString(), status, 359 NotifyApplicationCache(kErrorEvent, 0, 0, reason, url.GetString(), status,
354 message); 360 message);
355 } 361 }
356 362
357 DEFINE_TRACE(ApplicationCacheHost) { 363 DEFINE_TRACE(ApplicationCacheHost) {
358 visitor->Trace(dom_application_cache_); 364 visitor->Trace(dom_application_cache_);
359 visitor->Trace(document_loader_); 365 visitor->Trace(document_loader_);
360 } 366 }
361 367
362 } // namespace blink 368 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698