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

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

Issue 10824030: Move ExtensionHost into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for cq Created 8 years, 4 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_platform_app_provider .h" 5 #include "chrome/browser/content_settings/content_settings_platform_app_provider .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_host.h" 8 #include "chrome/browser/extensions/extension_host.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/common/chrome_notification_types.h" 10 #include "chrome/common/chrome_notification_types.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 void PlatformAppProvider::ClearAllContentSettingsRules( 62 void PlatformAppProvider::ClearAllContentSettingsRules(
63 ContentSettingsType content_type) {} 63 ContentSettingsType content_type) {}
64 64
65 void PlatformAppProvider::Observe(int type, 65 void PlatformAppProvider::Observe(int type,
66 const content::NotificationSource& source, 66 const content::NotificationSource& source,
67 const content::NotificationDetails& details) { 67 const content::NotificationDetails& details) {
68 switch (type) { 68 switch (type) {
69 case chrome::NOTIFICATION_EXTENSION_HOST_CREATED: { 69 case chrome::NOTIFICATION_EXTENSION_HOST_CREATED: {
70 const ExtensionHost* host = 70 const extensions::ExtensionHost* host =
71 content::Details<ExtensionHost>(details).ptr(); 71 content::Details<extensions::ExtensionHost>(details).ptr();
72 if (host->extension()->is_platform_app()) 72 if (host->extension()->is_platform_app())
73 SetContentSettingForExtension(host->extension(), CONTENT_SETTING_BLOCK); 73 SetContentSettingForExtension(host->extension(), CONTENT_SETTING_BLOCK);
74 break; 74 break;
75 } 75 }
76 case chrome::NOTIFICATION_EXTENSION_LOADED: { 76 case chrome::NOTIFICATION_EXTENSION_LOADED: {
77 const extensions::Extension* extension = 77 const extensions::Extension* extension =
78 content::Details<extensions::Extension>(details).ptr(); 78 content::Details<extensions::Extension>(details).ptr();
79 if (extension->plugins().size() > 0) 79 if (extension->plugins().size() > 0)
80 SetContentSettingForExtension(extension, CONTENT_SETTING_ALLOW); 80 SetContentSettingForExtension(extension, CONTENT_SETTING_ALLOW);
81 break; 81 break;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 Value::CreateIntegerValue(setting)); 124 Value::CreateIntegerValue(setting));
125 } 125 }
126 } 126 }
127 NotifyObservers(primary_pattern, 127 NotifyObservers(primary_pattern,
128 secondary_pattern, 128 secondary_pattern,
129 CONTENT_SETTINGS_TYPE_PLUGINS, 129 CONTENT_SETTINGS_TYPE_PLUGINS,
130 ResourceIdentifier("")); 130 ResourceIdentifier(""));
131 } 131 }
132 132
133 } // namespace content_settings 133 } // namespace content_settings
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/file_handler_util.cc ('k') | chrome/browser/extensions/alert_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698