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

Unified Diff: chrome/browser/extensions/api/messaging/message_service.cc

Issue 709813004: Remove the deprecated function ExtensionService::extensions(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/extensions/api/messaging/message_service.cc
diff --git a/chrome/browser/extensions/api/messaging/message_service.cc b/chrome/browser/extensions/api/messaging/message_service.cc
index 68fa08626c5da3eff0e0bf84a630f88e16f384fd..0792f1a3f070f810324043afd9e695ae591ea76d 100644
--- a/chrome/browser/extensions/api/messaging/message_service.cc
+++ b/chrome/browser/extensions/api/messaging/message_service.cc
@@ -31,6 +31,7 @@
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
#include "extensions/browser/extension_host.h"
+#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/extensions_browser_client.h"
#include "extensions/browser/lazy_background_task_queue.h"
@@ -244,10 +245,9 @@ void MessageService::OpenChannelToExtension(
return;
BrowserContext* context = source->GetBrowserContext();
- ExtensionSystem* extension_system = ExtensionSystem::Get(context);
- DCHECK(extension_system);
- const Extension* target_extension = extension_system->extension_service()->
- extensions()->GetByID(target_extension_id);
+ ExtensionRegistry* registry = ExtensionRegistry::Get(context);
+ const Extension* target_extension = registry->GetExtensionById(
not at google - send to devlin 2014/11/11 20:20:08 Ditto.
Reilly Grant (use Gerrit) 2014/11/11 20:55:31 Done.
+ target_extension_id, ExtensionRegistry::ENABLED);
if (!target_extension) {
DispatchOnDisconnect(
source, receiver_port_id, kReceivingEndDoesntExistError);
@@ -725,8 +725,8 @@ void MessageService::GotChannelID(scoped_ptr<OpenChannelParams> params,
BrowserContext* context = params->source->GetBrowserContext();
const Extension* target_extension =
- ExtensionSystem::Get(context)->extension_service()->extensions()->GetByID(
- params->target_extension_id);
+ ExtensionRegistry::Get(context)->GetExtensionById(
not at google - send to devlin 2014/11/11 20:20:08 Ditto.
Reilly Grant (use Gerrit) 2014/11/11 20:55:31 Done.
+ params->target_extension_id, ExtensionRegistry::ENABLED);
if (!target_extension) {
pending_tls_channel_id_channels_.erase(channel_id);
DispatchOnDisconnect(

Powered by Google App Engine
This is Rietveld 408576698