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

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

Issue 545413002: Detach the dependency from host_content_settings_map to extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ProviderType Created 6 years, 3 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/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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698