Index: extensions/browser/api/networking_private/networking_private_event_router_chromeos.cc |
diff --git a/extensions/browser/api/networking_private/networking_private_event_router_chromeos.cc b/extensions/browser/api/networking_private/networking_private_event_router_chromeos.cc |
index 2dabfdb7f73d5e7c143c23a4d948f404b7db1869..dbe8073974298c8154c6f06187fd0386dfd74404 100644 |
--- a/extensions/browser/api/networking_private/networking_private_event_router_chromeos.cc |
+++ b/extensions/browser/api/networking_private/networking_private_event_router_chromeos.cc |
@@ -79,15 +79,13 @@ NetworkingPrivateEventRouterImpl::NetworkingPrivateEventRouterImpl( |
EventRouter* event_router = EventRouter::Get(context_); |
if (event_router) { |
event_router->RegisterObserver( |
- this, core_api::networking_private::OnNetworksChanged::kEventName); |
+ this, api::networking_private::OnNetworksChanged::kEventName); |
event_router->RegisterObserver( |
- this, core_api::networking_private::OnNetworkListChanged::kEventName); |
+ this, api::networking_private::OnNetworkListChanged::kEventName); |
event_router->RegisterObserver( |
- this, |
- core_api::networking_private::OnDeviceStateListChanged::kEventName); |
+ this, api::networking_private::OnDeviceStateListChanged::kEventName); |
event_router->RegisterObserver( |
- this, |
- core_api::networking_private::OnPortalDetectionCompleted::kEventName); |
+ this, api::networking_private::OnPortalDetectionCompleted::kEventName); |
StartOrStopListeningForNetworkChanges(); |
} |
} |
@@ -128,13 +126,13 @@ void NetworkingPrivateEventRouterImpl::StartOrStopListeningForNetworkChanges() { |
EventRouter* event_router = EventRouter::Get(context_); |
bool should_listen = |
event_router->HasEventListener( |
- core_api::networking_private::OnNetworksChanged::kEventName) || |
+ api::networking_private::OnNetworksChanged::kEventName) || |
event_router->HasEventListener( |
- core_api::networking_private::OnNetworkListChanged::kEventName) || |
+ api::networking_private::OnNetworkListChanged::kEventName) || |
event_router->HasEventListener( |
- core_api::networking_private::OnDeviceStateListChanged::kEventName) || |
+ api::networking_private::OnDeviceStateListChanged::kEventName) || |
event_router->HasEventListener( |
- core_api::networking_private::OnPortalDetectionCompleted::kEventName); |
+ api::networking_private::OnPortalDetectionCompleted::kEventName); |
if (should_listen && !listening_) { |
NetworkHandler::Get()->network_state_handler()->AddObserver(this, |
@@ -153,7 +151,7 @@ void NetworkingPrivateEventRouterImpl::StartOrStopListeningForNetworkChanges() { |
void NetworkingPrivateEventRouterImpl::NetworkListChanged() { |
EventRouter* event_router = EventRouter::Get(context_); |
if (!event_router->HasEventListener( |
- core_api::networking_private::OnNetworkListChanged::kEventName)) { |
+ api::networking_private::OnNetworkListChanged::kEventName)) { |
return; |
} |
@@ -168,27 +166,26 @@ void NetworkingPrivateEventRouterImpl::NetworkListChanged() { |
} |
scoped_ptr<base::ListValue> args( |
- core_api::networking_private::OnNetworkListChanged::Create(changes)); |
- scoped_ptr<Event> extension_event( |
- new Event(events::NETWORKING_PRIVATE_ON_NETWORK_LIST_CHANGED, |
- core_api::networking_private::OnNetworkListChanged::kEventName, |
- args.Pass())); |
+ api::networking_private::OnNetworkListChanged::Create(changes)); |
+ scoped_ptr<Event> extension_event(new Event( |
+ events::NETWORKING_PRIVATE_ON_NETWORK_LIST_CHANGED, |
+ api::networking_private::OnNetworkListChanged::kEventName, args.Pass())); |
event_router->BroadcastEvent(extension_event.Pass()); |
} |
void NetworkingPrivateEventRouterImpl::DeviceListChanged() { |
EventRouter* event_router = EventRouter::Get(context_); |
if (!event_router->HasEventListener( |
- core_api::networking_private::OnDeviceStateListChanged::kEventName)) { |
+ api::networking_private::OnDeviceStateListChanged::kEventName)) { |
return; |
} |
scoped_ptr<base::ListValue> args( |
- core_api::networking_private::OnDeviceStateListChanged::Create()); |
- scoped_ptr<Event> extension_event(new Event( |
- events::NETWORKING_PRIVATE_ON_DEVICE_STATE_LIST_CHANGED, |
- core_api::networking_private::OnDeviceStateListChanged::kEventName, |
- args.Pass())); |
+ api::networking_private::OnDeviceStateListChanged::Create()); |
+ scoped_ptr<Event> extension_event( |
+ new Event(events::NETWORKING_PRIVATE_ON_DEVICE_STATE_LIST_CHANGED, |
+ api::networking_private::OnDeviceStateListChanged::kEventName, |
+ args.Pass())); |
event_router->BroadcastEvent(extension_event.Pass()); |
} |
@@ -196,19 +193,18 @@ void NetworkingPrivateEventRouterImpl::NetworkPropertiesUpdated( |
const NetworkState* network) { |
EventRouter* event_router = EventRouter::Get(context_); |
if (!event_router->HasEventListener( |
- core_api::networking_private::OnNetworksChanged::kEventName)) { |
+ api::networking_private::OnNetworksChanged::kEventName)) { |
NET_LOG_EVENT("NetworkingPrivate.NetworkPropertiesUpdated: No Listeners", |
network->path()); |
return; |
} |
NET_LOG_EVENT("NetworkingPrivate.NetworkPropertiesUpdated", network->path()); |
scoped_ptr<base::ListValue> args( |
- core_api::networking_private::OnNetworksChanged::Create( |
+ api::networking_private::OnNetworksChanged::Create( |
std::vector<std::string>(1, network->guid()))); |
- scoped_ptr<Event> extension_event( |
- new Event(events::NETWORKING_PRIVATE_ON_NETWORKS_CHANGED, |
- core_api::networking_private::OnNetworksChanged::kEventName, |
- args.Pass())); |
+ scoped_ptr<Event> extension_event(new Event( |
+ events::NETWORKING_PRIVATE_ON_NETWORKS_CHANGED, |
+ api::networking_private::OnNetworksChanged::kEventName, args.Pass())); |
event_router->BroadcastEvent(extension_event.Pass()); |
} |
@@ -234,32 +230,30 @@ void NetworkingPrivateEventRouterImpl::OnPortalDetectionCompleted( |
EventRouter* event_router = EventRouter::Get(context_); |
if (!event_router->HasEventListener( |
- core_api::networking_private::OnPortalDetectionCompleted:: |
- kEventName)) { |
+ api::networking_private::OnPortalDetectionCompleted::kEventName)) { |
NET_LOG_EVENT("NetworkingPrivate.OnPortalDetectionCompleted: No Listeners", |
path); |
return; |
} |
NET_LOG_EVENT("NetworkingPrivate.OnPortalDetectionCompleted", path); |
- core_api::networking_private::CaptivePortalStatus status = |
- core_api::networking_private::CAPTIVE_PORTAL_STATUS_UNKNOWN; |
+ api::networking_private::CaptivePortalStatus status = |
+ api::networking_private::CAPTIVE_PORTAL_STATUS_UNKNOWN; |
switch (state.status) { |
case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_UNKNOWN: |
- status = core_api::networking_private::CAPTIVE_PORTAL_STATUS_UNKNOWN; |
+ status = api::networking_private::CAPTIVE_PORTAL_STATUS_UNKNOWN; |
break; |
case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_OFFLINE: |
- status = core_api::networking_private::CAPTIVE_PORTAL_STATUS_OFFLINE; |
+ status = api::networking_private::CAPTIVE_PORTAL_STATUS_OFFLINE; |
break; |
case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE: |
- status = core_api::networking_private::CAPTIVE_PORTAL_STATUS_ONLINE; |
+ status = api::networking_private::CAPTIVE_PORTAL_STATUS_ONLINE; |
break; |
case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_PORTAL: |
- status = core_api::networking_private::CAPTIVE_PORTAL_STATUS_PORTAL; |
+ status = api::networking_private::CAPTIVE_PORTAL_STATUS_PORTAL; |
break; |
case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_PROXY_AUTH_REQUIRED: |
- status = |
- core_api::networking_private::CAPTIVE_PORTAL_STATUS_PROXYAUTHREQUIRED; |
+ status = api::networking_private::CAPTIVE_PORTAL_STATUS_PROXYAUTHREQUIRED; |
break; |
default: |
NOTREACHED(); |
@@ -267,12 +261,12 @@ void NetworkingPrivateEventRouterImpl::OnPortalDetectionCompleted( |
} |
scoped_ptr<base::ListValue> args( |
- core_api::networking_private::OnPortalDetectionCompleted::Create(path, |
- status)); |
- scoped_ptr<Event> extension_event(new Event( |
- events::NETWORKING_PRIVATE_ON_PORTAL_DETECTION_COMPLETED, |
- core_api::networking_private::OnPortalDetectionCompleted::kEventName, |
- args.Pass())); |
+ api::networking_private::OnPortalDetectionCompleted::Create(path, |
+ status)); |
+ scoped_ptr<Event> extension_event( |
+ new Event(events::NETWORKING_PRIVATE_ON_PORTAL_DETECTION_COMPLETED, |
+ api::networking_private::OnPortalDetectionCompleted::kEventName, |
+ args.Pass())); |
event_router->BroadcastEvent(extension_event.Pass()); |
} |