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

Unified Diff: chrome/browser/extensions/api/api_resource_event_notifier.cc

Issue 10440097: Move socket API from experimental to dev channel and remove some dead code (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update Created 8 years, 5 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/api_resource_event_notifier.cc
diff --git a/chrome/browser/extensions/api/api_resource_event_notifier.cc b/chrome/browser/extensions/api/api_resource_event_notifier.cc
index e0b31bb7c03459ef316e350eb979d91f2f0083d1..9fa60f7c64959aa6452b4935e4ff54cfae1dbf1d 100644
--- a/chrome/browser/extensions/api/api_resource_event_notifier.cc
+++ b/chrome/browser/extensions/api/api_resource_event_notifier.cc
@@ -14,7 +14,6 @@
using content::BrowserThread;
namespace events {
-const char kExperimentalSocketOnEvent[] = "experimental.socket.onEvent";
const char kExperimentalUsbOnEvent[] = "experimental.usb.onEvent";
};
@@ -50,38 +49,6 @@ ApiResourceEventNotifier::ApiResourceEventNotifier(
src_url_(src_url) {
}
-void ApiResourceEventNotifier::OnConnectComplete(int result_code) {
- SendEventWithResultCode(events::kExperimentalSocketOnEvent,
- API_RESOURCE_EVENT_CONNECT_COMPLETE, result_code);
-}
-
-void ApiResourceEventNotifier::OnDataRead(int result_code,
- base::ListValue* data,
- const std::string& address,
- int port) {
- // Do we have a destination for this event? There will be one if a source id
- // was injected by the request handler for the resource's create method in
- // schema_generated_bindings.js, which will in turn be the case if the caller
- // of the create method provided an onEvent closure.
- if (src_id_ < 0) {
- delete data;
- return;
- }
-
- DictionaryValue* event = CreateApiResourceEvent(
- API_RESOURCE_EVENT_DATA_READ);
- event->SetInteger(kResultCodeKey, result_code);
- event->Set(kDataKey, data);
- event->SetString(kAddressKey, address);
- event->SetInteger(kPortKey, port);
- DispatchEvent(events::kExperimentalSocketOnEvent, event);
-}
-
-void ApiResourceEventNotifier::OnWriteComplete(int result_code) {
- SendEventWithResultCode(events::kExperimentalSocketOnEvent,
- API_RESOURCE_EVENT_WRITE_COMPLETE, result_code);
-}
-
void ApiResourceEventNotifier::OnTransferComplete(UsbTransferStatus status,
const std::string& error,
base::BinaryValue* data) {
@@ -105,12 +72,6 @@ void ApiResourceEventNotifier::OnTransferComplete(UsbTransferStatus status,
std::string ApiResourceEventNotifier::ApiResourceEventTypeToString(
ApiResourceEventType event_type) {
switch (event_type) {
- case API_RESOURCE_EVENT_CONNECT_COMPLETE:
- return kEventTypeConnectComplete;
- case API_RESOURCE_EVENT_DATA_READ:
- return kEventTypeDataRead;
- case API_RESOURCE_EVENT_WRITE_COMPLETE:
- return kEventTypeWriteComplete;
case API_RESOURCE_EVENT_TRANSFER_COMPLETE:
return kEventTypeTransferComplete;
}
« no previous file with comments | « chrome/browser/extensions/api/api_resource_event_notifier.h ('k') | chrome/browser/extensions/api/socket/socket_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698