| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 } else { | 219 } else { |
| 220 status_ = UNCACHED; | 220 status_ = UNCACHED; |
| 221 is_new_master_entry_ = NO; | 221 is_new_master_entry_ = NO; |
| 222 manifest_gurl = GURL(); | 222 manifest_gurl = GURL(); |
| 223 } | 223 } |
| 224 backend_->SelectCache(host_id_, document_url_, | 224 backend_->SelectCache(host_id_, document_url_, |
| 225 kNoCacheId, manifest_gurl); | 225 kNoCacheId, manifest_gurl); |
| 226 return true; | 226 return true; |
| 227 } | 227 } |
| 228 | 228 |
| 229 DCHECK(is_new_master_entry_ = NO); | 229 DCHECK_EQ(NO, is_new_master_entry_); |
| 230 | 230 |
| 231 // 6.9.6 The application cache selection algorithm | 231 // 6.9.6 The application cache selection algorithm |
| 232 // Check for 'foreign' entries. | 232 // Check for 'foreign' entries. |
| 233 GURL document_manifest_gurl(document_response_.appCacheManifestURL()); | 233 GURL document_manifest_gurl(document_response_.appCacheManifestURL()); |
| 234 if (document_manifest_gurl != manifest_gurl) { | 234 if (document_manifest_gurl != manifest_gurl) { |
| 235 backend_->MarkAsForeignEntry(host_id_, document_url_, | 235 backend_->MarkAsForeignEntry(host_id_, document_url_, |
| 236 document_response_.appCacheID()); | 236 document_response_.appCacheID()); |
| 237 status_ = UNCACHED; | 237 status_ = UNCACHED; |
| 238 return false; // the navigation will be restarted | 238 return false; // the navigation will be restarted |
| 239 } | 239 } |
| (...skipping 79 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 |