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 "chrome/browser/content_settings/content_settings_custom_extension_prov
ider.h" | 5 #include "chrome/browser/content_settings/content_settings_custom_extension_prov
ider.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "chrome/browser/content_settings/content_settings_utils.h" | 8 #include "chrome/browser/content_settings/content_settings_utils.h" |
9 #include "chrome/browser/extensions/api/content_settings/content_settings_store.
h" | 9 #include "chrome/browser/extensions/api/content_settings/content_settings_store.
h" |
10 #include "chrome/common/content_settings_pattern.h" | 10 #include "chrome/common/content_settings_pattern.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 return extensions_settings_->GetRuleIterator(content_type, | 29 return extensions_settings_->GetRuleIterator(content_type, |
30 resource_identifier, | 30 resource_identifier, |
31 incognito); | 31 incognito); |
32 } | 32 } |
33 | 33 |
34 bool CustomExtensionProvider::SetWebsiteSetting( | 34 bool CustomExtensionProvider::SetWebsiteSetting( |
35 const ContentSettingsPattern& primary_pattern, | 35 const ContentSettingsPattern& primary_pattern, |
36 const ContentSettingsPattern& secondary_pattern, | 36 const ContentSettingsPattern& secondary_pattern, |
37 ContentSettingsType content_type, | 37 ContentSettingsType content_type, |
38 const ResourceIdentifier& resource_identifier, | 38 const ResourceIdentifier& resource_identifier, |
39 Value* value) { | 39 base::Value* value) { |
40 return false; | 40 return false; |
41 } | 41 } |
42 | 42 |
43 void CustomExtensionProvider::ShutdownOnUIThread() { | 43 void CustomExtensionProvider::ShutdownOnUIThread() { |
44 RemoveAllObservers(); | 44 RemoveAllObservers(); |
45 extensions_settings_->RemoveObserver(this); | 45 extensions_settings_->RemoveObserver(this); |
46 } | 46 } |
47 | 47 |
48 void CustomExtensionProvider::OnContentSettingChanged( | 48 void CustomExtensionProvider::OnContentSettingChanged( |
49 const std::string& extension_id, | 49 const std::string& extension_id, |
50 bool incognito) { | 50 bool incognito) { |
51 if (incognito_ != incognito) | 51 if (incognito_ != incognito) |
52 return; | 52 return; |
53 // TODO(markusheintz): Be more concise. | 53 // TODO(markusheintz): Be more concise. |
54 NotifyObservers(ContentSettingsPattern(), | 54 NotifyObservers(ContentSettingsPattern(), |
55 ContentSettingsPattern(), | 55 ContentSettingsPattern(), |
56 CONTENT_SETTINGS_TYPE_DEFAULT, | 56 CONTENT_SETTINGS_TYPE_DEFAULT, |
57 std::string()); | 57 std::string()); |
58 } | 58 } |
59 | 59 |
60 } // namespace content_settings | 60 } // namespace content_settings |
OLD | NEW |