| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_extension_provider.h" | 5 #include "chrome/browser/content_settings/content_settings_extension_provider.h" |
| 6 | 6 |
| 7 #include "base/scoped_ptr.h" | 7 #include "base/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/extension_content_settings_store.h" | 9 #include "chrome/browser/extensions/extension_content_settings_store.h" |
| 10 #include "chrome/common/content_settings_pattern.h" | 10 #include "chrome/common/content_settings_pattern.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 RuleIterator* ExtensionProvider::GetRuleIterator( | 25 RuleIterator* ExtensionProvider::GetRuleIterator( |
| 26 ContentSettingsType content_type, | 26 ContentSettingsType content_type, |
| 27 const ResourceIdentifier& resource_identifier, | 27 const ResourceIdentifier& resource_identifier, |
| 28 bool incognito) const { | 28 bool incognito) const { |
| 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 ExtensionProvider::SetWebsiteSetting( |
| 35 const ContentSettingsPattern& primary_pattern, |
| 36 const ContentSettingsPattern& secondary_pattern, |
| 37 ContentSettingsType content_type, |
| 38 const ResourceIdentifier& resource_identifier, |
| 39 Value* value) { |
| 40 return false; |
| 41 } |
| 42 |
| 34 void ExtensionProvider::ShutdownOnUIThread() { | 43 void ExtensionProvider::ShutdownOnUIThread() { |
| 35 RemoveAllObservers(); | 44 RemoveAllObservers(); |
| 36 extensions_settings_->RemoveObserver(this); | 45 extensions_settings_->RemoveObserver(this); |
| 37 } | 46 } |
| 38 | 47 |
| 39 void ExtensionProvider::OnContentSettingChanged( | 48 void ExtensionProvider::OnContentSettingChanged( |
| 40 const std::string& extension_id, | 49 const std::string& extension_id, |
| 41 bool incognito) { | 50 bool incognito) { |
| 42 if (incognito_ != incognito) | 51 if (incognito_ != incognito) |
| 43 return; | 52 return; |
| 44 // TODO(markusheintz): Be more concise. | 53 // TODO(markusheintz): Be more concise. |
| 45 NotifyObservers(ContentSettingsPattern(), | 54 NotifyObservers(ContentSettingsPattern(), |
| 46 ContentSettingsPattern(), | 55 ContentSettingsPattern(), |
| 47 CONTENT_SETTINGS_TYPE_DEFAULT, | 56 CONTENT_SETTINGS_TYPE_DEFAULT, |
| 48 std::string()); | 57 std::string()); |
| 49 } | 58 } |
| 50 | 59 |
| 51 } // namespace content_settings | 60 } // namespace content_settings |
| OLD | NEW |