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 "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/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 if (document_url_ != original_main_resource_url_) | 248 if (document_url_ != original_main_resource_url_) |
249 is_get_method_ = true; // A redirect was involved. | 249 is_get_method_ = true; // A redirect was involved. |
250 original_main_resource_url_ = GURL(); | 250 original_main_resource_url_ = GURL(); |
251 | 251 |
252 is_scheme_supported_ = IsSchemeSupportedForAppCache(document_url_); | 252 is_scheme_supported_ = IsSchemeSupportedForAppCache(document_url_); |
253 if ((document_response_.appCacheID() != kAppCacheNoCacheId) || | 253 if ((document_response_.appCacheID() != kAppCacheNoCacheId) || |
254 !is_scheme_supported_ || !is_get_method_) | 254 !is_scheme_supported_ || !is_get_method_) |
255 is_new_master_entry_ = NO; | 255 is_new_master_entry_ = NO; |
256 } | 256 } |
257 | 257 |
| 258 void WebApplicationCacheHostImpl::didReceiveDataForMainResource( |
| 259 const char* data, unsigned len) { |
| 260 if (is_new_master_entry_ == NO) |
| 261 return; |
| 262 // TODO(michaeln): write me |
| 263 } |
| 264 |
258 void WebApplicationCacheHostImpl::didFinishLoadingMainResource(bool success) { | 265 void WebApplicationCacheHostImpl::didFinishLoadingMainResource(bool success) { |
259 if (is_new_master_entry_ == NO) | 266 if (is_new_master_entry_ == NO) |
260 return; | 267 return; |
261 // TODO(michaeln): write me | 268 // TODO(michaeln): write me |
262 } | 269 } |
263 | 270 |
264 WebApplicationCacheHost::Status WebApplicationCacheHostImpl::status() { | 271 WebApplicationCacheHost::Status WebApplicationCacheHostImpl::status() { |
265 return static_cast<WebApplicationCacheHost::Status>(status_); | 272 return static_cast<WebApplicationCacheHost::Status>(status_); |
266 } | 273 } |
267 | 274 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 web_resources[i].isExplicit = resource_infos[i].is_explicit; | 314 web_resources[i].isExplicit = resource_infos[i].is_explicit; |
308 web_resources[i].isManifest = resource_infos[i].is_manifest; | 315 web_resources[i].isManifest = resource_infos[i].is_manifest; |
309 web_resources[i].isForeign = resource_infos[i].is_foreign; | 316 web_resources[i].isForeign = resource_infos[i].is_foreign; |
310 web_resources[i].isFallback = resource_infos[i].is_fallback; | 317 web_resources[i].isFallback = resource_infos[i].is_fallback; |
311 web_resources[i].url = resource_infos[i].url; | 318 web_resources[i].url = resource_infos[i].url; |
312 } | 319 } |
313 resources->swap(web_resources); | 320 resources->swap(web_resources); |
314 } | 321 } |
315 | 322 |
316 } // namespace content | 323 } // namespace content |
OLD | NEW |