OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/browser/content_settings/content_settings_internal_extension_pr
ovider.h" | 5 #include "chrome/browser/content_settings/content_settings_internal_extension_pr
ovider.h" |
6 | 6 |
7 #include "chrome/browser/content_settings/content_settings_rule.h" | 7 #include "chrome/browser/content_settings/content_settings_rule.h" |
8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
9 #include "chrome/common/chrome_content_client.h" | 9 #include "chrome/common/chrome_content_client.h" |
10 #include "chrome/common/extensions/api/plugins/plugins_handler.h" | 10 #include "chrome/common/extensions/api/plugins/plugins_handler.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 NOTREACHED(); | 153 NOTREACHED(); |
154 } | 154 } |
155 } | 155 } |
156 | 156 |
157 void InternalExtensionProvider::ShutdownOnUIThread() { | 157 void InternalExtensionProvider::ShutdownOnUIThread() { |
158 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 158 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
159 RemoveAllObservers(); | 159 RemoveAllObservers(); |
160 registrar_.reset(); | 160 registrar_.reset(); |
161 } | 161 } |
162 | 162 |
| 163 std::string InternalExtensionProvider::GetProviderName() const { |
| 164 return "platform_app"; |
| 165 } |
| 166 |
| 167 SettingSource InternalExtensionProvider::GetSettingSource() const { |
| 168 return SETTING_SOURCE_EXTENSION; |
| 169 } |
| 170 |
163 void InternalExtensionProvider::SetContentSettingForExtension( | 171 void InternalExtensionProvider::SetContentSettingForExtension( |
164 const extensions::Extension* extension, | 172 const extensions::Extension* extension, |
165 ContentSetting setting) { | 173 ContentSetting setting) { |
166 SetContentSettingForExtensionAndResource( | 174 SetContentSettingForExtensionAndResource( |
167 extension, ResourceIdentifier(), setting); | 175 extension, ResourceIdentifier(), setting); |
168 } | 176 } |
169 | 177 |
170 void InternalExtensionProvider::SetContentSettingForExtensionAndResource( | 178 void InternalExtensionProvider::SetContentSettingForExtensionAndResource( |
171 const extensions::Extension* extension, | 179 const extensions::Extension* extension, |
172 const ResourceIdentifier& resource, | 180 const ResourceIdentifier& resource, |
(...skipping 21 matching lines...) Expand all Loading... |
194 new base::FundamentalValue(setting)); | 202 new base::FundamentalValue(setting)); |
195 } | 203 } |
196 } | 204 } |
197 NotifyObservers(primary_pattern, | 205 NotifyObservers(primary_pattern, |
198 secondary_pattern, | 206 secondary_pattern, |
199 CONTENT_SETTINGS_TYPE_PLUGINS, | 207 CONTENT_SETTINGS_TYPE_PLUGINS, |
200 resource); | 208 resource); |
201 } | 209 } |
202 | 210 |
203 } // namespace content_settings | 211 } // namespace content_settings |
OLD | NEW |