[service-manager] Make instance_id a Token

Changes Identity's instance ID field from a free-form string to a
base::Token.

Prior to this change, the default instance ID was the empty string. Now
it's a zero-valued token. BindInterface attempts which do not specify an
instance ID implicitly connect to the instance with a zero-valued
instance ID.

All usage of GUIDs where relevant to instance isolation (namely media
CDM and various data decoder helpers) have been changed to Tokens.

Bug: 895591
Change-Id: Id14c19402f0fd924a2f467bee40860293a5abe16
Reviewed-on: https://chromium-review.googlesource.com/c/1327526
Commit-Queue: Ken Rockot <[email protected]>
Reviewed-by: Oksana Zhuravlova <[email protected]>
Reviewed-by: Tom Sepez <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Reviewed-by: Xiaohan Wang <[email protected]>
Reviewed-by: John Abd-El-Malek <[email protected]>
Cr-Commit-Position: refs/heads/master@{#607082}
diff --git a/content/browser/browser_child_process_host_impl.cc b/content/browser/browser_child_process_host_impl.cc
index 04a164b..b078387f 100644
--- a/content/browser/browser_child_process_host_impl.cc
+++ b/content/browser/browser_child_process_host_impl.cc
@@ -25,6 +25,7 @@
 #include "base/synchronization/waitable_event.h"
 #include "base/task/post_task.h"
 #include "base/threading/thread_task_runner_handle.h"
+#include "base/token.h"
 #include "build/build_config.h"
 #include "components/tracing/common/trace_startup_config.h"
 #include "components/tracing/common/tracing_switches.h"
@@ -168,9 +169,9 @@
 
   if (!service_name.empty()) {
     DCHECK_CURRENTLY_ON(BrowserThread::IO);
-    service_manager::Identity child_identity(
-        service_name, base::nullopt /* instance_group */,
-        base::StringPrintf("%d", data_.id));
+    service_manager::Identity child_identity(service_name,
+                                             base::nullopt /* instance_group */,
+                                             base::Token::CreateRandom());
     child_connection_.reset(
         new ChildConnection(child_identity, &mojo_invitation_,
                             ServiceManagerContext::GetConnectorForIOThread(),