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/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
8 #include "chrome/common/chrome_content_client.h" | 8 #include "chrome/common/chrome_content_client.h" |
9 #include "chrome/common/extensions/api/plugins/plugins_handler.h" | 9 #include "chrome/common/extensions/api/plugins/plugins_handler.h" |
10 #include "components/content_settings/core/browser/content_settings_rule.h" | 10 #include "components/content_settings/core/browser/content_settings_rule.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 if (extensions::PluginInfo::HasPlugins(info.extension)) | 148 if (extensions::PluginInfo::HasPlugins(info.extension)) |
149 SetContentSettingForExtension(info.extension, CONTENT_SETTING_DEFAULT); | 149 SetContentSettingForExtension(info.extension, CONTENT_SETTING_DEFAULT); |
150 break; | 150 break; |
151 } | 151 } |
152 default: | 152 default: |
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(CalledOnValidThread()); |
159 RemoveAllObservers(); | 159 RemoveAllObservers(); |
160 registrar_.reset(); | 160 registrar_.reset(); |
161 } | 161 } |
162 | 162 |
163 void InternalExtensionProvider::SetContentSettingForExtension( | 163 void InternalExtensionProvider::SetContentSettingForExtension( |
164 const extensions::Extension* extension, | 164 const extensions::Extension* extension, |
165 ContentSetting setting) { | 165 ContentSetting setting) { |
166 SetContentSettingForExtensionAndResource( | 166 SetContentSettingForExtensionAndResource( |
167 extension, ResourceIdentifier(), setting); | 167 extension, ResourceIdentifier(), setting); |
168 } | 168 } |
(...skipping 25 matching lines...) Expand all Loading... |
194 new base::FundamentalValue(setting)); | 194 new base::FundamentalValue(setting)); |
195 } | 195 } |
196 } | 196 } |
197 NotifyObservers(primary_pattern, | 197 NotifyObservers(primary_pattern, |
198 secondary_pattern, | 198 secondary_pattern, |
199 CONTENT_SETTINGS_TYPE_PLUGINS, | 199 CONTENT_SETTINGS_TYPE_PLUGINS, |
200 resource); | 200 resource); |
201 } | 201 } |
202 | 202 |
203 } // namespace content_settings | 203 } // namespace content_settings |
OLD | NEW |