summaryrefslogtreecommitdiff
path: root/chromium/base
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/base')
-rw-r--r--chromium/base/BUILD.gn12
-rw-r--r--chromium/base/metrics/sparse_histogram.cc8
-rw-r--r--chromium/base/strings/string_piece.h4
3 files changed, 20 insertions, 4 deletions
diff --git a/chromium/base/BUILD.gn b/chromium/base/BUILD.gn
index 8c6f3289597..894f0a06330 100644
--- a/chromium/base/BUILD.gn
+++ b/chromium/base/BUILD.gn
@@ -894,6 +894,10 @@ jumbo_component("base") {
}
}
+ jumbo_excluded_sources = [
+ "logging.cc",
+ ]
+
if (is_win) {
sources += [
"debug/close_handle_hook_win.cc",
@@ -1202,6 +1206,7 @@ jumbo_component("base") {
"process/process_metrics_linux.cc",
"threading/platform_thread_linux.cc",
]
+ jumbo_excluded_sources += [ "process/memory_linux.cc" ]
}
if (!is_nacl) {
@@ -1825,6 +1830,8 @@ jumbo_component("base") {
"allocator/partition_allocator/thread_cache.h",
"allocator/partition_allocator/yield_processor.h",
]
+ jumbo_excluded_sources += [ "allocator/partition_allocator/random.cc", ]
+
if (is_win) {
sources += [
"allocator/partition_allocator/page_allocator_internals_win.h",
@@ -1860,6 +1867,11 @@ jumbo_component("base") {
"strings/string16.cc",
]
+ # winternl.h and NTSecAPI.h have different definitions of UNICODE_STRING.
+ # There's only one client of NTSecAPI.h in base but several of winternl.h,
+ # so exclude the NTSecAPI.h one.
+ jumbo_excluded_sources += [ "rand_util_win.cc" ]
+
deps += [ "//base/win:base_win_buildflags" ]
data_deps += [ "//build/win:runtime_libs" ]
diff --git a/chromium/base/metrics/sparse_histogram.cc b/chromium/base/metrics/sparse_histogram.cc
index 6d2720c2369..fb63af6f081 100644
--- a/chromium/base/metrics/sparse_histogram.cc
+++ b/chromium/base/metrics/sparse_histogram.cc
@@ -21,7 +21,7 @@
#include "base/values.h"
namespace {
-constexpr char kAsciiNewLine[] = "\n";
+constexpr char kAsciiNewLine2[] = "\n";
} // namespace
namespace base {
@@ -175,8 +175,8 @@ void SparseHistogram::WriteAscii(std::string* output) const {
std::unique_ptr<HistogramSamples> snapshot = SnapshotSamples();
WriteAsciiHeader(*snapshot, output);
- output->append(kAsciiNewLine);
- WriteAsciiBody(*snapshot, true, kAsciiNewLine, output);
+ output->append(kAsciiNewLine2);
+ WriteAsciiBody(*snapshot, true, kAsciiNewLine2, output);
}
base::DictionaryValue SparseHistogram::ToGraphDict() const {
@@ -186,7 +186,7 @@ base::DictionaryValue SparseHistogram::ToGraphDict() const {
base::DictionaryValue dict;
WriteAsciiHeader(*snapshot, &header);
- WriteAsciiBody(*snapshot, true, kAsciiNewLine, &body);
+ WriteAsciiBody(*snapshot, true, kAsciiNewLine2, &body);
dict.SetString("header", header);
dict.SetString("body", body);
diff --git a/chromium/base/strings/string_piece.h b/chromium/base/strings/string_piece.h
index b10707d94ef..4e5ac7d5798 100644
--- a/chromium/base/strings/string_piece.h
+++ b/chromium/base/strings/string_piece.h
@@ -162,7 +162,11 @@ template <typename STRING_TYPE> class BasicStringPiece {
// std::basic_string_view, so remove the special handling for it.
// Note: This doesn't just use STRING_TYPE::traits_type::length(), since that
// isn't constexpr until C++17.
+#if defined(COMPILER_GCC)
+ constexpr BasicStringPiece(const value_type* str) __attribute__((always_inline))
+#else
constexpr BasicStringPiece(const value_type* str)
+#endif
: ptr_(str), length_(!str ? 0 : CharTraits<value_type>::length(str)) {}
// Explicitly disallow construction from nullptr. Note that this does not
// catch construction from runtime strings that might be null.