| 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" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 char random_bytes[16]; | 165 char random_bytes[16]; |
| 166 #if defined(OS_NACL) | 166 #if defined(OS_NACL) |
| 167 // Not secure. For NaCl only! | 167 // Not secure. For NaCl only! |
| 168 base::RandBytes(random_bytes, 16); | 168 base::RandBytes(random_bytes, 16); |
| 169 #else | 169 #else |
| 170 crypto::RandBytes(random_bytes, 16); | 170 crypto::RandBytes(random_bytes, 16); |
| 171 #endif | 171 #endif |
| 172 return base::HexEncode(random_bytes, 16); | 172 return base::HexEncode(random_bytes, 16); |
| 173 } | 173 } |
| 174 | 174 |
| 175 MojoResult SetProperty(MojoPropertyType type, const void* value) { |
| 176 CHECK(internal::g_core); |
| 177 return internal::g_core->SetProperty(type, value); |
| 178 } |
| 179 |
| 175 } // namespace edk | 180 } // namespace edk |
| 176 } // namespace mojo | 181 } // namespace mojo |
| OLD | NEW |