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

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

Issue 102103005: Move c/c/e/extension_set to top-level extensions/ (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years 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/chrome_notification_types.h" 7 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/content_settings/content_settings_rule.h" 8 #include "chrome/browser/content_settings/content_settings_rule.h"
9 #include "chrome/browser/extensions/extension_host.h" 9 #include "chrome/browser/extensions/extension_host.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
11 #include "chrome/common/chrome_content_client.h" 11 #include "chrome/common/chrome_content_client.h"
12 #include "chrome/common/content_settings.h" 12 #include "chrome/common/content_settings.h"
13 #include "chrome/common/content_settings_pattern.h" 13 #include "chrome/common/content_settings_pattern.h"
14 #include "chrome/common/extensions/api/plugins/plugins_handler.h" 14 #include "chrome/common/extensions/api/plugins/plugins_handler.h"
15 #include "chrome/common/extensions/extension_set.h"
16 #include "chrome/common/extensions/features/simple_feature.h" 15 #include "chrome/common/extensions/features/simple_feature.h"
17 #include "content/public/browser/browser_thread.h" 16 #include "content/public/browser/browser_thread.h"
18 #include "content/public/browser/notification_details.h" 17 #include "content/public/browser/notification_details.h"
19 #include "content/public/browser/notification_service.h" 18 #include "content/public/browser/notification_service.h"
20 #include "extensions/common/constants.h" 19 #include "extensions/common/constants.h"
21 #include "extensions/common/extension.h" 20 #include "extensions/common/extension.h"
21 #include "extensions/common/extension_set.h"
22 22
23 using extensions::UnloadedExtensionInfo; 23 using extensions::UnloadedExtensionInfo;
24 24
25 namespace content_settings { 25 namespace content_settings {
26 26
27 InternalExtensionProvider::InternalExtensionProvider( 27 InternalExtensionProvider::InternalExtensionProvider(
28 ExtensionService* extension_service) 28 ExtensionService* extension_service)
29 : registrar_(new content::NotificationRegistrar) { 29 : registrar_(new content::NotificationRegistrar) {
30 // Whitelist all extensions loaded so far. 30 // Whitelist all extensions loaded so far.
31 const ExtensionSet* extensions = extension_service->extensions(); 31 const extensions::ExtensionSet* extensions = extension_service->extensions();
32 for (ExtensionSet::const_iterator it = extensions->begin(); 32 for (extensions::ExtensionSet::const_iterator it = extensions->begin();
33 it != extensions->end(); ++it) { 33 it != extensions->end(); ++it) {
34 if (extensions::PluginInfo::HasPlugins(it->get())) 34 if (extensions::PluginInfo::HasPlugins(it->get()))
35 SetContentSettingForExtension(it->get(), CONTENT_SETTING_ALLOW); 35 SetContentSettingForExtension(it->get(), CONTENT_SETTING_ALLOW);
36 } 36 }
37 Profile* profile = extension_service->profile(); 37 Profile* profile = extension_service->profile();
38 registrar_->Add(this, chrome::NOTIFICATION_EXTENSION_HOST_CREATED, 38 registrar_->Add(this, chrome::NOTIFICATION_EXTENSION_HOST_CREATED,
39 content::Source<Profile>(profile)); 39 content::Source<Profile>(profile));
40 registrar_->Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, 40 registrar_->Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
41 content::Source<Profile>(profile)); 41 content::Source<Profile>(profile));
42 registrar_->Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, 42 registrar_->Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 Value::CreateIntegerValue(setting)); 158 Value::CreateIntegerValue(setting));
159 } 159 }
160 } 160 }
161 NotifyObservers(primary_pattern, 161 NotifyObservers(primary_pattern,
162 secondary_pattern, 162 secondary_pattern,
163 CONTENT_SETTINGS_TYPE_PLUGINS, 163 CONTENT_SETTINGS_TYPE_PLUGINS,
164 resource); 164 resource);
165 } 165 }
166 166
167 } // namespace content_settings 167 } // namespace content_settings
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/system_logs/chrome_internal_log_source.cc ('k') | chrome/browser/devtools/devtools_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698