Rewrite the CopresenceSocket API.
We've changed the concept of the sockets API to be more of an *endpoints* API
on Android. This CL matches the change. We now only have endpoints that the
API can work with. To make a connection between devices, an app needs to create
a local endpoint, and then connect it to a remote endpoint. The connection can
happen via a 'connect' call (not implemented yet) or via accepting connections.

Currently we only support one local endpoint and have matched the wire protocol
to match Android. Keep in mind this is still completely experimental code with
exactly one user, so things will probably change again quite drastically. This
is why I have *only* implemented the functions we currently need and absolutely
nothing else.

Reviews requested,
/* -  xiyuan@
extensions/* - kalman@
components/* - erikwright@ (we're mostly just renaming an existing component)
extension_function_histogram_value.h - isherman@ (deleting old enums)

[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
BUG=418617

Review URL: https://codereview.chromium.org/771683004

Cr-Commit-Position: refs/heads/master@{#306863}
diff --git a/extensions/browser/extension_function_histogram_value.h b/extensions/browser/extension_function_histogram_value.h
index 7bc8e0d..7c4c7b79 100644
--- a/extensions/browser/extension_function_histogram_value.h
+++ b/extensions/browser/extension_function_histogram_value.h
@@ -959,10 +959,10 @@
   HOTWORDPRIVATE_SETHOTWORDALWAYSONSEARCHENABLED,
   WEBVIEWINTERNAL_LOADDATAWITHBASEURL,
   GUESTVIEWINTERNAL_DESTROYGUEST,
-  COPRESENCESOCKET_CREATEPEER,
-  COPRESENCESOCKET_DESTROYPEER,
-  COPRESENCESOCKET_SEND,
-  COPRESENCESOCKET_DISCONNECT,
+  DELETED_COPRESENCESOCKET_CREATEPEER,
+  DELETED_COPRESENCESOCKET_DESTROYPEER,
+  DELETED_COPRESENCESOCKET_SEND,
+  DELETED_COPRESENCESOCKET_DISCONNECT,
   BOOKMARKMANAGERPRIVATE_SETVERSION,
   FILESYSTEMPROVIDER_NOTIFY,
   USB_GETUSERSELECTEDDEVICES,
@@ -995,6 +995,9 @@
   AUTOTESTPRIVATE_SETNATURALSCROLL,
   AUTOTESTPRIVATE_SETMOUSESENSITIVITY,
   AUTOTESTPRIVATE_SETPRIMARYBUTTONRIGHT,
+  COPRESENCEENDPOINTS_CREATELOCALENDPOINT,
+  COPRESENCEENDPOINTS_DESTROYLOCALENDPOINT,
+  COPRESENCEENDPOINTS_SEND,
   // Last entry: Add new entries above and ensure to update
   // tools/metrics/histograms/histograms.xml.
   ENUM_BOUNDARY