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

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

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
Patch Set: Created 5 years, 6 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
« no previous file with comments | « content/browser/appcache/appcache_group.h ('k') | content/browser/appcache/appcache_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 } 215 }
216 216
217 if (!is_obsolete() && !is_being_deleted()) 217 if (!is_obsolete() && !is_being_deleted())
218 StartUpdateWithNewMasterEntry(host, it->second); 218 StartUpdateWithNewMasterEntry(host, it->second);
219 } 219 }
220 } 220 }
221 221
222 // static 222 // static
223 bool AppCacheGroup::FindObserver( 223 bool AppCacheGroup::FindObserver(
224 const UpdateObserver* find_me, 224 const UpdateObserver* find_me,
225 const ObserverList<UpdateObserver>& observer_list) { 225 const base::ObserverList<UpdateObserver>& observer_list) {
226 return observer_list.HasObserver(find_me); 226 return observer_list.HasObserver(find_me);
227 } 227 }
228 228
229 void AppCacheGroup::ScheduleUpdateRestart(int delay_ms) { 229 void AppCacheGroup::ScheduleUpdateRestart(int delay_ms) {
230 DCHECK(restart_update_task_.IsCancelled()); 230 DCHECK(restart_update_task_.IsCancelled());
231 restart_update_task_.Reset( 231 restart_update_task_.Reset(
232 base::Bind(&AppCacheGroup::RunQueuedUpdates, this)); 232 base::Bind(&AppCacheGroup::RunQueuedUpdates, this));
233 base::MessageLoop::current()->PostDelayedTask( 233 base::MessageLoop::current()->PostDelayedTask(
234 FROM_HERE, 234 FROM_HERE,
235 restart_update_task_.callback(), 235 restart_update_task_.callback(),
(...skipping 21 matching lines...) Expand all
257 // deletion by adding an extra ref in this scope (but only if we're not 257 // deletion by adding an extra ref in this scope (but only if we're not
258 // in our destructor). 258 // in our destructor).
259 scoped_refptr<AppCacheGroup> protect(is_in_dtor_ ? NULL : this); 259 scoped_refptr<AppCacheGroup> protect(is_in_dtor_ ? NULL : this);
260 FOR_EACH_OBSERVER(UpdateObserver, observers_, OnUpdateComplete(this)); 260 FOR_EACH_OBSERVER(UpdateObserver, observers_, OnUpdateComplete(this));
261 if (!queued_updates_.empty()) 261 if (!queued_updates_.empty())
262 ScheduleUpdateRestart(kUpdateRestartDelayMs); 262 ScheduleUpdateRestart(kUpdateRestartDelayMs);
263 } 263 }
264 } 264 }
265 265
266 } // namespace content 266 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/appcache/appcache_group.h ('k') | content/browser/appcache/appcache_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698