diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-20 13:40:20 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-22 12:41:23 +0000 |
commit | 7961cea6d1041e3e454dae6a1da660b453efd238 (patch) | |
tree | c0eeb4a9ff9ba32986289c1653d9608e53ccb444 /chromium/chrome/browser/ui/webui/sync_file_system_internals/extension_statuses_handler.cc | |
parent | b7034d0803538058e5c9d904ef03cf5eab34f6ef (diff) |
BASELINE: Update Chromium to 78.0.3904.130
Change-Id: If185e0c0061b3437531c97c9c8c78f239352a68b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/chrome/browser/ui/webui/sync_file_system_internals/extension_statuses_handler.cc')
-rw-r--r-- | chromium/chrome/browser/ui/webui/sync_file_system_internals/extension_statuses_handler.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chromium/chrome/browser/ui/webui/sync_file_system_internals/extension_statuses_handler.cc b/chromium/chrome/browser/ui/webui/sync_file_system_internals/extension_statuses_handler.cc index cf5c1ba9541..d21278ee6f6 100644 --- a/chromium/chrome/browser/ui/webui/sync_file_system_internals/extension_statuses_handler.cc +++ b/chromium/chrome/browser/ui/webui/sync_file_system_internals/extension_statuses_handler.cc @@ -18,6 +18,7 @@ #include "chrome/browser/sync_file_system/sync_file_system_service_factory.h" #include "content/public/browser/web_ui.h" #include "content/public/browser/web_ui_data_source.h" +#include "extensions/browser/extension_registry.h" #include "extensions/browser/extension_system.h" #include "extensions/common/extension.h" @@ -28,6 +29,10 @@ namespace syncfs_internals { namespace { +// TODO(crbug.com/989631): Break this and GetExtensionStatusesAsDictionary +// into a separate library, so the callbacks can use weak pointers to the +// calling instances. This will also break the dependency between +// ExtensionStatusesHandler and FileMetadataHandler. void ConvertExtensionStatusToDictionary( const base::WeakPtr<extensions::ExtensionService>& extension_service, const base::Callback<void(const base::ListValue&)>& callback, @@ -37,13 +42,17 @@ void ConvertExtensionStatusToDictionary( return; } + extensions::ExtensionRegistry* extension_registry = + extensions::ExtensionRegistry::Get(extension_service->profile()); + base::ListValue list; for (auto itr = status_map.begin(); itr != status_map.end(); ++itr) { std::string extension_id = itr->first.HostNoBrackets(); // Join with human readable extension name. const extensions::Extension* extension = - extension_service->GetExtensionById(extension_id, true); + extension_registry->GetExtensionById( + extension_id, extensions::ExtensionRegistry::COMPATIBILITY); if (!extension) continue; |