Remove the deprecated function ExtensionService::extensions().

This function has been deprecated in favor of
ExtensionRegistry::enabled_extensions(). Some caller were
immediately calling ExtensionSet::GetByID() and so these callers have
been converted to ExtensionRegistry::GetExtensionById() instead.

Cleaning up usage of this deprecated function removes a number of
files which pull in ExtensionService that really only need to use
ExtensionRegistry.

BUG=

Review URL: https://codereview.chromium.org/709813004

Cr-Commit-Position: refs/heads/master@{#303742}
diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc
index 851986c..b2d22fb 100644
--- a/chrome/browser/memory_details.cc
+++ b/chrome/browser/memory_details.cc
@@ -32,8 +32,7 @@
 #endif
 
 #if defined(ENABLE_EXTENSIONS)
-#include "chrome/browser/extensions/extension_service.h"
-#include "extensions/browser/extension_system.h"
+#include "extensions/browser/extension_registry.h"
 #include "extensions/browser/process_manager.h"
 #include "extensions/browser/process_map.h"
 #include "extensions/browser/view_type_utils.h"
@@ -286,8 +285,8 @@
 #if defined(ENABLE_EXTENSIONS)
       content::BrowserContext* context =
           render_process_host->GetBrowserContext();
-      ExtensionService* extension_service =
-          extensions::ExtensionSystem::Get(context)->extension_service();
+      extensions::ExtensionRegistry* extension_registry =
+          extensions::ExtensionRegistry::Get(context);
       extensions::ProcessMap* extension_process_map =
           extensions::ProcessMap::Get(context);
       is_extension = extension_process_map->Contains(
@@ -317,7 +316,7 @@
         for (std::set<std::string>::iterator iter = extension_ids.begin();
              iter != extension_ids.end(); ++iter) {
           const Extension* extension =
-              extension_service->GetExtensionById(*iter, false);
+              extension_registry->enabled_extensions().GetByID(*iter);
           if (extension && !extension->is_hosted_app()) {
             process.renderer_type =
                 ProcessMemoryInformation::RENDERER_EXTENSION;
@@ -329,7 +328,7 @@
 #if defined(ENABLE_EXTENSIONS)
       if (is_extension) {
         const Extension* extension =
-            extension_service->extensions()->GetByID(url.host());
+            extension_registry->enabled_extensions().GetByID(url.host());
         if (extension) {
           base::string16 title = base::UTF8ToUTF16(extension->name());
           process.titles.push_back(title);