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 "content/browser/appcache/appcache_update_job.h" | 5 #include "content/browser/appcache/appcache_update_job.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1440 loading_responses_.insert( | 1440 loading_responses_.insert( |
1441 LoadingResponses::value_type(copy_me->response_id(), url)); | 1441 LoadingResponses::value_type(copy_me->response_id(), url)); |
1442 storage_->LoadResponseInfo(manifest_url_, group_->group_id(), | 1442 storage_->LoadResponseInfo(manifest_url_, group_->group_id(), |
1443 copy_me->response_id(), | 1443 copy_me->response_id(), |
1444 this); | 1444 this); |
1445 // Async: wait for OnResponseInfoLoaded to complete. | 1445 // Async: wait for OnResponseInfoLoaded to complete. |
1446 return true; | 1446 return true; |
1447 } | 1447 } |
1448 | 1448 |
1449 void AppCacheUpdateJob::OnResponseInfoLoaded( | 1449 void AppCacheUpdateJob::OnResponseInfoLoaded( |
1450 AppCacheResponseInfo* response_info, int64 response_id) { | 1450 AppCacheResponseInfo* response_info, |
| 1451 int64_t response_id) { |
1451 const net::HttpResponseInfo* http_info = response_info ? | 1452 const net::HttpResponseInfo* http_info = response_info ? |
1452 response_info->http_response_info() : NULL; | 1453 response_info->http_response_info() : NULL; |
1453 | 1454 |
1454 // Needed response info for a manifest fetch request. | 1455 // Needed response info for a manifest fetch request. |
1455 if (internal_state_ == FETCH_MANIFEST) { | 1456 if (internal_state_ == FETCH_MANIFEST) { |
1456 if (http_info) | 1457 if (http_info) |
1457 manifest_fetcher_->set_existing_response_headers( | 1458 manifest_fetcher_->set_existing_response_headers( |
1458 http_info->headers.get()); | 1459 http_info->headers.get()); |
1459 manifest_fetcher_->Start(); | 1460 manifest_fetcher_->Start(); |
1460 return; | 1461 return; |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1706 // on this object after we've posted a task to delete ourselves. | 1707 // on this object after we've posted a task to delete ourselves. |
1707 if (group_) { | 1708 if (group_) { |
1708 group_->SetUpdateAppCacheStatus(AppCacheGroup::IDLE); | 1709 group_->SetUpdateAppCacheStatus(AppCacheGroup::IDLE); |
1709 group_ = NULL; | 1710 group_ = NULL; |
1710 } | 1711 } |
1711 | 1712 |
1712 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 1713 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
1713 } | 1714 } |
1714 | 1715 |
1715 } // namespace content | 1716 } // namespace content |
OLD | NEW |