Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: content/browser/appcache/appcache_group.cc

Issue 2422923002: Reduce usage of FOR_EACH_OBSERVER macro in content/browser (Closed)
Patch Set: skip cases in 2418143004 and 2418373002 Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | content/browser/appcache/appcache_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698