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

Unified Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.cc

Issue 709813004: Remove the deprecated function ExtensionService::extensions(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed thestig@'s comments. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/extensions/extension_settings_handler.cc
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
index d00eaf398903cd3c76e756ed18a279f54bc7010e..1d4b6f7de0f062e4bbce267651b9cc8c35d9fc94 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
@@ -864,12 +864,13 @@ void ExtensionSettingsHandler::AppInfoDialogClosed() {
}
void ExtensionSettingsHandler::ReloadUnpackedExtensions() {
- const ExtensionSet* extensions = extension_service_->extensions();
+ ExtensionRegistry* registry =
+ ExtensionRegistry::Get(extension_service_->profile());
std::vector<const Extension*> unpacked_extensions;
- for (ExtensionSet::const_iterator extension = extensions->begin();
- extension != extensions->end(); ++extension) {
- if (Manifest::IsUnpackedLocation((*extension)->location()))
- unpacked_extensions.push_back(extension->get());
+ for (const scoped_refptr<const extensions::Extension>& extension :
+ registry->enabled_extensions()) {
+ if (Manifest::IsUnpackedLocation(extension->location()))
+ unpacked_extensions.push_back(extension.get());
}
for (std::vector<const Extension*>::iterator iter =
@@ -998,10 +999,11 @@ void ExtensionSettingsHandler::HandleInspectMessage(
if (render_process_id == -1) {
// This message is for a lazy background page. Start the page if necessary.
+ Profile* profile = Profile::FromWebUI(web_ui());
const Extension* extension =
- extension_service_->extensions()->GetByID(extension_id);
+ ExtensionRegistry::Get(profile)->enabled_extensions().GetByID(
+ extension_id);
DCHECK(extension);
- Profile* profile = Profile::FromWebUI(web_ui());
if (incognito)
profile = profile->GetOffTheRecordProfile();
devtools_util::InspectBackgroundPage(extension, profile);
« no previous file with comments | « chrome/browser/ui/webui/extensions/extension_settings_browsertest.cc ('k') | chrome/browser/ui/webui/identity_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698