Introduce ProfilerMetricsProvider
[chromium-blink-merge.git] / chrome / browser / content_settings / content_settings_observable_provider.cc
blob614d29aef413ed62f487e0641363ff9bfb3df59a
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
3 // found in the LICENSE file.
5 #include "chrome/browser/content_settings/content_settings_observable_provider.h"
7 namespace content_settings {
9 // ////////////////////////////////////////////////////////////////////////////
10 // ObservableProvider
13 ObservableProvider::ObservableProvider() {
16 ObservableProvider::~ObservableProvider() {
19 void ObservableProvider::AddObserver(Observer* observer) {
20 observer_list_.AddObserver(observer);
23 void ObservableProvider::RemoveObserver(Observer* observer) {
24 observer_list_.RemoveObserver(observer);
27 void ObservableProvider::NotifyObservers(
28 const ContentSettingsPattern& primary_pattern,
29 const ContentSettingsPattern& secondary_pattern,
30 ContentSettingsType content_type,
31 const std::string& resource_identifier) {
32 FOR_EACH_OBSERVER(Observer,
33 observer_list_,
34 OnContentSettingChanged(
35 primary_pattern,
36 secondary_pattern,
37 content_type,
38 resource_identifier));
41 void ObservableProvider::RemoveAllObservers() {
42 observer_list_.Clear();
45 } // namespace content_settings