• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1diff --git base/BUILD.gn base/BUILD.gn
2index dbef16bc35790..4343b1759c757 100644
3--- base/BUILD.gn
4+++ base/BUILD.gn
5@@ -36,6 +36,7 @@ import("//build/nocompile.gni")
6 import("//build/rust/mixed_component.gni")
7 import("//build/timestamp.gni")
8 import("//build_overrides/build.gni")
9+import("//cef/libcef/features/features.gni")
10 import("//testing/libfuzzer/fuzzer_test.gni")
11 import("//testing/test.gni")
12 import("//third_party/icu/config.gni")
13@@ -1867,7 +1868,11 @@ mixed_component("base") {
14     "hash/md5_constexpr_internal.h",
15     "hash/sha1.h",
16   ]
17-  if (is_nacl) {
18+  deps += [ "//cef/libcef/features" ]
19+  if (enable_cef) {
20+    configs += [ "//cef/libcef/features:config" ]
21+  }
22+  if (is_nacl || is_cef_sandbox_build) {
23     sources += [
24       "hash/md5_nacl.cc",
25       "hash/md5_nacl.h",
26@@ -2116,6 +2121,12 @@ mixed_component("base") {
27       defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
28     }
29
30+    if (!use_custom_libcxx) {
31+      # Enable the VS 2015 Update 2 fix when building with the MSVC standard
32+      # library.
33+      defines += [ "_ENABLE_ATOMIC_ALIGNMENT_FIX" ]
34+    }
35+
36     libs += [
37       "cfgmgr32.lib",
38       "powrprof.lib",
39diff --git base/hash/md5.h base/hash/md5.h
40index ea6bbd31e3fc8..9941050ac0113 100644
41--- base/hash/md5.h
42+++ base/hash/md5.h
43@@ -10,8 +10,9 @@
44 #include "base/base_export.h"
45 #include "base/strings/string_piece.h"
46 #include "build/build_config.h"
47+#include "cef/libcef/features/features.h"
48
49-#if BUILDFLAG(IS_NACL)
50+#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD)
51 #include "base/hash/md5_nacl.h"
52 #else
53 #include "base/hash/md5_boringssl.h"
54diff --git base/hash/sha1.h base/hash/sha1.h
55index c4e656b9a68ef..8eb01343cd5d1 100644
56--- base/hash/sha1.h
57+++ base/hash/sha1.h
58@@ -14,7 +14,9 @@
59 #include "base/containers/span.h"
60 #include "base/strings/string_piece.h"
61 #include "build/build_config.h"
62-#if BUILDFLAG(IS_NACL)
63+#include "cef/libcef/features/features.h"
64+
65+#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD)
66 #include "base/hash/sha1_nacl.h"
67 #else
68 #include "base/hash/sha1_boringssl.h"
69diff --git base/unguessable_token.cc base/unguessable_token.cc
70index 04ea514c6ce35..4f69b8a7f87f3 100644
71--- base/unguessable_token.cc
72+++ base/unguessable_token.cc
73@@ -9,8 +9,9 @@
74 #include "base/format_macros.h"
75 #include "base/rand_util.h"
76 #include "build/build_config.h"
77+#include "cef/libcef/features/features.h"
78
79-#if !BUILDFLAG(IS_NACL)
80+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_CEF_SANDBOX_BUILD)
81 #include "third_party/boringssl/src/include/openssl/mem.h"
82 #endif
83
84@@ -41,7 +42,7 @@ UnguessableToken UnguessableToken::Deserialize(uint64_t high, uint64_t low) {
85 }
86
87 bool UnguessableToken::operator==(const UnguessableToken& other) const {
88-#if BUILDFLAG(IS_NACL)
89+#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD)
90   // BoringSSL is unavailable for NaCl builds so it remains timing dependent.
91   return token_ == other.token_;
92 #else
93