| OLD | NEW |
| 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 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| 30 // Note: the order of the elements in this array must match those | 30 // Note: the order of the elements in this array must match those |
| 31 // of the EventID enum in appcache_interfaces.h. | 31 // of the EventID enum in appcache_interfaces.h. |
| 32 const char* const kEventNames[] = { | 32 const char* const kEventNames[] = { |
| 33 "Checking", "Error", "NoUpdate", "Downloading", "Progress", | 33 "Checking", "Error", "NoUpdate", "Downloading", "Progress", |
| 34 "UpdateReady", "Cached", "Obsolete" | 34 "UpdateReady", "Cached", "Obsolete" |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 typedef IDMap<WebApplicationCacheHostImpl> HostsMap; | 37 using HostsMap = IDMap<WebApplicationCacheHostImpl*>; |
| 38 | 38 |
| 39 HostsMap* all_hosts() { | 39 HostsMap* all_hosts() { |
| 40 static HostsMap* map = new HostsMap; | 40 static HostsMap* map = new HostsMap; |
| 41 return map; | 41 return map; |
| 42 } | 42 } |
| 43 | 43 |
| 44 GURL ClearUrlRef(const GURL& url) { | 44 GURL ClearUrlRef(const GURL& url) { |
| 45 if (!url.has_ref()) | 45 if (!url.has_ref()) |
| 46 return url; | 46 return url; |
| 47 GURL::Replacements replacements; | 47 GURL::Replacements replacements; |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 web_resources[i].isExplicit = resource_infos[i].is_explicit; | 316 web_resources[i].isExplicit = resource_infos[i].is_explicit; |
| 317 web_resources[i].isManifest = resource_infos[i].is_manifest; | 317 web_resources[i].isManifest = resource_infos[i].is_manifest; |
| 318 web_resources[i].isForeign = resource_infos[i].is_foreign; | 318 web_resources[i].isForeign = resource_infos[i].is_foreign; |
| 319 web_resources[i].isFallback = resource_infos[i].is_fallback; | 319 web_resources[i].isFallback = resource_infos[i].is_fallback; |
| 320 web_resources[i].url = resource_infos[i].url; | 320 web_resources[i].url = resource_infos[i].url; |
| 321 } | 321 } |
| 322 resources->swap(web_resources); | 322 resources->swap(web_resources); |
| 323 } | 323 } |
| 324 | 324 |
| 325 } // namespace content | 325 } // namespace content |
| OLD | NEW |