Index: util/misc/uuid.cc |
diff --git a/util/misc/uuid.cc b/util/misc/uuid.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8785b3315468aee0199cbfdb60dff76ff868bb39 |
--- /dev/null |
+++ b/util/misc/uuid.cc |
@@ -0,0 +1,30 @@ |
+// Copyright 2014 The Crashpad Authors. All rights reserved. |
+// |
+// Licensed under the Apache License, Version 2.0 (the "License"); |
+// you may not use this file except in compliance with the License. |
+// You may obtain a copy of the License at |
+// |
+// http://www.apache.org/licenses/LICENSE-2.0 |
+// |
+// Unless required by applicable law or agreed to in writing, software |
+// distributed under the License is distributed on an "AS IS" BASIS, |
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
+// See the License for the specific language governing permissions and |
+// limitations under the License. |
+ |
+#include "util/misc/uuid.h" |
+ |
+#include <string.h> |
+ |
+#include "base/sys_byteorder.h" |
+ |
+namespace crashpad { |
+ |
+void UUID::InitializeFromBytes(const uint8_t* bytes) { |
+ memcpy(this, bytes, sizeof(*this)); |
+ data_1 = base::HostToNet32(data_1); |
+ data_2 = base::HostToNet16(data_2); |
+ data_3 = base::HostToNet16(data_3); |
+}; |
+ |
+} // namespace crashpad |