Reland "[base] Don't include <ostream> in string_piece.h"
This is a reland of 472bf833d1
Includes fix for fuchsia-x64-dbg in
components/viz/service/surfaces/surface_reference.cc
Original change's description:
> [base] Don't include <ostream> in string_piece.h
>
> It's not needed, and adds ca 200 MB of compiler input to the build.
>
> This also adds an implementation of CHECK_OP's "argument stringification"
> function for std::string values, since those previously relied on
> operator<< for stringification which would now require including
> <ostream> in many new files.
>
> Bug: 242216
> Change-Id: I34807204a82e622e50a5bbcabb7055c0b2f51f21
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3009579
> Commit-Queue: Hans Wennborg <hans@chromium.org>
> Reviewed-by: danakj <danakj@chromium.org>
> Owners-Override: danakj <danakj@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#900025}
Cq-Include-Trybots: luci.chromium.try:fuchsia-compile-x64-dbg
Bug: 242216
Change-Id: Ibdf16a1ec0307bd94aed2bfb327b7c64317e96bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3015330
Auto-Submit: Hans Wennborg <hans@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Owners-Override: danakj <danakj@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#900528}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
0791788762
commit
e93e9b2565
base
chrome/browser/metrics/perf
components
cast_channel
media_router
query_parser
url_formatter
spoof_checks
visitedlink
common
viz
web_package
test_support
content/browser
device
extensions/common
ios
chrome
app
browser
ui
authentication
unified_consent
commands
first_run
util
common
credential_provider
testing
web
media/base
net
remoting/signaling
storage/browser/blob
third_party
tools/json_schema_compiler
ui/base/text
url
@ -64,6 +64,10 @@ char* CheckOpValueStr(std::nullptr_t v) {
|
||||
return strdup("nullptr");
|
||||
}
|
||||
|
||||
char* CheckOpValueStr(const std::string& v) {
|
||||
return strdup(v.c_str());
|
||||
}
|
||||
|
||||
char* CheckOpValueStr(double v) {
|
||||
char buf[50];
|
||||
snprintf(buf, sizeof(buf), "%.6lf", v);
|
||||
|
@ -6,6 +6,7 @@
|
||||
#define BASE_CHECK_OP_H_
|
||||
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
|
||||
#include "base/check.h"
|
||||
@ -42,6 +43,7 @@ BASE_EXPORT char* CheckOpValueStr(unsigned long long v);
|
||||
BASE_EXPORT char* CheckOpValueStr(const void* v);
|
||||
BASE_EXPORT char* CheckOpValueStr(std::nullptr_t v);
|
||||
BASE_EXPORT char* CheckOpValueStr(double v);
|
||||
BASE_EXPORT char* CheckOpValueStr(const std::string& v);
|
||||
|
||||
// Convert a streamable value to string out-of-line to avoid <sstream>.
|
||||
BASE_EXPORT char* StreamValToStr(const void* v,
|
||||
|
@ -7,6 +7,8 @@
|
||||
#include <windows.h>
|
||||
#include <tlhelp32.h>
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/win/scoped_handle.h"
|
||||
#include "base/win/windows_version.h"
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "base/profiler/native_unwinder_mac.h"
|
||||
|
||||
#include <sys/types.h> // This needs to come before sys/ptrace.h
|
||||
|
||||
#include <mach-o/compact_unwind_encoding.h>
|
||||
#include <mach/mach.h>
|
||||
#include <mach/vm_map.h>
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
#include <iosfwd>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <limits.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <ostream>
|
||||
#include <type_traits>
|
||||
|
||||
#include "base/strings/string_piece.h"
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <cmath>
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/json/string_escape.h"
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <stddef.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/strings/string_piece.h"
|
||||
#include "base/strings/string_split.h"
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "chrome/browser/metrics/perf/random_selector.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/rand_util.h"
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/macros.h"
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "components/media_router/common/media_route_provider_helper.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_piece.h"
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/compiler_specific.h"
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "components/url_formatter/spoof_checks/skeleton_generator.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/strings/string_piece.h"
|
||||
#include "third_party/icu/source/i18n/unicode/regex.h"
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
#include <string.h> // for memset()
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/bit_cast.h"
|
||||
#include "base/check.h"
|
||||
#include "base/hash/md5.h"
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "components/viz/common/surfaces/frame_sink_id.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/strings/string_piece.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
|
||||
|
@ -2,12 +2,13 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "components/viz/common/surfaces/surface_id.h"
|
||||
#include "components/viz/common/surfaces/surface_range.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <ostream>
|
||||
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "components/viz/common/surfaces/surface_range.h"
|
||||
|
||||
namespace viz {
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "components/viz/common/surfaces/surface_range.h"
|
||||
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
|
||||
#include "base/strings/stringprintf.h"
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "components/viz/service/surfaces/surface_reference.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/strings/stringprintf.h"
|
||||
|
||||
namespace viz {
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "components/web_package/test_support/web_bundle_builder.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace web_package {
|
||||
namespace test {
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "content/browser/web_exposed_isolation_info.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace content {
|
||||
|
||||
// static
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
|
||||
#include "base/check_op.h"
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "device/fido/mac/credential_metadata.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "extensions/common/error_utils.h"
|
||||
|
||||
#include <initializer_list>
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/strings/string_piece.h"
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "extensions/common/extension_icon_set.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/strings/string_util.h"
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#import "ios/chrome/app/multitasking_test_scene_delegate.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/notreached.h"
|
||||
#import "ios/chrome/app/application_delegate/app_state.h"
|
||||
#import "ios/chrome/app/chrome_overlay_window.h"
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "ios/chrome/app/startup/register_experimental_settings.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/mac/bundle_locations.h"
|
||||
#include "base/notreached.h"
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
#include <objc/runtime.h>
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "components/crash/core/common/objc_zombie.h"
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#import "ios/chrome/browser/ui/authentication/unified_consent/unified_consent_view_controller.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/ios/ns_range.h"
|
||||
#include "components/google/core/common/google_util.h"
|
||||
|
@ -5,6 +5,8 @@
|
||||
#import "ios/chrome/browser/ui/commands/command_dispatcher.h"
|
||||
|
||||
#include <objc/runtime.h>
|
||||
|
||||
#include <ostream>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
#import <MaterialComponents/MaterialTypography.h>
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/i18n/rtl.h"
|
||||
#include "base/ios/ns_range.h"
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
#import <objc/runtime.h>
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#import "ios/chrome/common/credential_provider/archivable_credential_store.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#import "ios/testing/ocmock_complex_type_helper.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check.h"
|
||||
#import "base/strings/sys_string_conversions.h"
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#import "ios/web/js_messaging/crw_js_window_id_manager.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/dcheck_is_on.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#import "ios/web/navigation/crw_error_page_helper.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "net/base/escape.h"
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "media/base/cdm_key_information.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
|
@ -4,12 +4,15 @@
|
||||
|
||||
#include "net/base/escape.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/cxx17_backports.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/utf_string_conversion_utils.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/third_party/icu/icu_utf.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
namespace net {
|
||||
|
||||
|
@ -5,7 +5,9 @@
|
||||
#include "net/base/hash_value.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <ostream>
|
||||
|
||||
#include "base/base64.h"
|
||||
#include "base/check_op.h"
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "net/base/ip_endpoint.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "build/build_config.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "net/ssl/ssl_cipher_suite_names.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/string_util.h"
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_util.h"
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "storage/browser/blob/blob_storage_constants.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h"
|
||||
|
||||
#include <ostream>
|
||||
#include <utility>
|
||||
|
||||
#include "base/base64.h"
|
||||
|
@ -14,6 +14,8 @@
|
||||
|
||||
#include "util/win/get_function.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
|
||||
|
@ -47,6 +47,7 @@ class _Generator(object):
|
||||
self._namespace.short_filename))
|
||||
.Append()
|
||||
.Append('#include <memory>')
|
||||
.Append('#include <ostream>')
|
||||
.Append('#include <string>')
|
||||
.Append('#include <utility>')
|
||||
.Append('#include <vector>')
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "ui/base/text/bytes_formatting.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/cxx17_backports.h"
|
||||
#include "base/i18n/number_formatting.h"
|
||||
|
2
url/third_party/mozilla/url_parse.cc
vendored
2
url/third_party/mozilla/url_parse.cc
vendored
@ -38,6 +38,8 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "url/url_parse_internal.h"
|
||||
#include "url/url_util.h"
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
|
||||
#include "base/strings/string_piece.h"
|
||||
@ -24,4 +25,4 @@ bool IDNToASCII(const char16_t* src, int src_len, CanonOutputW* output) {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace url
|
||||
} // namespace url
|
||||
|
@ -6,7 +6,9 @@
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <ostream>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/compiler_specific.h"
|
||||
|
Reference in New Issue
Block a user