0

Merge //base/util/type_safety into //base/types.

This is part of merging all of //base/util back into //base.

Bug: 1227210
Change-Id: I4440beb5ed161cfab78b19915d09e71d4834d82e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3012177
Reviewed-by: Wez <wez@chromium.org>
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Owners-Override: Wez <wez@chromium.org>
Auto-Submit: Albert J. Wong <ajwong@chromium.org>
Cr-Commit-Position: refs/heads/master@{#900074}
This commit is contained in:
Albert J. Wong
2021-07-09 18:06:57 +00:00
committed by Chromium LUCI CQ
parent 0c7499c8ca
commit 1b6dc9656f
70 changed files with 161 additions and 207 deletions
base
chrome/browser
chromecast/browser
components
autofill
feed
core
v2
password_manager
core
browser
leak_detection
performance_manager
permissions
services
storage
viz
content
device/vr
extensions/common/api/declarative_net_request
gpu
ipc
media/filters
mojo/public/cpp/bindings
net
storage/browser/quota
third_party/blink
tools/ipc_fuzzer/fuzzer
ui/base

@@ -842,8 +842,10 @@ component("base") {
"trace_event/trace_id_helper.h", "trace_event/trace_id_helper.h",
"traits_bag.h", "traits_bag.h",
"tuple.h", "tuple.h",
"types/id_type.h",
"types/pass_key.h", "types/pass_key.h",
"types/strong_alias.h", "types/strong_alias.h",
"types/token_type.h",
"unguessable_token.cc", "unguessable_token.cc",
"unguessable_token.h", "unguessable_token.h",
"updateable_sequenced_task_runner.h", "updateable_sequenced_task_runner.h",
@@ -3151,8 +3153,10 @@ test("base_unittests") {
"tools_sanity_unittest.cc", "tools_sanity_unittest.cc",
"traits_bag_unittest.cc", "traits_bag_unittest.cc",
"tuple_unittest.cc", "tuple_unittest.cc",
"types/id_type_unittest.cc",
"types/pass_key_unittest.cc", "types/pass_key_unittest.cc",
"types/strong_alias_unittest.cc", "types/strong_alias_unittest.cc",
"types/token_type_unittest.cc",
"unguessable_token_unittest.cc", "unguessable_token_unittest.cc",
"value_iterators_unittest.cc", "value_iterators_unittest.cc",
"values_unittest.cc", "values_unittest.cc",

@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef BASE_UTIL_TYPE_SAFETY_ID_TYPE_H_ #ifndef BASE_TYPES_ID_TYPE_H_
#define BASE_UTIL_TYPE_SAFETY_ID_TYPE_H_ #define BASE_TYPES_ID_TYPE_H_
#include <cstdint> #include <cstdint>
#include <type_traits> #include <type_traits>
#include "base/types/strong_alias.h" #include "base/types/strong_alias.h"
namespace util { namespace base {
// A specialization of StrongAlias for integer-based identifiers. // A specialization of StrongAlias for integer-based identifiers.
// //
@@ -51,7 +51,7 @@ template <typename TypeMarker,
typename WrappedType, typename WrappedType,
WrappedType kInvalidValue, WrappedType kInvalidValue,
WrappedType kFirstGeneratedId = kInvalidValue + 1> WrappedType kFirstGeneratedId = kInvalidValue + 1>
class IdType : public base::StrongAlias<TypeMarker, WrappedType> { class IdType : public StrongAlias<TypeMarker, WrappedType> {
public: public:
static_assert( static_assert(
std::is_unsigned<WrappedType>::value || kInvalidValue <= 0, std::is_unsigned<WrappedType>::value || kInvalidValue <= 0,
@@ -67,7 +67,7 @@ class IdType : public base::StrongAlias<TypeMarker, WrappedType> {
"invalid value so that the monotonically increasing " "invalid value so that the monotonically increasing "
"GenerateNextId method will never return the invalid value."); "GenerateNextId method will never return the invalid value.");
using base::StrongAlias<TypeMarker, WrappedType>::StrongAlias; using StrongAlias<TypeMarker, WrappedType>::StrongAlias;
// This class can be used to generate unique IdTypes. It keeps an internal // This class can be used to generate unique IdTypes. It keeps an internal
// counter that is continually increased by one every time an ID is generated. // counter that is continually increased by one every time an ID is generated.
@@ -88,8 +88,7 @@ class IdType : public base::StrongAlias<TypeMarker, WrappedType> {
// Default-construct in the null state. // Default-construct in the null state.
constexpr IdType() constexpr IdType()
: base::StrongAlias<TypeMarker, WrappedType>::StrongAlias(kInvalidValue) { : StrongAlias<TypeMarker, WrappedType>::StrongAlias(kInvalidValue) {}
}
constexpr bool is_null() const { return this->value() == kInvalidValue; } constexpr bool is_null() const { return this->value() == kInvalidValue; }
constexpr explicit operator bool() const { return !is_null(); } constexpr explicit operator bool() const { return !is_null(); }
@@ -112,6 +111,7 @@ template <typename TypeMarker>
using IdType64 = IdType<TypeMarker, std::int64_t, 0>; using IdType64 = IdType<TypeMarker, std::int64_t, 0>;
template <typename TypeMarker> template <typename TypeMarker>
using IdTypeU64 = IdType<TypeMarker, std::uint64_t, 0>; using IdTypeU64 = IdType<TypeMarker, std::uint64_t, 0>;
} // namespace util
#endif // BASE_UTIL_TYPE_SAFETY_ID_TYPE_H_ } // namespace base
#endif // BASE_TYPES_ID_TYPE_H_

@@ -4,10 +4,10 @@
#include <limits> #include <limits>
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
namespace util { namespace base {
namespace { namespace {
@@ -110,4 +110,4 @@ INSTANTIATE_TEST_SUITE_P(All,
123, 123,
std::numeric_limits<int>::max())); std::numeric_limits<int>::max()));
} // namespace util } // namespace base

@@ -68,10 +68,10 @@ namespace base {
// See also // See also
// - //styleguide/c++/blink-c++.md which provides recommendation and examples of // - //styleguide/c++/blink-c++.md which provides recommendation and examples of
// using StrongAlias<Tag, bool> instead of a bare bool. // using StrongAlias<Tag, bool> instead of a bare bool.
// - util::IdType<...> which provides helpers for specializing // - IdType<...> which provides helpers for specializing StrongAlias to be
// StrongAlias to be used as an id. // used as an id.
// - util::TokenType<...> which provides helpers for specializing StrongAlias // - TokenType<...> which provides helpers for specializing StrongAlias to be
// to be used as a wrapper of base::UnguessableToken. // used as a wrapper of base::UnguessableToken.
template <typename TagType, typename UnderlyingType> template <typename TagType, typename UnderlyingType>
class StrongAlias { class StrongAlias {
public: public:

@@ -2,31 +2,31 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef BASE_UTIL_TYPE_SAFETY_TOKEN_TYPE_H_ #ifndef BASE_TYPES_TOKEN_TYPE_H_
#define BASE_UTIL_TYPE_SAFETY_TOKEN_TYPE_H_ #define BASE_TYPES_TOKEN_TYPE_H_
#include <type_traits> #include <type_traits>
#include "base/types/strong_alias.h" #include "base/types/strong_alias.h"
#include "base/unguessable_token.h" #include "base/unguessable_token.h"
namespace util { namespace base {
// A specialization of StrongAlias for base::UnguessableToken. Unlike // A specialization of StrongAlias for UnguessableToken. Unlike
// base::UnguessableToken, a TokenType<...> does not default to null and does // UnguessableToken, a TokenType<...> does not default to null and does not
// not expose the concept of null tokens. If you need to indicate a null token, // expose the concept of null tokens. If you need to indicate a null token,
// please use absl::optional<TokenType<...>>. // please use absl::optional<TokenType<...>>.
template <typename TypeMarker> template <typename TypeMarker>
class TokenType : public base::StrongAlias<TypeMarker, base::UnguessableToken> { class TokenType : public StrongAlias<TypeMarker, UnguessableToken> {
private: private:
using Super = base::StrongAlias<TypeMarker, base::UnguessableToken>; using Super = StrongAlias<TypeMarker, UnguessableToken>;
public: public:
TokenType() : Super(base::UnguessableToken::Create()) {} TokenType() : Super(UnguessableToken::Create()) {}
// The parameter |unused| is here to prevent multiple definitions of a // The parameter |unused| is here to prevent multiple definitions of a
// single argument constructor. This is only needed during the migration to // single argument constructor. This is only needed during the migration to
// strongly typed frame tokens. // strongly typed frame tokens.
explicit TokenType(const base::UnguessableToken& token) : Super(token) {} explicit TokenType(const UnguessableToken& token) : Super(token) {}
TokenType(const TokenType& token) : Super(token.value()) {} TokenType(const TokenType& token) : Super(token.value()) {}
TokenType(TokenType&& token) noexcept : Super(token.value()) {} TokenType(TokenType&& token) noexcept : Super(token.value()) {}
TokenType& operator=(const TokenType& token) = default; TokenType& operator=(const TokenType& token) = default;
@@ -40,14 +40,14 @@ class TokenType : public base::StrongAlias<TypeMarker, base::UnguessableToken> {
using argument_type = TokenType; using argument_type = TokenType;
using result_type = size_t; using result_type = size_t;
result_type operator()(const argument_type& token) const { result_type operator()(const argument_type& token) const {
return base::UnguessableTokenHash()(token.value()); return UnguessableTokenHash()(token.value());
} }
}; };
// Mimic the base::UnguessableToken API for ease and familiarity of use. // Mimic the UnguessableToken API for ease and familiarity of use.
std::string ToString() const { return this->value().ToString(); } std::string ToString() const { return this->value().ToString(); }
}; };
} // namespace util } // namespace base
#endif // BASE_UTIL_TYPE_SAFETY_TOKEN_TYPE_H_ #endif // BASE_TYPES_TOKEN_TYPE_H_

@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "base/util/type_safety/token_type.h" #include "base/types/token_type.h"
#include "base/unguessable_token.h" #include "base/unguessable_token.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
namespace util { namespace base {
using FooToken = TokenType<class Foo>; using FooToken = TokenType<class Foo>;
@@ -37,11 +37,10 @@ TEST(TokenType, TokenApi) {
EXPECT_TRUE(token1 != token4); EXPECT_TRUE(token1 != token4);
// Test hasher. // Test hasher.
EXPECT_EQ(FooToken::Hasher()(token2), EXPECT_EQ(FooToken::Hasher()(token2), UnguessableTokenHash()(token2.value()));
base::UnguessableTokenHash()(token2.value()));
// Test string representation. // Test string representation.
EXPECT_EQ(token2.ToString(), token2.value().ToString()); EXPECT_EQ(token2.ToString(), token2.value().ToString());
} }
} // namespace util } // namespace base

@@ -9,7 +9,6 @@ test("base_util_unittests") {
"enum_set:unittests", "enum_set:unittests",
"memory_pressure:unittests", "memory_pressure:unittests",
"timer:unittests", "timer:unittests",
"type_safety:tests",
"values:unittests", "values:unittests",
"//base/test:run_all_unittests", "//base/test:run_all_unittests",
] ]

@@ -1,31 +0,0 @@
# Copyright (c) 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/nocompile.gni")
# Change this target's type to component if it starts to contain more than
# just headers. Header-only targets cannot be compiled to libraries, so it must
# remain a source_set for now.
source_set("type_safety") {
sources = [
"id_type.h",
"token_type.h",
]
deps = [ "//base" ]
}
source_set("tests") {
testonly = true
sources = [
"id_type_unittest.cc",
"token_type_unittest.cc",
]
deps = [
":type_safety",
"//base",
"//testing/gtest",
]
}

@@ -1,7 +0,0 @@
include_rules = [
"-base",
"+base/types",
"+base/unguessable_token.h",
"+base/util/type_safety",
"-third_party",
]

@@ -1,2 +0,0 @@
lukasza@chromium.org
mpawlowski@opera.com

@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_ASH_CROSAPI_CROSAPI_ID_H_ #ifndef CHROME_BROWSER_ASH_CROSAPI_CROSAPI_ID_H_
#define CHROME_BROWSER_ASH_CROSAPI_CROSAPI_ID_H_ #define CHROME_BROWSER_ASH_CROSAPI_CROSAPI_ID_H_
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
namespace crosapi { namespace crosapi {
namespace internal { namespace internal {
@@ -15,7 +15,7 @@ struct CrosapiIdTag {};
// CrosapiId is an id created on a new Crosapi connection creation. // CrosapiId is an id created on a new Crosapi connection creation.
// This will be useful to identify what bindings/remote of sub crosapi // This will be useful to identify what bindings/remote of sub crosapi
// interfaces are related each other. // interfaces are related each other.
using CrosapiId = util::IdTypeU32<internal::CrosapiIdTag>; using CrosapiId = base::IdTypeU32<internal::CrosapiIdTag>;
} // namespace crosapi } // namespace crosapi

@@ -11,7 +11,7 @@
#include "base/containers/flat_set.h" #include "base/containers/flat_set.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "chrome/browser/predictors/loading_predictor_config.h" #include "chrome/browser/predictors/loading_predictor_config.h"
#include "services/metrics/public/cpp/ukm_source_id.h" #include "services/metrics/public/cpp/ukm_source_id.h"
#include "services/network/public/mojom/fetch_api.mojom-forward.h" #include "services/network/public/mojom/fetch_api.mojom-forward.h"
@@ -29,7 +29,7 @@ namespace predictors {
class LoadingStatsCollector; class LoadingStatsCollector;
struct OptimizationGuidePrediction; struct OptimizationGuidePrediction;
class ResourcePrefetchPredictor; class ResourcePrefetchPredictor;
using NavigationId = util::IdType64<content::NavigationHandle>; using NavigationId = base::IdType64<content::NavigationHandle>;
// Data collected for origin-based prediction, for a single origin during a // Data collected for origin-based prediction, for a single origin during a
// page load (see PageRequestSummary). // page load (see PageRequestSummary).

@@ -8,7 +8,7 @@
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/memory/scoped_refptr.h" #include "base/memory/scoped_refptr.h"
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "chrome/browser/predictors/resource_prefetch_predictor.h" #include "chrome/browser/predictors/resource_prefetch_predictor.h"
#include "content/public/browser/navigation_handle_user_data.h" #include "content/public/browser/navigation_handle_user_data.h"
#include "content/public/browser/render_document_host_user_data.h" #include "content/public/browser/render_document_host_user_data.h"
@@ -27,7 +27,7 @@ class OptimizationMetadata;
} // namespace optimization_guide } // namespace optimization_guide
namespace predictors { namespace predictors {
using NavigationId = util::IdType64<content::NavigationHandle>; using NavigationId = base::IdType64<content::NavigationHandle>;
class LoadingPredictor; class LoadingPredictor;

@@ -29,7 +29,6 @@ source_set("factory") {
source_set("public") { source_set("public") {
deps = [ deps = [
"//base", "//base",
"//base/util/type_safety",
"//url", "//url",
] ]

@@ -11,7 +11,7 @@
#include "base/memory/ref_counted_memory.h" #include "base/memory/ref_counted_memory.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "base/sequence_checker.h" #include "base/sequence_checker.h"
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "chrome/browser/ui/webui/discards/discards.mojom.h" #include "chrome/browser/ui/webui/discards/discards.mojom.h"
#include "components/performance_manager/public/graph/frame_node.h" #include "components/performance_manager/public/graph/frame_node.h"
#include "components/performance_manager/public/graph/graph.h" #include "components/performance_manager/public/graph/graph.h"
@@ -207,7 +207,7 @@ class DiscardsGraphDumpImpl : public discards::mojom::GraphDump,
// The favicon requests happen on the UI thread. This helper class // The favicon requests happen on the UI thread. This helper class
// maintains the state required to do that. // maintains the state required to do that.
class FaviconRequestHelper; class FaviconRequestHelper;
using NodeId = util::IdType64<class NodeIdTag>; using NodeId = base::IdType64<class NodeIdTag>;
void AddNode(const performance_manager::Node* node); void AddNode(const performance_manager::Node* node);
void RemoveNode(const performance_manager::Node* node); void RemoveNode(const performance_manager::Node* node);

@@ -5,7 +5,7 @@
#ifndef CHROMECAST_BROWSER_SERVICE_CONNECTOR_H_ #ifndef CHROMECAST_BROWSER_SERVICE_CONNECTOR_H_
#define CHROMECAST_BROWSER_SERVICE_CONNECTOR_H_ #define CHROMECAST_BROWSER_SERVICE_CONNECTOR_H_
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "chromecast/common/mojom/service_connector.mojom.h" #include "chromecast/common/mojom/service_connector.mojom.h"
#include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/pending_remote.h"
@@ -20,7 +20,7 @@ class ServiceConnector;
// //
// We don't use an enum because the definition of these IDs is split across // We don't use an enum because the definition of these IDs is split across
// public and internal sources. // public and internal sources.
using ServiceConnectorClientId = util::IdType32<ServiceConnector>; using ServiceConnectorClientId = base::IdType32<ServiceConnector>;
// Something in browser process itself (e.g. CastAudioManager) // Something in browser process itself (e.g. CastAudioManager)
extern const ServiceConnectorClientId kBrowserProcessClientId; extern const ServiceConnectorClientId kBrowserProcessClientId;

@@ -7,7 +7,7 @@
#include <vector> #include <vector>
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "components/autofill/core/browser/autofill_client.h" #include "components/autofill/core/browser/autofill_client.h"
#include "components/autofill/core/browser/data_model/autofill_profile.h" #include "components/autofill/core/browser/data_model/autofill_profile.h"
#include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/abseil-cpp/absl/types/optional.h"
@@ -16,7 +16,7 @@ namespace autofill {
// The id of an ongoing profile import process. // The id of an ongoing profile import process.
using AutofillProfileImportId = using AutofillProfileImportId =
::util::IdTypeU64<class AutofillProfileImportIdMarker>; ::base::IdTypeU64<class AutofillProfileImportIdMarker>;
// Specifies the type of a profile form import. // Specifies the type of a profile form import.
enum class AutofillProfileImportType { enum class AutofillProfileImportType {

@@ -9,7 +9,7 @@
#include <stdint.h> #include <stdint.h>
#include "base/strings/string_piece.h" #include "base/strings/string_piece.h"
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
namespace autofill { namespace autofill {
@@ -17,8 +17,8 @@ struct FormData;
struct FormFieldData; struct FormFieldData;
namespace internal { namespace internal {
using FormSignatureType = ::util::IdTypeU64<class FormSignatureMarker>; using FormSignatureType = ::base::IdTypeU64<class FormSignatureMarker>;
using FieldSignatureType = ::util::IdTypeU32<class FieldSignatureMarker>; using FieldSignatureType = ::base::IdTypeU32<class FieldSignatureMarker>;
} // namespace internal } // namespace internal
// The below strong aliases are defined as subclasses instead of typedefs in // The below strong aliases are defined as subclasses instead of typedefs in

@@ -9,15 +9,15 @@
#include <limits> #include <limits>
#include <ostream> #include <ostream>
#include "base/types/id_type.h"
#include "base/unguessable_token.h" #include "base/unguessable_token.h"
#include "base/util/type_safety/id_type.h"
#include "third_party/abseil-cpp/absl/types/variant.h" #include "third_party/abseil-cpp/absl/types/variant.h"
namespace autofill { namespace autofill {
namespace internal { namespace internal {
// TokenType wraps an base::UnguessableToken just like util::TokenType but // TokenType wraps an base::UnguessableToken just like base::TokenType but
// initializes to zero by default. We use it to define our own versions of // initializes to zero by default. We use it to define our own versions of
// LocalFrameToken and RemoteFrameToken to avoid dependencies on blink here and // LocalFrameToken and RemoteFrameToken to avoid dependencies on blink here and
// in the mojo code, since iOS depends on this code. // in the mojo code, since iOS depends on this code.
@@ -54,8 +54,8 @@ using FrameToken = absl::variant<RemoteFrameToken, LocalFrameToken>;
namespace internal { namespace internal {
using FormRendererIdType = ::util::IdTypeU32<class FormRendererIdMarker>; using FormRendererIdType = ::base::IdTypeU32<class FormRendererIdMarker>;
using FieldRendererIdType = ::util::IdTypeU32<class FieldRendererIdMarker>; using FieldRendererIdType = ::base::IdTypeU32<class FieldRendererIdMarker>;
} // namespace internal } // namespace internal

@@ -11,7 +11,7 @@
#include "base/strings/string_piece.h" #include "base/strings/string_piece.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "base/version.h" #include "base/version.h"
#include "components/version_info/channel.h" #include "components/version_info/channel.h"
#include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/abseil-cpp/absl/types/optional.h"
@@ -39,9 +39,9 @@ struct DisplayMetrics {
}; };
// A unique ID for an ephemeral change. // A unique ID for an ephemeral change.
using EphemeralChangeId = util::IdTypeU32<class EphemeralChangeIdClass>; using EphemeralChangeId = base::IdTypeU32<class EphemeralChangeIdClass>;
using SurfaceId = util::IdTypeU32<class SurfaceIdClass>; using SurfaceId = base::IdTypeU32<class SurfaceIdClass>;
using ImageFetchId = util::IdTypeU32<class ImageFetchIdClass>; using ImageFetchId = base::IdTypeU32<class ImageFetchIdClass>;
// A map of trial names (key) to group names (value) that is // A map of trial names (key) to group names (value) that is
// sent from the server. // sent from the server.
@@ -171,7 +171,7 @@ enum class WebFeedSubscriptionRequestStatus {
std::ostream& operator<<(std::ostream& out, std::ostream& operator<<(std::ostream& out,
WebFeedSubscriptionRequestStatus value); WebFeedSubscriptionRequestStatus value);
using NetworkRequestId = util::IdTypeU32<class NetworkRequestIdClass>; using NetworkRequestId = base::IdTypeU32<class NetworkRequestIdClass>;
} // namespace feed } // namespace feed

@@ -10,7 +10,7 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "components/feed/core/proto/v2/store.pb.h" #include "components/feed/core/proto/v2/store.pb.h"
#include "components/feed/core/v2/proto_util.h" #include "components/feed/core/v2/proto_util.h"
#include "components/feed/core/v2/types.h" #include "components/feed/core/v2/types.h"
@@ -19,7 +19,7 @@ namespace feed {
namespace stream_model { namespace stream_model {
// Uniquely identifies a feedwire::ContentId. Provided by |ContentMap|. // Uniquely identifies a feedwire::ContentId. Provided by |ContentMap|.
using ContentTag = util::IdTypeU32<class ContentTagClass>; using ContentTag = base::IdTypeU32<class ContentTagClass>;
using ContentRevision = feed::ContentRevision; using ContentRevision = feed::ContentRevision;
// Owns instances of feedstore::Content pointed to by the feature tree, and // Owns instances of feedstore::Content pointed to by the feature tree, and

@@ -10,7 +10,7 @@
#include "base/containers/flat_set.h" #include "base/containers/flat_set.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "base/values.h" #include "base/values.h"
#include "components/feed/core/proto/v2/wire/reliability_logging_enums.pb.h" #include "components/feed/core/proto/v2/wire/reliability_logging_enums.pb.h"
#include "components/feed/core/v2/enums.h" #include "components/feed/core/v2/enums.h"
@@ -28,10 +28,10 @@ using ::feed::WebFeedSubscriptionStatus;
// Uniquely identifies a revision of a |feedstore::Content|. If Content changes, // Uniquely identifies a revision of a |feedstore::Content|. If Content changes,
// it is assigned a new revision number. // it is assigned a new revision number.
using ContentRevision = util::IdTypeU32<class ContentRevisionClass>; using ContentRevision = base::IdTypeU32<class ContentRevisionClass>;
// ID for a stored pending action. // ID for a stored pending action.
using LocalActionId = util::IdType32<class LocalActionIdClass>; using LocalActionId = base::IdType32<class LocalActionIdClass>;
std::string ToString(ContentRevision c); std::string ToString(ContentRevision c);
ContentRevision ToContentRevision(const std::string& str); ContentRevision ToContentRevision(const std::string& str);

@@ -16,7 +16,6 @@ source_set("leak_detection_interface_headers") {
] ]
deps = [ deps = [
"//base", "//base",
"//base/util/type_safety",
"//url", "//url",
] ]
} }

@@ -10,7 +10,7 @@
#include "base/callback_forward.h" #include "base/callback_forward.h"
#include "base/containers/flat_set.h" #include "base/containers/flat_set.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/util/type_safety/token_type.h" #include "base/types/token_type.h"
#include "components/performance_manager/public/execution_context_priority/execution_context_priority.h" #include "components/performance_manager/public/execution_context_priority/execution_context_priority.h"
#include "components/performance_manager/public/graph/node.h" #include "components/performance_manager/public/graph/node.h"
#include "third_party/blink/public/common/tokens/tokens.h" #include "third_party/blink/public/common/tokens/tokens.h"

@@ -5,13 +5,13 @@
#ifndef COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_RENDER_PROCESS_HOST_ID_H_ #ifndef COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_RENDER_PROCESS_HOST_ID_H_
#define COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_RENDER_PROCESS_HOST_ID_H_ #define COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_RENDER_PROCESS_HOST_ID_H_
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "content/public/common/child_process_host.h" #include "content/public/common/child_process_host.h"
namespace performance_manager { namespace performance_manager {
using RenderProcessHostIdBase = using RenderProcessHostIdBase =
util::IdType<class RenderProcessHostIdTag, base::IdType<class RenderProcessHostIdTag,
int32_t, int32_t,
content::ChildProcessHost::kInvalidUniqueID, content::ChildProcessHost::kInvalidUniqueID,
1>; 1>;

@@ -44,8 +44,8 @@
#include "base/check_op.h" #include "base/check_op.h"
#include "base/containers/flat_map.h" #include "base/containers/flat_map.h"
#include "base/dcheck_is_on.h" #include "base/dcheck_is_on.h"
#include "base/types/id_type.h"
#include "base/types/pass_key.h" #include "base/types/pass_key.h"
#include "base/util/type_safety/id_type.h"
namespace performance_manager { namespace performance_manager {
namespace voting { namespace voting {
@@ -83,7 +83,7 @@ class Vote final {
// Identifies a VotingChannel. // Identifies a VotingChannel.
template <typename VoteImpl> template <typename VoteImpl>
using VoterId = util::IdTypeU32<VoteImpl>; using VoterId = base::IdTypeU32<VoteImpl>;
template <class VoteImpl> template <class VoteImpl>
class VoteObserver { class VoteObserver {

@@ -7,7 +7,7 @@
#include <string> #include <string>
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "url/gurl.h" #include "url/gurl.h"
namespace content { namespace content {
@@ -24,7 +24,7 @@ namespace permissions {
class PermissionRequestID { class PermissionRequestID {
public: public:
// Uniquely identifies a request (at least) within a given frame. // Uniquely identifies a request (at least) within a given frame.
using RequestLocalId = util::IdType64<PermissionRequestID>; using RequestLocalId = base::IdType64<PermissionRequestID>;
PermissionRequestID(content::RenderFrameHost* render_frame_host, PermissionRequestID(content::RenderFrameHost* render_frame_host,
RequestLocalId request_local_id); RequestLocalId request_local_id);

@@ -10,7 +10,6 @@ component("buckets") {
public_deps = [ public_deps = [
"//base", "//base",
"//base/util/type_safety",
"//third_party/blink/public/common", "//third_party/blink/public/common",
] ]

@@ -5,13 +5,13 @@
#ifndef COMPONENTS_SERVICES_STORAGE_PUBLIC_CPP_BUCKETS_BUCKET_ID_H_ #ifndef COMPONENTS_SERVICES_STORAGE_PUBLIC_CPP_BUCKETS_BUCKET_ID_H_
#define COMPONENTS_SERVICES_STORAGE_PUBLIC_CPP_BUCKETS_BUCKET_ID_H_ #define COMPONENTS_SERVICES_STORAGE_PUBLIC_CPP_BUCKETS_BUCKET_ID_H_
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
namespace storage { namespace storage {
// Type for the Storage Bucket ID. // Type for the Storage Bucket ID.
// IDs will always be generated by SQLite, and all valid BucketIds are positive. // IDs will always be generated by SQLite, and all valid BucketIds are positive.
using BucketId = util::IdType64<class BucketTag>; using BucketId = base::IdType64<class BucketTag>;
} // namespace storage } // namespace storage

@@ -6,7 +6,6 @@
#define COMPONENTS_SERVICES_STORAGE_PUBLIC_CPP_BUCKETS_BUCKET_INFO_H_ #define COMPONENTS_SERVICES_STORAGE_PUBLIC_CPP_BUCKETS_BUCKET_INFO_H_
#include "base/time/time.h" #include "base/time/time.h"
#include "base/util/type_safety/id_type.h"
#include "components/services/storage/public/cpp/buckets/bucket_id.h" #include "components/services/storage/public/cpp/buckets/bucket_id.h"
#include "third_party/blink/public/common/storage_key/storage_key.h" #include "third_party/blink/public/common/storage_key/storage_key.h"
#include "third_party/blink/public/mojom/quota/quota_types.mojom-shared.h" #include "third_party/blink/public/mojom/quota/quota_types.mojom-shared.h"

@@ -14,7 +14,7 @@
#include "base/callback.h" #include "base/callback.h"
#include "base/hash/hash.h" #include "base/hash/hash.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "cc/base/list_container.h" #include "cc/base/list_container.h"
#include "cc/paint/filter_operations.h" #include "cc/paint/filter_operations.h"
#include "components/viz/common/quads/draw_quad.h" #include "components/viz/common/quads/draw_quad.h"
@@ -33,7 +33,7 @@ class AggregatedRenderPass;
class CompositorRenderPassDrawQuad; class CompositorRenderPassDrawQuad;
class AggregatedRenderPassDrawQuad; class AggregatedRenderPassDrawQuad;
using AggregatedRenderPassId = util::IdTypeU64<AggregatedRenderPass>; using AggregatedRenderPassId = base::IdTypeU64<AggregatedRenderPass>;
// This class represents a render pass that is a result of aggregating render // This class represents a render pass that is a result of aggregating render
// passes from all of the relevant surfaces. It is _not_ mojo-serializable since // passes from all of the relevant surfaces. It is _not_ mojo-serializable since

@@ -14,7 +14,7 @@
#include "base/callback.h" #include "base/callback.h"
#include "base/hash/hash.h" #include "base/hash/hash.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "cc/base/list_container.h" #include "cc/base/list_container.h"
#include "cc/paint/filter_operations.h" #include "cc/paint/filter_operations.h"
#include "components/viz/common/quads/draw_quad.h" #include "components/viz/common/quads/draw_quad.h"
@@ -43,7 +43,7 @@ class DrawQuad;
class CompositorRenderPass; class CompositorRenderPass;
class CompositorRenderPassDrawQuad; class CompositorRenderPassDrawQuad;
using CompositorRenderPassId = util::IdTypeU64<CompositorRenderPass>; using CompositorRenderPassId = base::IdTypeU64<CompositorRenderPass>;
// This class represents a render pass that is submitted from the UI or renderer // This class represents a render pass that is submitted from the UI or renderer
// compositor to viz. It is mojo-serializable and typically has a unique // compositor to viz. It is mojo-serializable and typically has a unique

@@ -12,7 +12,7 @@
#include "base/check_op.h" #include "base/check_op.h"
#include "base/containers/flat_set.h" #include "base/containers/flat_set.h"
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
namespace viz { namespace viz {
@@ -20,7 +20,7 @@ struct ResourceIdTypeMarker {};
// Note that if you need to generate new ResourceIds, please use // Note that if you need to generate new ResourceIds, please use
// ResourceIdGenerator below, since it will skip generating reserved ids. // ResourceIdGenerator below, since it will skip generating reserved ids.
using ResourceId = util::IdTypeU32<ResourceIdTypeMarker>; using ResourceId = base::IdTypeU32<ResourceIdTypeMarker>;
using ResourceIdSet = base::flat_set<ResourceId>; using ResourceIdSet = base::flat_set<ResourceId>;
constexpr ResourceId kInvalidResourceId(0); constexpr ResourceId kInvalidResourceId(0);
constexpr ResourceId kVizReservedRangeStartId( constexpr ResourceId kVizReservedRangeStartId(

@@ -270,8 +270,8 @@ source_set("browser") {
} }
public_deps = [ public_deps = [
"//base",
"//base/util/memory_pressure", "//base/util/memory_pressure",
"//base/util/type_safety",
"//ipc", "//ipc",
"//media/mojo/mojom:remoting", "//media/mojo/mojom:remoting",
"//third_party/blink/public/mojom:embedded_frame_sink_mojo_bindings", "//third_party/blink/public/mojom:embedded_frame_sink_mojo_bindings",

@@ -13,16 +13,16 @@
#include <vector> #include <vector>
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "url/gurl.h" #include "url/gurl.h"
namespace content { namespace content {
class SavePackage; class SavePackage;
using SavePackageId = util::IdType32<SavePackage>; using SavePackageId = base::IdType32<SavePackage>;
class SaveItem; class SaveItem;
using SaveItemId = util::IdType32<SaveItem>; using SaveItemId = base::IdType32<SaveItem>;
// Map from save_item_id into final file path. // Map from save_item_id into final file path.
using FinalNamesMap = using FinalNamesMap =

@@ -5,7 +5,7 @@
#ifndef CONTENT_BROWSER_ISOLATION_CONTEXT_H_ #ifndef CONTENT_BROWSER_ISOLATION_CONTEXT_H_
#define CONTENT_BROWSER_ISOLATION_CONTEXT_H_ #define CONTENT_BROWSER_ISOLATION_CONTEXT_H_
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "content/common/content_export.h" #include "content/common/content_export.h"
#include "content/public/browser/browser_or_resource_context.h" #include "content/public/browser/browser_or_resource_context.h"
#include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/abseil-cpp/absl/types/optional.h"
@@ -13,7 +13,7 @@
namespace content { namespace content {
class BrowsingInstance; class BrowsingInstance;
using BrowsingInstanceId = util::IdType32<BrowsingInstance>; using BrowsingInstanceId = base::IdType32<BrowsingInstance>;
// This class is used to specify the context in which process model decisions // This class is used to specify the context in which process model decisions
// need to be made. For example, dynamically added isolated origins only take // need to be made. For example, dynamically added isolated origins only take

@@ -194,7 +194,7 @@ class CONTENT_EXPORT FrameTree {
} }
PageDelegate* page_delegate() { return page_delegate_; } PageDelegate* page_delegate() { return page_delegate_; }
using RenderViewHostMapId = util::IdType32<class RenderViewHostMap>; using RenderViewHostMapId = base::IdType32<class RenderViewHostMap>;
using RenderViewHostMap = std::unordered_map<RenderViewHostMapId, using RenderViewHostMap = std::unordered_map<RenderViewHostMapId,
RenderViewHostImpl*, RenderViewHostImpl*,
RenderViewHostMapId::Hasher>; RenderViewHostMapId::Hasher>;

@@ -6,7 +6,7 @@
#define CONTENT_PUBLIC_BROWSER_PERMISSION_CONTROLLER_H_ #define CONTENT_PUBLIC_BROWSER_PERMISSION_CONTROLLER_H_
#include "base/supports_user_data.h" #include "base/supports_user_data.h"
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "content/common/content_export.h" #include "content/common/content_export.h"
#include "content/public/browser/permission_type.h" #include "content/public/browser/permission_type.h"
#include "third_party/blink/public/mojom/permissions/permission_status.mojom.h" #include "third_party/blink/public/mojom/permissions/permission_status.mojom.h"
@@ -24,7 +24,7 @@ class CONTENT_EXPORT PermissionController
// Identifier for an active subscription. This is intentionally a distinct // Identifier for an active subscription. This is intentionally a distinct
// type from PermissionControllerDelegate::SubscriptionId as the concrete // type from PermissionControllerDelegate::SubscriptionId as the concrete
// identifier values may be different. // identifier values may be different.
using SubscriptionId = util::IdType64<PermissionController>; using SubscriptionId = base::IdType64<PermissionController>;
~PermissionController() override {} ~PermissionController() override {}

@@ -5,7 +5,7 @@
#ifndef CONTENT_PUBLIC_BROWSER_PERMISSION_CONTROLLER_DELEGATE_H_ #ifndef CONTENT_PUBLIC_BROWSER_PERMISSION_CONTROLLER_DELEGATE_H_
#define CONTENT_PUBLIC_BROWSER_PERMISSION_CONTROLLER_DELEGATE_H_ #define CONTENT_PUBLIC_BROWSER_PERMISSION_CONTROLLER_DELEGATE_H_
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "content/common/content_export.h" #include "content/common/content_export.h"
#include "content/public/browser/devtools_permission_overrides.h" #include "content/public/browser/devtools_permission_overrides.h"
#include "third_party/blink/public/mojom/permissions/permission_status.mojom.h" #include "third_party/blink/public/mojom/permissions/permission_status.mojom.h"
@@ -21,7 +21,7 @@ class CONTENT_EXPORT PermissionControllerDelegate {
using PermissionOverrides = DevToolsPermissionOverrides::PermissionOverrides; using PermissionOverrides = DevToolsPermissionOverrides::PermissionOverrides;
// Identifier for an active subscription. // Identifier for an active subscription.
using SubscriptionId = util::IdType64<PermissionControllerDelegate>; using SubscriptionId = base::IdType64<PermissionControllerDelegate>;
virtual ~PermissionControllerDelegate() = default; virtual ~PermissionControllerDelegate() = default;

@@ -10,7 +10,7 @@
#include <string> #include <string>
#include "base/process/process_handle.h" #include "base/process/process_handle.h"
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "content/common/content_export.h" #include "content/common/content_export.h"
namespace content { namespace content {
@@ -22,7 +22,7 @@ struct CONTENT_EXPORT ServiceProcessIdTypeMarker {};
// An opaque ID type used to uniquely identify service process instances. This // An opaque ID type used to uniquely identify service process instances. This
// is separate from system PID. Values are never reused. // is separate from system PID. Values are never reused.
using ServiceProcessId = using ServiceProcessId =
util::IdType<internal::ServiceProcessIdTypeMarker, uint64_t, 0u>; base::IdType<internal::ServiceProcessIdTypeMarker, uint64_t, 0u>;
// Information about a running (or very recently running) service process. // Information about a running (or very recently running) service process.
struct CONTENT_EXPORT ServiceProcessInfo { struct CONTENT_EXPORT ServiceProcessInfo {

@@ -20,7 +20,7 @@ namespace device {
// be passed over mojo. The Ids should be directly exposable from blink if // be passed over mojo. The Ids should be directly exposable from blink if
// desired. // desired.
// Note that IdType must be constructable from a uint64_t, and should most often // Note that IdType must be constructable from a uint64_t, and should most often
// be a util::IdTypeU64 type. // be a base::IdTypeU64 type.
template <typename IdType> template <typename IdType>
class AddressToIdMap { class AddressToIdMap {
public: public:

@@ -7,8 +7,8 @@
#include <map> #include <map>
#include "base/types/id_type.h"
#include "base/types/pass_key.h" #include "base/types/pass_key.h"
#include "base/util/type_safety/id_type.h"
#include "device/vr/android/arcore/address_to_id_map.h" #include "device/vr/android/arcore/address_to_id_map.h"
#include "device/vr/android/arcore/arcore_plane_manager.h" #include "device/vr/android/arcore/arcore_plane_manager.h"
#include "device/vr/android/arcore/arcore_sdk.h" #include "device/vr/android/arcore/arcore_sdk.h"
@@ -20,7 +20,7 @@ namespace device {
class ArCoreImpl; class ArCoreImpl;
using AnchorId = util::IdTypeU64<class AnchorTag>; using AnchorId = base::IdTypeU64<class AnchorTag>;
class ArCoreAnchorManager { class ArCoreAnchorManager {
public: public:

@@ -8,7 +8,7 @@
#include "base/component_export.h" #include "base/component_export.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "device/vr/android/arcore/arcore.h" #include "device/vr/android/arcore/arcore.h"
#include "device/vr/android/arcore/arcore_anchor_manager.h" #include "device/vr/android/arcore/arcore_anchor_manager.h"
#include "device/vr/android/arcore/arcore_plane_manager.h" #include "device/vr/android/arcore/arcore_plane_manager.h"
@@ -22,7 +22,7 @@ namespace device {
class ArCorePlaneManager; class ArCorePlaneManager;
using AnchorId = util::IdTypeU64<class AnchorTag>; using AnchorId = base::IdTypeU64<class AnchorTag>;
class CreateAnchorRequest { class CreateAnchorRequest {
public: public:

@@ -7,8 +7,8 @@
#include <map> #include <map>
#include "base/types/id_type.h"
#include "base/types/pass_key.h" #include "base/types/pass_key.h"
#include "base/util/type_safety/id_type.h"
#include "device/vr/android/arcore/address_to_id_map.h" #include "device/vr/android/arcore/address_to_id_map.h"
#include "device/vr/android/arcore/arcore_sdk.h" #include "device/vr/android/arcore/arcore_sdk.h"
#include "device/vr/android/arcore/scoped_arcore_objects.h" #include "device/vr/android/arcore/scoped_arcore_objects.h"
@@ -20,7 +20,7 @@ namespace device {
class ArCoreImpl; class ArCoreImpl;
class ArCoreAnchorManager; class ArCoreAnchorManager;
using PlaneId = util::IdTypeU64<class PlaneTag>; using PlaneId = base::IdTypeU64<class PlaneTag>;
std::pair<gfx::Quaternion, gfx::Point3F> GetPositionAndOrientationFromArPose( std::pair<gfx::Quaternion, gfx::Point3F> GetPositionAndOrientationFromArPose(
const ArSession* session, const ArSession* session,

@@ -9,7 +9,7 @@
#include <vector> #include <vector>
#include "base/logging.h" #include "base/logging.h"
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "device/vr/openxr/openxr_defs.h" #include "device/vr/openxr/openxr_defs.h"
#include "device/vr/openxr/openxr_extension_helper.h" #include "device/vr/openxr/openxr_extension_helper.h"
#include "third_party/openxr/src/include/openxr/openxr.h" #include "third_party/openxr/src/include/openxr/openxr.h"
@@ -17,7 +17,7 @@
#include "ui/gfx/transform.h" #include "ui/gfx/transform.h"
#include "ui/gfx/transform_util.h" #include "ui/gfx/transform_util.h"
using AnchorId = util::IdTypeU64<class AnchorTag>; using AnchorId = base::IdTypeU64<class AnchorTag>;
constexpr AnchorId kInvalidAnchorId; constexpr AnchorId kInvalidAnchorId;
namespace device { namespace device {

@@ -9,7 +9,7 @@
namespace device { namespace device {
using HitTestSubscriptionId = util::IdTypeU64<class HitTestSubscriptionTag>; using HitTestSubscriptionId = base::IdTypeU64<class HitTestSubscriptionTag>;
struct COMPONENT_EXPORT(DEVICE_VR_UTIL) HitTestSubscriptionData { struct COMPONENT_EXPORT(DEVICE_VR_UTIL) HitTestSubscriptionData {
mojom::XRNativeOriginInformationPtr native_origin_information; mojom::XRNativeOriginInformationPtr native_origin_information;

@@ -5,7 +5,7 @@
#ifndef EXTENSIONS_COMMON_API_DECLARATIVE_NET_REQUEST_CONSTANTS_H_ #ifndef EXTENSIONS_COMMON_API_DECLARATIVE_NET_REQUEST_CONSTANTS_H_
#define EXTENSIONS_COMMON_API_DECLARATIVE_NET_REQUEST_CONSTANTS_H_ #define EXTENSIONS_COMMON_API_DECLARATIVE_NET_REQUEST_CONSTANTS_H_
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
namespace extensions { namespace extensions {
namespace declarative_net_request { namespace declarative_net_request {
@@ -23,7 +23,7 @@ constexpr int kMinValidID = 1;
constexpr int kMinValidPriority = 1; constexpr int kMinValidPriority = 1;
using RulesetID = using RulesetID =
::util::IdType<class RulesetIDTag, int, -2 /* invalid value */>; ::base::IdType<class RulesetIDTag, int, -2 /* invalid value */>;
constexpr RulesetID kMinValidStaticRulesetID(1); constexpr RulesetID kMinValidStaticRulesetID(1);
constexpr RulesetID kDynamicRulesetID(0); constexpr RulesetID kDynamicRulesetID(0);

@@ -62,7 +62,6 @@ source_set("common_base_sources") {
public_deps = [ public_deps = [
":mailbox", ":mailbox",
"//base", "//base",
"//base/util/type_safety",
] ]
configs += [ "//gpu:gpu_implementation" ] configs += [ "//gpu:gpu_implementation" ]
} }
@@ -112,7 +111,7 @@ source_set("common_sources") {
public_deps = [ public_deps = [
":common_base_sources", ":common_base_sources",
":mailbox", ":mailbox",
"//base/util/type_safety", "//base",
"//mojo/public/cpp/system", "//mojo/public/cpp/system",
"//ui/gfx:memory_buffer", "//ui/gfx:memory_buffer",
"//ui/gfx/geometry", "//ui/gfx/geometry",

@@ -5,12 +5,12 @@
#ifndef GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_ID_H_ #ifndef GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_ID_H_
#define GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_ID_H_ #define GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_ID_H_
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
namespace gpu { namespace gpu {
class CommandBuffer; class CommandBuffer;
using CommandBufferId = util::IdTypeU64<CommandBuffer>; using CommandBufferId = base::IdTypeU64<CommandBuffer>;
} // namespace gpu } // namespace gpu

@@ -6,7 +6,7 @@
#define GPU_COMMAND_BUFFER_COMMON_DISCARDABLE_HANDLE_H_ #define GPU_COMMAND_BUFFER_COMMON_DISCARDABLE_HANDLE_H_
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "gpu/gpu_export.h" #include "gpu/gpu_export.h"
namespace gpu { namespace gpu {
@@ -83,7 +83,7 @@ class GPU_EXPORT DiscardableHandleBase {
// handle (via the constructor), and can Lock an existing handle. // handle (via the constructor), and can Lock an existing handle.
class GPU_EXPORT ClientDiscardableHandle : public DiscardableHandleBase { class GPU_EXPORT ClientDiscardableHandle : public DiscardableHandleBase {
public: public:
using Id = util::IdType32<ClientDiscardableHandle>; using Id = base::IdType32<ClientDiscardableHandle>;
ClientDiscardableHandle(); // Constructs an invalid handle. ClientDiscardableHandle(); // Constructs an invalid handle.
ClientDiscardableHandle(scoped_refptr<Buffer> buffer, ClientDiscardableHandle(scoped_refptr<Buffer> buffer,

@@ -75,7 +75,7 @@ target(link_target_type, "service_sources") {
] ]
public_deps = [ public_deps = [
"//base/util/type_safety", "//base",
"//gpu/command_buffer/common:common_sources", "//gpu/command_buffer/common:common_sources",
"//url:url", "//url:url",
] ]
@@ -297,7 +297,7 @@ target(link_target_type, "gles2_sources") {
include_dirs = [ "//third_party/mesa_headers" ] include_dirs = [ "//third_party/mesa_headers" ]
public_deps = [ public_deps = [
"//base/util/type_safety", "//base",
"//cc/paint", "//cc/paint",
"//gpu/command_buffer/common", "//gpu/command_buffer/common",
"//gpu/command_buffer/common:gles2_sources", "//gpu/command_buffer/common:gles2_sources",

@@ -5,12 +5,12 @@
#ifndef GPU_COMMAND_BUFFER_SERVICE_SEQUENCE_ID_H_ #ifndef GPU_COMMAND_BUFFER_SERVICE_SEQUENCE_ID_H_
#define GPU_COMMAND_BUFFER_SERVICE_SEQUENCE_ID_H_ #define GPU_COMMAND_BUFFER_SERVICE_SEQUENCE_ID_H_
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
namespace gpu { namespace gpu {
class SyncPointOrderData; class SyncPointOrderData;
using SequenceId = util::IdTypeU32<SyncPointOrderData>; using SequenceId = base::IdTypeU32<SyncPointOrderData>;
} // namespace gpu } // namespace gpu

@@ -105,7 +105,6 @@ if (enable_vulkan) {
deps = [ deps = [
":buildflags", ":buildflags",
"//base", "//base",
"//base/util/type_safety",
"//build:chromeos_buildflags", "//build:chromeos_buildflags",
"//components/crash/core/common:crash_key", "//components/crash/core/common:crash_key",
"//gpu/ipc/common:vulkan_ycbcr_info", "//gpu/ipc/common:vulkan_ycbcr_info",

@@ -27,7 +27,7 @@ component("win32") {
public_configs = [ ":vulkan_win32" ] public_configs = [ ":vulkan_win32" ]
deps = [ deps = [
"//base/util/type_safety", "//base",
"//ui/gfx", "//ui/gfx",
] ]

@@ -90,7 +90,7 @@ component("ipc") {
":mojom", ":mojom",
":native_handle_type_converters", ":native_handle_type_converters",
":param_traits", ":param_traits",
"//base/util/type_safety", "//base",
"//mojo/public/cpp/base", "//mojo/public/cpp/base",
"//mojo/public/cpp/bindings", "//mojo/public/cpp/bindings",
"//mojo/public/cpp/system", "//mojo/public/cpp/system",

@@ -31,7 +31,7 @@
#include "base/memory/writable_shared_memory_region.h" #include "base/memory/writable_shared_memory_region.h"
#include "base/numerics/safe_conversions.h" #include "base/numerics/safe_conversions.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "ipc/ipc_param_traits.h" #include "ipc/ipc_param_traits.h"
#include "ipc/ipc_sync_message.h" #include "ipc/ipc_sync_message.h"
@@ -1063,8 +1063,8 @@ struct ParamTraits<absl::optional<P>> {
// base/util types ParamTraits // base/util types ParamTraits
template <typename TypeMarker, typename WrappedType, WrappedType kInvalidValue> template <typename TypeMarker, typename WrappedType, WrappedType kInvalidValue>
struct ParamTraits<util::IdType<TypeMarker, WrappedType, kInvalidValue>> { struct ParamTraits<base::IdType<TypeMarker, WrappedType, kInvalidValue>> {
using param_type = util::IdType<TypeMarker, WrappedType, kInvalidValue>; using param_type = base::IdType<TypeMarker, WrappedType, kInvalidValue>;
static void Write(base::Pickle* m, const param_type& p) { static void Write(base::Pickle* m, const param_type& p) {
WriteParam(m, p.GetUnsafeValue()); WriteParam(m, p.GetUnsafeValue());
} }

@@ -84,7 +84,7 @@ source_set("filters") {
] ]
deps = [ deps = [
"//base/util/type_safety:type_safety", "//base",
"//build:chromeos_buildflags", "//build:chromeos_buildflags",
"//cc/base", # For MathUtil. "//cc/base", # For MathUtil.
"//media:media_buildflags", "//media:media_buildflags",

@@ -236,7 +236,6 @@ component("bindings") {
":bindings_base", ":bindings_base",
":struct_traits", ":struct_traits",
"//base", "//base",
"//base/util/type_safety",
"//ipc:message_support", "//ipc:message_support",
"//ipc:param_traits", "//ipc:param_traits",
"//mojo/public/cpp/system", "//mojo/public/cpp/system",

@@ -15,7 +15,7 @@
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/scoped_refptr.h" #include "base/memory/scoped_refptr.h"
#include "base/sequenced_task_runner.h" #include "base/sequenced_task_runner.h"
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "mojo/public/cpp/bindings/associated_remote.h" #include "mojo/public/cpp/bindings/associated_remote.h"
#include "mojo/public/cpp/bindings/pending_associated_remote.h" #include "mojo/public/cpp/bindings/pending_associated_remote.h"
#include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/pending_remote.h"
@@ -27,7 +27,7 @@ namespace internal {
struct RemoteSetElementIdTypeTag {}; struct RemoteSetElementIdTypeTag {};
} // namespace internal } // namespace internal
using RemoteSetElementId = util::IdTypeU32<internal::RemoteSetElementIdTypeTag>; using RemoteSetElementId = base::IdTypeU32<internal::RemoteSetElementIdTypeTag>;
// Shared implementation of a set of remotes, used by both RemoteSet and // Shared implementation of a set of remotes, used by both RemoteSet and
// AssociatedRemoteSet aliases (see below). // AssociatedRemoteSet aliases (see below).

@@ -1644,7 +1644,6 @@ source_set("net_deps") {
":preload_decoder", ":preload_decoder",
"//base", "//base",
"//base/third_party/dynamic_annotations", "//base/third_party/dynamic_annotations",
"//base/util/type_safety:type_safety",
"//net/base/registry_controlled_domains", "//net/base/registry_controlled_domains",
"//third_party/protobuf:protobuf_lite", "//third_party/protobuf:protobuf_lite",
"//third_party/zlib", "//third_party/zlib",

@@ -19,7 +19,7 @@
#include "base/sequence_checker.h" #include "base/sequence_checker.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "base/timer/timer.h" #include "base/timer/timer.h"
#include "base/util/type_safety/id_type.h" #include "base/types/id_type.h"
#include "components/services/storage/public/cpp/buckets/bucket_id.h" #include "components/services/storage/public/cpp/buckets/bucket_id.h"
#include "components/services/storage/public/cpp/buckets/bucket_info.h" #include "components/services/storage/public/cpp/buckets/bucket_info.h"
#include "components/services/storage/public/cpp/quota_error_or.h" #include "components/services/storage/public/cpp/quota_error_or.h"

@@ -6,15 +6,15 @@
#include <algorithm> #include <algorithm>
#include "base/types/token_type.h"
#include "base/unguessable_token.h" #include "base/unguessable_token.h"
#include "base/util/type_safety/token_type.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
namespace blink { namespace blink {
using FooToken = util::TokenType<class FooTokenTag>; using FooToken = base::TokenType<class FooTokenTag>;
using BarToken = util::TokenType<class BarTokenTag>; using BarToken = base::TokenType<class BarTokenTag>;
using BazToken = util::TokenType<class BazTokenTag>; using BazToken = base::TokenType<class BazTokenTag>;
// Test MultiTokenVariantCount. // Test MultiTokenVariantCount.
static_assert(internal::MultiTokenVariantCount<FooToken, BarToken>::kValue == 2, static_assert(internal::MultiTokenVariantCount<FooToken, BarToken>::kValue == 2,

@@ -3,7 +3,7 @@
## Overview ## Overview
This directory contains strongly-typed wrappers (using This directory contains strongly-typed wrappers (using
[`util::TokenType<...>`](/base/util/type_safety/token_type.h)) of [`base::TokenType<...>`](/base/types/token_type.h)) of
[`base::UnguessableToken`](/base/unguessable_token.h) [`base::UnguessableToken`](/base/unguessable_token.h)
for tokens that are commonly passed between browsers and renderers. The strong for tokens that are commonly passed between browsers and renderers. The strong
typing is to prevent type confusion as these tokens are passed around. To support typing is to prevent type confusion as these tokens are passed around. To support

@@ -18,7 +18,7 @@
namespace blink { namespace blink {
// Defines MultiToken, which is effectively a variant over 2 or more // Defines MultiToken, which is effectively a variant over 2 or more
// instances of util::TokenType. // instances of base::TokenType.
// //
// A MultiToken<..> emulates a token like interface. When default constructed // A MultiToken<..> emulates a token like interface. When default constructed
// it will construct itself as an instance of |TokenVariant0|. Additionally it // it will construct itself as an instance of |TokenVariant0|. Additionally it
@@ -34,7 +34,7 @@ namespace blink {
// //
// A variant must have at least 2 valid input types, but can have arbitrarily // A variant must have at least 2 valid input types, but can have arbitrarily
// many. They must all be distinct, and they must all be instances of // many. They must all be distinct, and they must all be instances of
// util::TokenType. // base::TokenType.
template <typename TokenVariant0, template <typename TokenVariant0,
typename TokenVariant1, typename TokenVariant1,
typename... TokenVariants> typename... TokenVariants>

@@ -12,8 +12,8 @@
#include <cstring> #include <cstring>
#include <type_traits> #include <type_traits>
#include "base/types/token_type.h"
#include "base/unguessable_token.h" #include "base/unguessable_token.h"
#include "base/util/type_safety/token_type.h"
namespace blink { namespace blink {
@@ -46,7 +46,7 @@ struct MultiTokenVariantCount<> {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// MultiTokenVariantIsTokenType // MultiTokenVariantIsTokenType
// //
// Ensures if a QueryType is a a util::TokenType<>. // Ensures if a QueryType is a a base::TokenType<>.
// Default case. // Default case.
template <typename QueryType> template <typename QueryType>
@@ -54,9 +54,9 @@ struct MultiTokenVariantIsTokenType {
static constexpr bool kValue = false; static constexpr bool kValue = false;
}; };
// Specialization for util::TokenType<>. // Specialization for base::TokenType<>.
template <typename TokenTypeTag> template <typename TokenTypeTag>
struct MultiTokenVariantIsTokenType<::util::TokenType<TokenTypeTag>> { struct MultiTokenVariantIsTokenType<::base::TokenType<TokenTypeTag>> {
static constexpr bool kValue = true; static constexpr bool kValue = true;
// We expect an identical layout, which allows us to reinterpret_cast between // We expect an identical layout, which allows us to reinterpret_cast between
@@ -64,19 +64,19 @@ struct MultiTokenVariantIsTokenType<::util::TokenType<TokenTypeTag>> {
// we can check whether or not the compiler is sane (and if the behaviour is // we can check whether or not the compiler is sane (and if the behaviour is
// safe) at compile-time. // safe) at compile-time.
static_assert( static_assert(
sizeof(::util::TokenType<TokenTypeTag>) == sizeof(::base::TokenType<TokenTypeTag>) ==
sizeof(::base::UnguessableToken), sizeof(::base::UnguessableToken),
"util::TokenType must have the same sizeof as base::UnguessableToken"); "base::TokenType must have the same sizeof as base::UnguessableToken");
static_assert( static_assert(
alignof(::util::TokenType<TokenTypeTag>) == alignof(::base::TokenType<TokenTypeTag>) ==
alignof(::base::UnguessableToken), alignof(::base::UnguessableToken),
"util::TokenType must have the same alignof as base::UnguessableToken"); "base::TokenType must have the same alignof as base::UnguessableToken");
}; };
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// MultiTokenAllVariantsAreTokenType // MultiTokenAllVariantsAreTokenType
// //
// Ensures that all variants are of type util::TokenType. // Ensures that all variants are of type base::TokenType.
template <typename... VariantTypes> template <typename... VariantTypes>
struct MultiTokenAllVariantsAreTokenType; struct MultiTokenAllVariantsAreTokenType;
@@ -187,11 +187,11 @@ class MultiTokenBase {
using AnyRepeated = internal::MultiTokenAnyTypeRepeated<TokenVariants...>; using AnyRepeated = internal::MultiTokenAnyTypeRepeated<TokenVariants...>;
static_assert(!AnyRepeated::kValue, "input types must not be repeated"); static_assert(!AnyRepeated::kValue, "input types must not be repeated");
// Ensures that all variants are instances of util::TokenType. // Ensures that all variants are instances of base::TokenType.
using AllVariantsAreTokenType = using AllVariantsAreTokenType =
internal::MultiTokenAllVariantsAreTokenType<TokenVariants...>; internal::MultiTokenAllVariantsAreTokenType<TokenVariants...>;
static_assert(AllVariantsAreTokenType::kValue, static_assert(AllVariantsAreTokenType::kValue,
"input types must be instances of util::TokenType"); "input types must be instances of base::TokenType");
// Counts the number of variants. // Counts the number of variants.
using VariantCount = internal::MultiTokenVariantCount<TokenVariants...>; using VariantCount = internal::MultiTokenVariantCount<TokenVariants...>;

@@ -11,7 +11,7 @@ namespace blink {
// Defines Mojo StructTraits that convert between the given |MojomDataViewType| // Defines Mojo StructTraits that convert between the given |MojomDataViewType|
// and the given |TokenType|. It is assumed that TokenType is an instance of // and the given |TokenType|. It is assumed that TokenType is an instance of
// util::TokenType<...> and that MojomDataViewType is a simple mojom struct // base::TokenType<...> and that MojomDataViewType is a simple mojom struct
// containing only a "base.mojom.UnguessableToken value" field. // containing only a "base.mojom.UnguessableToken value" field.
template <typename MojomDataViewType, typename TokenType> template <typename MojomDataViewType, typename TokenType>
struct TokenMojomTraitsHelper { struct TokenMojomTraitsHelper {

@@ -5,7 +5,7 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_TOKENS_TOKENS_H_ #ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_TOKENS_TOKENS_H_
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_TOKENS_TOKENS_H_ #define THIRD_PARTY_BLINK_PUBLIC_COMMON_TOKENS_TOKENS_H_
#include "base/util/type_safety/token_type.h" #include "base/types/token_type.h"
#include "third_party/blink/public/common/tokens/multi_token.h" #include "third_party/blink/public/common/tokens/multi_token.h"
namespace blink { namespace blink {
@@ -26,14 +26,14 @@ namespace blink {
// Uniquely identifies a blink::LocalFrame / blink::WebLocalFrame / // Uniquely identifies a blink::LocalFrame / blink::WebLocalFrame /
// content::RenderFrame in a renderer process, and its content::RenderFrameHost // content::RenderFrame in a renderer process, and its content::RenderFrameHost
// counterpart in the browser. // counterpart in the browser.
using LocalFrameToken = util::TokenType<class LocalFrameTokenTypeMarker>; using LocalFrameToken = base::TokenType<class LocalFrameTokenTypeMarker>;
// Uniquely identifies a blink::RemoteFrame / blink::WebRemoteFrame / // Uniquely identifies a blink::RemoteFrame / blink::WebRemoteFrame /
// content::RenderFrameProxy in a renderer process, and its // content::RenderFrameProxy in a renderer process, and its
// content::RenderFrameProxyHost counterpart in the browser. There can be // content::RenderFrameProxyHost counterpart in the browser. There can be
// multiple RemoteFrames corresponding to a single LocalFrame, and each token // multiple RemoteFrames corresponding to a single LocalFrame, and each token
// will be distinct. // will be distinct.
using RemoteFrameToken = util::TokenType<class RemoteFrameTokenTypeMarker>; using RemoteFrameToken = base::TokenType<class RemoteFrameTokenTypeMarker>;
// Can represent either type of FrameToken. // Can represent either type of FrameToken.
using FrameToken = MultiToken<LocalFrameToken, RemoteFrameToken>; using FrameToken = MultiToken<LocalFrameToken, RemoteFrameToken>;
@@ -44,15 +44,15 @@ using FrameToken = MultiToken<LocalFrameToken, RemoteFrameToken>;
// Identifies a blink::DedicatedWorkerGlobalScope in the renderer and a // Identifies a blink::DedicatedWorkerGlobalScope in the renderer and a
// content::DedicatedWorkerHost in the browser. // content::DedicatedWorkerHost in the browser.
using DedicatedWorkerToken = using DedicatedWorkerToken =
util::TokenType<class DedicatedWorkerTokenTypeMarker>; base::TokenType<class DedicatedWorkerTokenTypeMarker>;
// Identifies a blink::ServiceWorkerGlobalScope in the renderer and a // Identifies a blink::ServiceWorkerGlobalScope in the renderer and a
// content::ServiceWorkerVersion in the browser. // content::ServiceWorkerVersion in the browser.
using ServiceWorkerToken = util::TokenType<class ServiceWorkerTokenTypeMarker>; using ServiceWorkerToken = base::TokenType<class ServiceWorkerTokenTypeMarker>;
// Identifies a blink::SharedWorkerGlobalScope in the renderer and a // Identifies a blink::SharedWorkerGlobalScope in the renderer and a
// content::SharedWorkerHost in the browser. // content::SharedWorkerHost in the browser.
using SharedWorkerToken = util::TokenType<class SharedWorkerTokenTypeMarker>; using SharedWorkerToken = base::TokenType<class SharedWorkerTokenTypeMarker>;
// Can represent any type of WorkerToken. // Can represent any type of WorkerToken.
using WorkerToken = using WorkerToken =
@@ -63,16 +63,16 @@ using WorkerToken =
// Identifies an animation worklet. // Identifies an animation worklet.
using AnimationWorkletToken = using AnimationWorkletToken =
util::TokenType<class AnimationWorkletTokenTypeMarker>; base::TokenType<class AnimationWorkletTokenTypeMarker>;
// Identifies an audio worklet. // Identifies an audio worklet.
using AudioWorkletToken = util::TokenType<class AudioWorkletTokenTypeMarker>; using AudioWorkletToken = base::TokenType<class AudioWorkletTokenTypeMarker>;
// Identifies a layout worklet. // Identifies a layout worklet.
using LayoutWorkletToken = util::TokenType<class LayoutWorkletTokenTypeMarker>; using LayoutWorkletToken = base::TokenType<class LayoutWorkletTokenTypeMarker>;
// Identifies a paint worklet. // Identifies a paint worklet.
using PaintWorkletToken = util::TokenType<class PaintWorkletTokenTypeMarker>; using PaintWorkletToken = base::TokenType<class PaintWorkletTokenTypeMarker>;
// Can represent any type of WorkletToken. // Can represent any type of WorkletToken.
using WorkletToken = MultiToken<AnimationWorkletToken, using WorkletToken = MultiToken<AnimationWorkletToken,
@@ -102,10 +102,10 @@ using ExecutionContextToken = MultiToken<LocalFrameToken,
// Identifies a blink::PortalContents / blink::HTMLPortalElement in the // Identifies a blink::PortalContents / blink::HTMLPortalElement in the
// renderer process, and a content::Portal in the browser process. // renderer process, and a content::Portal in the browser process.
using PortalToken = util::TokenType<class PortalTokenTypeMarker>; using PortalToken = base::TokenType<class PortalTokenTypeMarker>;
// Identifies a v8::Context / blink::ScriptState. // Identifies a v8::Context / blink::ScriptState.
using V8ContextToken = util::TokenType<class V8ContextTokenTypeMarker>; using V8ContextToken = base::TokenType<class V8ContextTokenTypeMarker>;
} // namespace blink } // namespace blink

@@ -20,7 +20,7 @@ executable("ipc_fuzzer") {
"rand_util.h", "rand_util.h",
] ]
deps = [ deps = [
"//base/util/type_safety", "//base",
"//components/viz/common", "//components/viz/common",
"//printing/mojom:mojom_shared_cpp_sources", "//printing/mojom:mojom_shared_cpp_sources",
"//services/device/public/mojom:mojom_headers", "//services/device/public/mojom:mojom_headers",

@@ -14,8 +14,8 @@
#include "base/cxx17_backports.h" #include "base/cxx17_backports.h"
#include "base/memory/ptr_util.h" #include "base/memory/ptr_util.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "base/types/id_type.h"
#include "base/unguessable_token.h" #include "base/unguessable_token.h"
#include "base/util/type_safety/id_type.h"
#include "base/values.h" #include "base/values.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "components/content_settings/core/common/content_settings_pattern.h" #include "components/content_settings/core/common/content_settings_pattern.h"
@@ -1029,8 +1029,8 @@ struct FuzzTraits<gfx::Vector2dF> {
}; };
template <typename TypeMarker, typename WrappedType, WrappedType kInvalidValue> template <typename TypeMarker, typename WrappedType, WrappedType kInvalidValue>
struct FuzzTraits<util::IdType<TypeMarker, WrappedType, kInvalidValue>> { struct FuzzTraits<base::IdType<TypeMarker, WrappedType, kInvalidValue>> {
using param_type = util::IdType<TypeMarker, WrappedType, kInvalidValue>; using param_type = base::IdType<TypeMarker, WrappedType, kInvalidValue>;
static bool Fuzz(param_type* id, Fuzzer* fuzzer) { static bool Fuzz(param_type* id, Fuzzer* fuzzer) {
WrappedType raw_value = id->GetUnsafeValue(); WrappedType raw_value = id->GetUnsafeValue();
if (!FuzzParam(&raw_value, fuzzer)) if (!FuzzParam(&raw_value, fuzzer))

@@ -442,10 +442,10 @@ component("base") {
deps = [ deps = [
":locales_list", ":locales_list",
"//base",
"//base:base_static", "//base:base_static",
"//base:i18n", "//base:i18n",
"//base/third_party/dynamic_annotations", "//base/third_party/dynamic_annotations",
"//base/util/type_safety:type_safety",
"//build:chromeos_buildflags", "//build:chromeos_buildflags",
"//net", "//net",
"//third_party/brotli:dec", "//third_party/brotli:dec",