| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/edk/embedder/embedder.h" | 5 #include "mojo/edk/embedder/embedder.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
| 14 #include "base/task_runner.h" | 14 #include "base/task_runner.h" |
| 15 #include "base/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
| 16 #include "crypto/random.h" | 16 #include "crypto/random.h" |
| 17 #include "mojo/edk/embedder/embedder_internal.h" | 17 #include "mojo/edk/embedder/embedder_internal.h" |
| 18 #include "mojo/edk/embedder/platform_channel_pair.h" | 18 #include "mojo/edk/embedder/platform_channel_pair.h" |
| 19 #include "mojo/edk/embedder/process_delegate.h" | 19 #include "mojo/edk/embedder/process_delegate.h" |
| 20 #include "mojo/edk/system/core.h" | 20 #include "mojo/edk/system/core.h" |
| 21 | 21 |
| 22 namespace mojo { | 22 namespace mojo { |
| 23 namespace edk { | 23 namespace edk { |
| 24 | 24 |
| 25 class Core; | 25 class Core; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 } | 143 } |
| 144 | 144 |
| 145 std::string GenerateRandomToken() { | 145 std::string GenerateRandomToken() { |
| 146 char random_bytes[16]; | 146 char random_bytes[16]; |
| 147 crypto::RandBytes(random_bytes, 16); | 147 crypto::RandBytes(random_bytes, 16); |
| 148 return base::HexEncode(random_bytes, 16); | 148 return base::HexEncode(random_bytes, 16); |
| 149 } | 149 } |
| 150 | 150 |
| 151 } // namespace edk | 151 } // namespace edk |
| 152 } // namespace mojo | 152 } // namespace mojo |
| OLD | NEW |