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

Unified Diff: extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc

Issue 1201063002: Set up the infrastructure for Extension event metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaaaaase Created 5 years, 6 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: extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc
diff --git a/extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc b/extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc
index 662b9b7ca678956bfae6d882e67d5e9b12baa6cd..03f0be87a5910ca040290318a4487ce6963fcca1 100644
--- a/extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc
+++ b/extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc
@@ -194,8 +194,8 @@ void BluetoothSocketEventDispatcher::ReceiveCallback(
receive_info.data.assign(io_buffer->data(), io_buffer->data() + bytes_read);
scoped_ptr<base::ListValue> args =
bluetooth_socket::OnReceive::Create(receive_info);
- scoped_ptr<Event> event(
- new Event(bluetooth_socket::OnReceive::kEventName, args.Pass()));
+ scoped_ptr<Event> event(new Event(
+ events::UNKNOWN, bluetooth_socket::OnReceive::kEventName, args.Pass()));
PostEvent(params, event.Pass());
// Post a task to delay the read until the socket is available, as
@@ -229,7 +229,8 @@ void BluetoothSocketEventDispatcher::ReceiveErrorCallback(
scoped_ptr<base::ListValue> args =
bluetooth_socket::OnReceiveError::Create(receive_error_info);
scoped_ptr<Event> event(
- new Event(bluetooth_socket::OnReceiveError::kEventName, args.Pass()));
+ new Event(events::UNKNOWN, bluetooth_socket::OnReceiveError::kEventName,
+ args.Pass()));
PostEvent(params, event.Pass());
// Since we got an error, the socket is now "paused" until the application
@@ -289,8 +290,8 @@ void BluetoothSocketEventDispatcher::AcceptCallback(
accept_info.client_socket_id = client_socket_id;
scoped_ptr<base::ListValue> args =
bluetooth_socket::OnAccept::Create(accept_info);
- scoped_ptr<Event> event(
- new Event(bluetooth_socket::OnAccept::kEventName, args.Pass()));
+ scoped_ptr<Event> event(new Event(
+ events::UNKNOWN, bluetooth_socket::OnAccept::kEventName, args.Pass()));
PostEvent(params, event.Pass());
// Post a task to delay the accept until the socket is available, as
@@ -323,8 +324,9 @@ void BluetoothSocketEventDispatcher::AcceptErrorCallback(
accept_error_info.error = MapAcceptErrorReason(error_reason);
scoped_ptr<base::ListValue> args =
bluetooth_socket::OnAcceptError::Create(accept_error_info);
- scoped_ptr<Event> event(
- new Event(bluetooth_socket::OnAcceptError::kEventName, args.Pass()));
+ scoped_ptr<Event> event(new Event(events::UNKNOWN,
+ bluetooth_socket::OnAcceptError::kEventName,
+ args.Pass()));
PostEvent(params, event.Pass());
// Since we got an error, the socket is now "paused" until the application

Powered by Google App Engine
This is Rietveld 408576698