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

Unified Diff: chrome/browser/extensions/api/developer_private/developer_private_api.cc

Issue 238633009: cleanup: Use EventRouter instead of ExtensionSystem::Get->event_router() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile error for chromeos build. Created 6 years, 8 months 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/developer_private/developer_private_api.cc
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
index 22954c2dcdfed1c73c8e5a908845135c78f7832c..3c79ed8fe10d0be8192f4477f54cb9e69f169b40 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
@@ -259,7 +259,7 @@ void DeveloperPrivateEventRouter::Observe(
event_name = developer_private::OnItemStateChanged::kEventName;
scoped_ptr<Event> event(new Event(event_name, args.Pass()));
- ExtensionSystem::Get(profile)->event_router()->BroadcastEvent(event.Pass());
+ EventRouter::Get(profile)->BroadcastEvent(event.Pass());
}
void DeveloperPrivateEventRouter::OnErrorAdded(const ExtensionError* error) {
@@ -276,9 +276,8 @@ void DeveloperPrivateEventRouter::OnErrorAdded(const ExtensionError* error) {
scoped_ptr<base::ListValue> args(new base::ListValue);
args->Append(event_data.ToValue().release());
- ExtensionSystem::Get(profile_)->event_router()->BroadcastEvent(
- scoped_ptr<Event>(new Event(
- developer_private::OnItemStateChanged::kEventName, args.Pass())));
+ EventRouter::Get(profile_)->BroadcastEvent(scoped_ptr<Event>(new Event(
+ developer_private::OnItemStateChanged::kEventName, args.Pass())));
}
void DeveloperPrivateAPI::SetLastUnpackedDirectory(const base::FilePath& path) {
@@ -286,7 +285,7 @@ void DeveloperPrivateAPI::SetLastUnpackedDirectory(const base::FilePath& path) {
}
void DeveloperPrivateAPI::RegisterNotifications() {
- ExtensionSystem::Get(profile_)->event_router()->RegisterObserver(
+ EventRouter::Get(profile_)->RegisterObserver(
this, developer_private::OnItemStateChanged::kEventName);
}
@@ -306,8 +305,8 @@ void DeveloperPrivateAPI::OnListenerAdded(
void DeveloperPrivateAPI::OnListenerRemoved(
const EventListenerInfo& details) {
- if (!ExtensionSystem::Get(profile_)->event_router()->HasEventListener(
- developer_private::OnItemStateChanged::kEventName)) {
+ if (!EventRouter::Get(profile_)->HasEventListener(
+ developer_private::OnItemStateChanged::kEventName)) {
developer_private_event_router_.reset(NULL);
} else {
developer_private_event_router_->RemoveExtensionId(details.extension_id);
« no previous file with comments | « chrome/browser/extensions/api/debugger/debugger_api.cc ('k') | chrome/browser/extensions/api/dial/dial_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698