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

Side by Side Diff: storage/browser/quota/special_storage_policy.cc

Issue 2422843002: Remove usage of FOR_EACH_OBSERVER macro in storage (Closed)
Patch Set: 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
« no previous file with comments | « storage/browser/database/database_tracker.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "storage/browser/quota/special_storage_policy.h" 5 #include "storage/browser/quota/special_storage_policy.h"
6 6
7 namespace storage { 7 namespace storage {
8 8
9 SpecialStoragePolicy::Observer::~Observer() {} 9 SpecialStoragePolicy::Observer::~Observer() {}
10 10
11 SpecialStoragePolicy::SpecialStoragePolicy() {} 11 SpecialStoragePolicy::SpecialStoragePolicy() {}
12 12
13 SpecialStoragePolicy::~SpecialStoragePolicy() {} 13 SpecialStoragePolicy::~SpecialStoragePolicy() {}
14 14
15 void SpecialStoragePolicy::AddObserver(Observer* observer) { 15 void SpecialStoragePolicy::AddObserver(Observer* observer) {
16 observers_.AddObserver(observer); 16 observers_.AddObserver(observer);
17 } 17 }
18 18
19 void SpecialStoragePolicy::RemoveObserver(Observer* observer) { 19 void SpecialStoragePolicy::RemoveObserver(Observer* observer) {
20 observers_.RemoveObserver(observer); 20 observers_.RemoveObserver(observer);
21 } 21 }
22 22
23 void SpecialStoragePolicy::NotifyGranted(const GURL& origin, int change_flags) { 23 void SpecialStoragePolicy::NotifyGranted(const GURL& origin, int change_flags) {
24 scoped_refptr<SpecialStoragePolicy> protect(this); 24 scoped_refptr<SpecialStoragePolicy> protect(this);
25 FOR_EACH_OBSERVER(Observer, observers_, OnGranted(origin, change_flags)); 25 for (auto& observer : observers_)
26 observer.OnGranted(origin, change_flags);
26 } 27 }
27 28
28 void SpecialStoragePolicy::NotifyRevoked(const GURL& origin, int change_flags) { 29 void SpecialStoragePolicy::NotifyRevoked(const GURL& origin, int change_flags) {
29 scoped_refptr<SpecialStoragePolicy> protect(this); 30 scoped_refptr<SpecialStoragePolicy> protect(this);
30 FOR_EACH_OBSERVER(Observer, observers_, OnRevoked(origin, change_flags)); 31 for (auto& observer : observers_)
32 observer.OnRevoked(origin, change_flags);
31 } 33 }
32 34
33 void SpecialStoragePolicy::NotifyCleared() { 35 void SpecialStoragePolicy::NotifyCleared() {
34 scoped_refptr<SpecialStoragePolicy> protect(this); 36 scoped_refptr<SpecialStoragePolicy> protect(this);
35 FOR_EACH_OBSERVER(Observer, observers_, OnCleared()); 37 for (auto& observer : observers_)
38 observer.OnCleared();
36 } 39 }
37 40
38 } // namespace storage 41 } // namespace storage
OLDNEW
« no previous file with comments | « storage/browser/database/database_tracker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698