| 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_group.h" | 5 #include "content/browser/appcache/appcache_group.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 | 253 |
| 254 if (status != IDLE) { | 254 if (status != IDLE) { |
| 255 DCHECK(update_job_); | 255 DCHECK(update_job_); |
| 256 } else { | 256 } else { |
| 257 update_job_ = NULL; | 257 update_job_ = NULL; |
| 258 | 258 |
| 259 // Observers may release us in these callbacks, so we protect against | 259 // Observers may release us in these callbacks, so we protect against |
| 260 // deletion by adding an extra ref in this scope (but only if we're not | 260 // deletion by adding an extra ref in this scope (but only if we're not |
| 261 // in our destructor). | 261 // in our destructor). |
| 262 scoped_refptr<AppCacheGroup> protect(is_in_dtor_ ? NULL : this); | 262 scoped_refptr<AppCacheGroup> protect(is_in_dtor_ ? NULL : this); |
| 263 FOR_EACH_OBSERVER(UpdateObserver, observers_, OnUpdateComplete(this)); | 263 for (auto& observer : observers_) |
| 264 observer.OnUpdateComplete(this); |
| 264 if (!queued_updates_.empty()) | 265 if (!queued_updates_.empty()) |
| 265 ScheduleUpdateRestart(kUpdateRestartDelayMs); | 266 ScheduleUpdateRestart(kUpdateRestartDelayMs); |
| 266 } | 267 } |
| 267 } | 268 } |
| 268 | 269 |
| 269 } // namespace content | 270 } // namespace content |
| OLD | NEW |