| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/appcache_update_job.h" | 5 #include "webkit/appcache/appcache_update_job.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 it != hosts_to_notify.end(); ++it) { | 116 it != hosts_to_notify.end(); ++it) { |
| 117 AppCacheFrontend* frontend = it->first; | 117 AppCacheFrontend* frontend = it->first; |
| 118 frontend->OnErrorEventRaised(it->second, error_message); | 118 frontend->OnErrorEventRaised(it->second, error_message); |
| 119 } | 119 } |
| 120 } | 120 } |
| 121 | 121 |
| 122 private: | 122 private: |
| 123 NotifyHostMap hosts_to_notify; | 123 NotifyHostMap hosts_to_notify; |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 AppCacheUpdateJob::UrlToFetch::UrlToFetch(const GURL& url, |
| 127 bool checked, |
| 128 AppCacheResponseInfo* info) |
| 129 : url(url), |
| 130 storage_checked(checked), |
| 131 existing_response_info(info) { |
| 132 } |
| 133 |
| 134 AppCacheUpdateJob::UrlToFetch::~UrlToFetch() { |
| 135 } |
| 136 |
| 126 AppCacheUpdateJob::AppCacheUpdateJob(AppCacheService* service, | 137 AppCacheUpdateJob::AppCacheUpdateJob(AppCacheService* service, |
| 127 AppCacheGroup* group) | 138 AppCacheGroup* group) |
| 128 : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), | 139 : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), |
| 129 service_(service), | 140 service_(service), |
| 130 group_(group), | 141 group_(group), |
| 131 update_type_(UNKNOWN_TYPE), | 142 update_type_(UNKNOWN_TYPE), |
| 132 internal_state_(FETCH_MANIFEST), | 143 internal_state_(FETCH_MANIFEST), |
| 133 master_entries_completed_(0), | 144 master_entries_completed_(0), |
| 134 url_fetches_completed_(0), | 145 url_fetches_completed_(0), |
| 135 manifest_url_request_(NULL), | 146 manifest_url_request_(NULL), |
| (...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1394 | 1405 |
| 1395 // Break the connection with the group so the group cannot call delete | 1406 // Break the connection with the group so the group cannot call delete |
| 1396 // on this object after we've posted a task to delete ourselves. | 1407 // on this object after we've posted a task to delete ourselves. |
| 1397 group_->SetUpdateStatus(AppCacheGroup::IDLE); | 1408 group_->SetUpdateStatus(AppCacheGroup::IDLE); |
| 1398 group_ = NULL; | 1409 group_ = NULL; |
| 1399 | 1410 |
| 1400 MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 1411 MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
| 1401 } | 1412 } |
| 1402 | 1413 |
| 1403 } // namespace appcache | 1414 } // namespace appcache |
| OLD | NEW |