Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: chrome/browser/content_settings/content_settings_internal_extension_provider.cc

Issue 596613002: Remove content dependencies from content settings providers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: shutdown fix Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698