OLD | NEW |
1 // Copyright (c) 2011 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/appcache_update_job.h" | 5 #include "webkit/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/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 return false; | 285 return false; |
286 } | 286 } |
287 ++retry_503_attempts_; | 287 ++retry_503_attempts_; |
288 request_.reset(new net::URLRequest(url_, this)); | 288 request_.reset(new net::URLRequest(url_, this)); |
289 Start(); | 289 Start(); |
290 return true; | 290 return true; |
291 } | 291 } |
292 | 292 |
293 AppCacheUpdateJob::AppCacheUpdateJob(AppCacheService* service, | 293 AppCacheUpdateJob::AppCacheUpdateJob(AppCacheService* service, |
294 AppCacheGroup* group) | 294 AppCacheGroup* group) |
295 : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), | 295 : service_(service), |
296 service_(service), | |
297 group_(group), | 296 group_(group), |
298 update_type_(UNKNOWN_TYPE), | 297 update_type_(UNKNOWN_TYPE), |
299 internal_state_(FETCH_MANIFEST), | 298 internal_state_(FETCH_MANIFEST), |
300 master_entries_completed_(0), | 299 master_entries_completed_(0), |
301 url_fetches_completed_(0), | 300 url_fetches_completed_(0), |
302 manifest_fetcher_(NULL), | 301 manifest_fetcher_(NULL), |
303 stored_state_(UNSTORED) { | 302 stored_state_(UNSTORED) { |
304 DCHECK(group_); | 303 DCHECK(group_); |
305 manifest_url_ = group_->manifest_url(); | 304 manifest_url_ = group_->manifest_url(); |
306 } | 305 } |
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1329 | 1328 |
1330 // Break the connection with the group so the group cannot call delete | 1329 // Break the connection with the group so the group cannot call delete |
1331 // on this object after we've posted a task to delete ourselves. | 1330 // on this object after we've posted a task to delete ourselves. |
1332 group_->SetUpdateStatus(AppCacheGroup::IDLE); | 1331 group_->SetUpdateStatus(AppCacheGroup::IDLE); |
1333 group_ = NULL; | 1332 group_ = NULL; |
1334 | 1333 |
1335 MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 1334 MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
1336 } | 1335 } |
1337 | 1336 |
1338 } // namespace appcache | 1337 } // namespace appcache |
OLD | NEW |