OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/web_application_cache_host_impl.h" | 5 #include "webkit/appcache/web_application_cache_host_impl.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/id_map.h" | 8 #include "base/id_map.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 return NULL; | 64 return NULL; |
65 return static_cast<WebApplicationCacheHostImpl*> | 65 return static_cast<WebApplicationCacheHostImpl*> |
66 (data_source->applicationCacheHost()); | 66 (data_source->applicationCacheHost()); |
67 } | 67 } |
68 | 68 |
69 WebApplicationCacheHostImpl::WebApplicationCacheHostImpl( | 69 WebApplicationCacheHostImpl::WebApplicationCacheHostImpl( |
70 WebApplicationCacheHostClient* client, | 70 WebApplicationCacheHostClient* client, |
71 AppCacheBackend* backend) | 71 AppCacheBackend* backend) |
72 : client_(client), | 72 : client_(client), |
73 backend_(backend), | 73 backend_(backend), |
74 ALLOW_THIS_IN_INITIALIZER_LIST(host_id_(all_hosts()->Add(this))), | 74 host_id_(all_hosts()->Add(this)), |
75 status_(UNCACHED), | 75 status_(UNCACHED), |
76 is_scheme_supported_(false), | 76 is_scheme_supported_(false), |
77 is_get_method_(false), | 77 is_get_method_(false), |
78 is_new_master_entry_(MAYBE), | 78 is_new_master_entry_(MAYBE), |
79 was_select_cache_called_(false) { | 79 was_select_cache_called_(false) { |
80 DCHECK(client && backend && (host_id_ != kNoHostId)); | 80 DCHECK(client && backend && (host_id_ != kNoHostId)); |
81 | 81 |
82 backend_->RegisterHost(host_id_); | 82 backend_->RegisterHost(host_id_); |
83 } | 83 } |
84 | 84 |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 web_resources[i].isExplicit = resource_infos[i].is_explicit; | 319 web_resources[i].isExplicit = resource_infos[i].is_explicit; |
320 web_resources[i].isManifest = resource_infos[i].is_manifest; | 320 web_resources[i].isManifest = resource_infos[i].is_manifest; |
321 web_resources[i].isForeign = resource_infos[i].is_foreign; | 321 web_resources[i].isForeign = resource_infos[i].is_foreign; |
322 web_resources[i].isFallback = resource_infos[i].is_fallback; | 322 web_resources[i].isFallback = resource_infos[i].is_fallback; |
323 web_resources[i].url = resource_infos[i].url; | 323 web_resources[i].url = resource_infos[i].url; |
324 } | 324 } |
325 resources->swap(web_resources); | 325 resources->swap(web_resources); |
326 } | 326 } |
327 | 327 |
328 } // appcache namespace | 328 } // appcache namespace |
OLD | NEW |