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

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

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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_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_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 11 matching lines...) Expand all
22 namespace content_settings { 22 namespace content_settings {
23 23
24 InternalExtensionProvider::InternalExtensionProvider( 24 InternalExtensionProvider::InternalExtensionProvider(
25 ExtensionService* extension_service) 25 ExtensionService* extension_service)
26 : registrar_(new content::NotificationRegistrar) { 26 : registrar_(new content::NotificationRegistrar) {
27 // Whitelist all extensions loaded so far. 27 // Whitelist all extensions loaded so far.
28 const ExtensionSet* extensions = extension_service->extensions(); 28 const ExtensionSet* extensions = extension_service->extensions();
29 for (ExtensionSet::const_iterator it = extensions->begin(); 29 for (ExtensionSet::const_iterator it = extensions->begin();
30 it != extensions->end(); ++it) { 30 it != extensions->end(); ++it) {
31 if ((*it)->plugins().size() > 0) 31 if ((*it)->plugins().size() > 0)
32 SetContentSettingForExtension(*it, CONTENT_SETTING_ALLOW); 32 SetContentSettingForExtension(*it.get(), CONTENT_SETTING_ALLOW);
33 } 33 }
34 Profile* profile = extension_service->profile(); 34 Profile* profile = extension_service->profile();
35 registrar_->Add(this, chrome::NOTIFICATION_EXTENSION_HOST_CREATED, 35 registrar_->Add(this, chrome::NOTIFICATION_EXTENSION_HOST_CREATED,
36 content::Source<Profile>(profile)); 36 content::Source<Profile>(profile));
37 registrar_->Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, 37 registrar_->Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
38 content::Source<Profile>(profile)); 38 content::Source<Profile>(profile));
39 registrar_->Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, 39 registrar_->Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
40 content::Source<Profile>(profile)); 40 content::Source<Profile>(profile));
41 } 41 }
42 42
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 Value::CreateIntegerValue(setting)); 125 Value::CreateIntegerValue(setting));
126 } 126 }
127 } 127 }
128 NotifyObservers(primary_pattern, 128 NotifyObservers(primary_pattern,
129 secondary_pattern, 129 secondary_pattern,
130 CONTENT_SETTINGS_TYPE_PLUGINS, 130 CONTENT_SETTINGS_TYPE_PLUGINS,
131 ResourceIdentifier("")); 131 ResourceIdentifier(""));
132 } 132 }
133 133
134 } // namespace content_settings 134 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698