| 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 "components/content_settings/core/common/content_settings_pattern.h" | 10 #include "components/content_settings/core/common/content_settings_pattern.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 const ResourceIdentifier& resource_identifier, | 37 const ResourceIdentifier& resource_identifier, |
| 38 base::Value* value) { | 38 base::Value* value) { |
| 39 return false; | 39 return false; |
| 40 } | 40 } |
| 41 | 41 |
| 42 void CustomExtensionProvider::ShutdownOnUIThread() { | 42 void CustomExtensionProvider::ShutdownOnUIThread() { |
| 43 RemoveAllObservers(); | 43 RemoveAllObservers(); |
| 44 extensions_settings_->RemoveObserver(this); | 44 extensions_settings_->RemoveObserver(this); |
| 45 } | 45 } |
| 46 | 46 |
| 47 std::string CustomExtensionProvider::GetProviderName() const { |
| 48 return "extension"; |
| 49 } |
| 50 |
| 51 SettingSource CustomExtensionProvider::GetSettingSource() const { |
| 52 return SETTING_SOURCE_EXTENSION; |
| 53 } |
| 54 |
| 47 void CustomExtensionProvider::OnContentSettingChanged( | 55 void CustomExtensionProvider::OnContentSettingChanged( |
| 48 const std::string& extension_id, | 56 const std::string& extension_id, |
| 49 bool incognito) { | 57 bool incognito) { |
| 50 if (incognito_ != incognito) | 58 if (incognito_ != incognito) |
| 51 return; | 59 return; |
| 52 // TODO(markusheintz): Be more concise. | 60 // TODO(markusheintz): Be more concise. |
| 53 NotifyObservers(ContentSettingsPattern(), | 61 NotifyObservers(ContentSettingsPattern(), |
| 54 ContentSettingsPattern(), | 62 ContentSettingsPattern(), |
| 55 CONTENT_SETTINGS_TYPE_DEFAULT, | 63 CONTENT_SETTINGS_TYPE_DEFAULT, |
| 56 std::string()); | 64 std::string()); |
| 57 } | 65 } |
| 58 | 66 |
| 59 } // namespace content_settings | 67 } // namespace content_settings |
| OLD | NEW |