0

Move StrongAlias and PassKey to base/types/ due to widespread value.

Bug: none
Change-Id: Idb6a5aef372726171389074bf216ef9000e715f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2533285
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Darin Fisher <darin@chromium.org>
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#828887}
This commit is contained in:
Peter Kasting
2020-11-18 21:06:53 +00:00
committed by Commit Bot
parent fafd3075a6
commit 796cde2c63
215 changed files with 652 additions and 660 deletions
base
chrome
components
content
device/vr/android/arcore
docs/patterns
extensions
gpu
ipc
media
net/log
services/network
storage/browser/file_system
styleguide/c++
third_party/blink
public
renderer
DEPS
core
modules
platform
tools
blinkpy
tools/ipc_fuzzer/fuzzer
ui

@ -795,6 +795,8 @@ component("base") {
"trace_event/trace_id_helper.h",
"traits_bag.h",
"tuple.h",
"types/pass_key.h",
"types/strong_alias.h",
"unguessable_token.cc",
"unguessable_token.h",
"updateable_sequenced_task_runner.h",
@ -3009,6 +3011,8 @@ test("base_unittests") {
"tools_sanity_unittest.cc",
"traits_bag_unittest.cc",
"tuple_unittest.cc",
"types/pass_key_unittest.cc",
"types/strong_alias_unittest.cc",
"unguessable_token_unittest.cc",
"value_iterators_unittest.cc",
"values_unittest.cc",
@ -3502,6 +3506,7 @@ if (enable_nocompile_tests) {
"task/task_traits_unittest.nc",
"thread_annotations_unittest.nc",
"traits_bag_unittest.nc",
"types/pass_key_unittest.nc",
]
deps = [

5
base/types/DEPS Normal file

@ -0,0 +1,5 @@
include_rules = [
"-base",
"+base/types",
"-third_party",
]

2
base/types/OWNERS Normal file

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

@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BASE_UTIL_TYPE_SAFETY_PASS_KEY_H_
#define BASE_UTIL_TYPE_SAFETY_PASS_KEY_H_
#ifndef BASE_TYPES_PASS_KEY_H_
#define BASE_TYPES_PASS_KEY_H_
namespace util {
namespace base {
// util::PassKey can be used to restrict access to functions to an authorized
// base::PassKey can be used to restrict access to functions to an authorized
// caller. The primary use case is restricting the construction of an object in
// situations where the constructor needs to be public, which may be the case
// if the object must be constructed through a helper function, such as
@ -17,12 +17,12 @@ namespace util {
//
// class Foo {
// public:
// Foo(util::PassKey<Manager>);
// Foo(base::PassKey<Manager>);
// };
//
// class Manager {
// public:
// using PassKey = util::PassKey<Manager>;
// using PassKey = base::PassKey<Manager>;
// Manager() : foo_(blink::MakeGarbageCollected<Foo>(PassKey())) {}
// void Trace(blink::Visitor* visitor) const { visitor->Trace(foo_); }
// Foo* GetFooSingleton() { foo_; }
@ -32,7 +32,7 @@ namespace util {
// };
//
// In the above example, the 'Foo' constructor requires an instance of
// util::PassKey<Manager>. Only Manager is allowed to create such instances,
// base::PassKey<Manager>. Only Manager is allowed to create such instances,
// making the constructor unusable elsewhere.
template <typename T>
class PassKey {
@ -43,6 +43,6 @@ class PassKey {
friend T;
};
} // namespace util
} // namespace base
#endif // BASE_UTIL_TYPE_SAFETY_PASS_KEY_H_
#endif // BASE_TYPES_PASS_KEY_H_

@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include <utility>
#include "testing/gtest/include/gtest/gtest.h"
namespace util {
namespace base {
namespace {
class Manager;
@ -16,7 +16,7 @@ class Manager;
// May not be created without a PassKey.
class Restricted {
public:
Restricted(util::PassKey<Manager>) {}
Restricted(base::PassKey<Manager>) {}
};
class Manager {
@ -24,7 +24,7 @@ class Manager {
enum class ExplicitConstruction { kTag };
enum class UniformInitialization { kTag };
Manager(ExplicitConstruction) : restricted_(util::PassKey<Manager>()) {}
Manager(ExplicitConstruction) : restricted_(base::PassKey<Manager>()) {}
Manager(UniformInitialization) : restricted_({}) {}
private:
@ -43,4 +43,4 @@ TEST(PassKeyTest, UniformInitialization) {
}
} // namespace
} // namespace util
} // namespace base

@ -5,27 +5,27 @@
// This is a no-compile test suite.
// http://dev.chromium.org/developers/testing/no-compile-tests
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
namespace util {
namespace base {
class Manager;
// May not be created without a PassKey.
class Restricted {
public:
Restricted(util::PassKey<Manager>) {}
Restricted(base::PassKey<Manager>) {}
};
int Secret(util::PassKey<Manager>) {
int Secret(base::PassKey<Manager>) {
return 1;
}
#if defined(NCTEST_UNAUTHORIZED_PASS_KEY_IN_INITIALIZER) // [r"fatal error: calling a private constructor of class 'util::PassKey<util::Manager>'"]
#if defined(NCTEST_UNAUTHORIZED_PASS_KEY_IN_INITIALIZER) // [r"fatal error: calling a private constructor of class 'base::PassKey<base::Manager>'"]
class NotAManager {
public:
NotAManager() : restricted_(util::PassKey<Manager>()) {}
NotAManager() : restricted_(base::PassKey<Manager>()) {}
private:
Restricted restricted_;
@ -35,7 +35,7 @@ void WillNotCompile() {
NotAManager not_a_manager;
}
#elif defined(NCTEST_UNAUTHORIZED_UNIFORM_INITIALIZED_PASS_KEY_IN_INITIALIZER) // [r"fatal error: calling a private constructor of class 'util::PassKey<util::Manager>'"]
#elif defined(NCTEST_UNAUTHORIZED_UNIFORM_INITIALIZED_PASS_KEY_IN_INITIALIZER) // [r"fatal error: calling a private constructor of class 'base::PassKey<base::Manager>'"]
class NotAManager {
public:
@ -49,25 +49,25 @@ void WillNotCompile() {
NotAManager not_a_manager;
}
#elif defined(NCTEST_UNAUTHORIZED_PASS_KEY_IN_FUNCTION) // [r"fatal error: calling a private constructor of class 'util::PassKey<util::Manager>'"]
#elif defined(NCTEST_UNAUTHORIZED_PASS_KEY_IN_FUNCTION) // [r"fatal error: calling a private constructor of class 'base::PassKey<base::Manager>'"]
int WillNotCompile() {
return Secret(util::PassKey<Manager>());
return Secret(base::PassKey<Manager>());
}
#elif defined(NCTEST_UNAUTHORIZED_UNIFORM_INITIALIZATION_WITH_DEDUCED_PASS_KEY_TYPE) // [r"fatal error: calling a private constructor of class 'util::PassKey<util::Manager>'"]
#elif defined(NCTEST_UNAUTHORIZED_UNIFORM_INITIALIZATION_WITH_DEDUCED_PASS_KEY_TYPE) // [r"fatal error: calling a private constructor of class 'base::PassKey<base::Manager>'"]
int WillNotCompile() {
return Secret({});
}
#elif defined(NCTEST_UNAUTHORIZED_UNIFORM_INITIALIZATION) // [r"fatal error: calling a private constructor of class 'util::PassKey<util::Manager>'"]
#elif defined(NCTEST_UNAUTHORIZED_UNIFORM_INITIALIZATION) // [r"fatal error: calling a private constructor of class 'base::PassKey<base::Manager>'"]
int WillNotCompile() {
util::PassKey<Manager> key {};
base::PassKey<Manager> key {};
return Secret(key);
}
#endif
} // namespace util
} // namespace base

@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BASE_UTIL_TYPE_SAFETY_STRONG_ALIAS_H_
#define BASE_UTIL_TYPE_SAFETY_STRONG_ALIAS_H_
#ifndef BASE_TYPES_STRONG_ALIAS_H_
#define BASE_TYPES_STRONG_ALIAS_H_
#include <ostream>
#include <utility>
namespace util {
namespace base {
// A type-safe alternative for a typedef or a 'using' directive.
//
@ -119,6 +119,6 @@ std::ostream& operator<<(std::ostream& stream,
return stream << alias.value();
}
} // namespace util
} // namespace base
#endif // BASE_UTIL_TYPE_SAFETY_STRONG_ALIAS_H_
#endif // BASE_TYPES_STRONG_ALIAS_H_

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include <cstdint>
#include <map>
@ -15,7 +15,7 @@
#include "testing/gtest/include/gtest/gtest.h"
namespace util {
namespace base {
namespace {
@ -317,4 +317,4 @@ TEST(StrongAliasTest, EnsureConstexpr) {
static_assert(kOne >= kZero, "");
}
} // namespace util
} // namespace base

@ -2,16 +2,12 @@
# 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",
"pass_key.h",
"strong_alias.h",
"token_type.h",
]
@ -22,8 +18,6 @@ source_set("tests") {
testonly = true
sources = [
"id_type_unittest.cc",
"pass_key_unittest.cc",
"strong_alias_unittest.cc",
"token_type_unittest.cc",
]
@ -32,16 +26,3 @@ source_set("tests") {
"//testing/gtest",
]
}
if (enable_nocompile_tests) {
nocompile_test("type_safety_nocompile_tests") {
sources = [ "pass_key_unittest.nc" ]
deps = [
":type_safety",
"//base:base_unittests_tasktraits",
"//base/test:run_all_unittests",
"//testing/gtest",
]
}
}

@ -1,5 +1,6 @@
include_rules = [
"-base",
"+base/types",
"+base/unguessable_token.h",
"+base/util/type_safety",
"-third_party",

@ -8,7 +8,7 @@
#include <cstdint>
#include <type_traits>
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
namespace util {
@ -51,7 +51,7 @@ template <typename TypeMarker,
typename WrappedType,
WrappedType kInvalidValue,
WrappedType kFirstGeneratedId = kInvalidValue + 1>
class IdType : public StrongAlias<TypeMarker, WrappedType> {
class IdType : public base::StrongAlias<TypeMarker, WrappedType> {
public:
static_assert(
std::is_unsigned<WrappedType>::value || kInvalidValue <= 0,
@ -67,7 +67,7 @@ class IdType : public StrongAlias<TypeMarker, WrappedType> {
"invalid value so that the monotonically increasing "
"GenerateNextId method will never return the invalid value.");
using StrongAlias<TypeMarker, WrappedType>::StrongAlias;
using base::StrongAlias<TypeMarker, WrappedType>::StrongAlias;
// 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.
@ -88,7 +88,8 @@ class IdType : public StrongAlias<TypeMarker, WrappedType> {
// Default-construct in the null state.
constexpr IdType()
: StrongAlias<TypeMarker, WrappedType>::StrongAlias(kInvalidValue) {}
: base::StrongAlias<TypeMarker, WrappedType>::StrongAlias(kInvalidValue) {
}
constexpr bool is_null() const { return this->value() == kInvalidValue; }
constexpr explicit operator bool() const { return !is_null(); }

@ -5,8 +5,8 @@
#ifndef BASE_UTIL_TYPE_SAFETY_TOKEN_TYPE_H_
#define BASE_UTIL_TYPE_SAFETY_TOKEN_TYPE_H_
#include "base/types/strong_alias.h"
#include "base/unguessable_token.h"
#include "base/util/type_safety/strong_alias.h"
namespace util {
@ -15,9 +15,9 @@ namespace util {
// not expose the concept of null tokens. If you need to indicate a null token,
// please use base::Optional<TokenType<...>>.
template <typename TypeMarker>
class TokenType : public StrongAlias<TypeMarker, base::UnguessableToken> {
class TokenType : public base::StrongAlias<TypeMarker, base::UnguessableToken> {
private:
using Super = StrongAlias<TypeMarker, base::UnguessableToken>;
using Super = base::StrongAlias<TypeMarker, base::UnguessableToken>;
public:
TokenType() : Super(base::UnguessableToken::Create()) {}

@ -5780,7 +5780,7 @@ content::XrIntegrationClient*
ChromeContentBrowserClient::GetXrIntegrationClient() {
if (!xr_integration_client_)
xr_integration_client_ = std::make_unique<vr::ChromeXrIntegrationClient>(
util::PassKey<ChromeContentBrowserClient>());
base::PassKey<ChromeContentBrowserClient>());
return xr_integration_client_.get();
}
#endif // BUILDFLAG(ENABLE_VR)

@ -36,7 +36,6 @@
#include "ui/base/idle/idle.h"
namespace chromeos {
class CrosSettings;
namespace system {
class StatisticsProvider;
}

@ -11,7 +11,7 @@
#include "base/logging.h"
#include "base/process/process.h"
#include "base/process/process_handle.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_process_platform_part.h"
@ -122,7 +122,7 @@ bool g_send_stop_request_to_session_manager = false;
#if !defined(OS_ANDROID)
using IgnoreUnloadHandlers =
util::StrongAlias<class IgnoreUnloadHandlersTag, bool>;
base::StrongAlias<class IgnoreUnloadHandlersTag, bool>;
void AttemptRestartInternal(IgnoreUnloadHandlers ignore_unload_handlers) {
// TODO(beng): Can this use ProfileManager::GetLoadedProfiles instead?

@ -19,7 +19,7 @@ using password_manager::PasswordManagerClient;
// No-op constructor for tests.
AllPasswordsBottomSheetController::AllPasswordsBottomSheetController(
util::PassKey<class AllPasswordsBottomSheetControllerTest>,
base::PassKey<class AllPasswordsBottomSheetControllerTest>,
std::unique_ptr<AllPasswordsBottomSheetView> view,
base::WeakPtr<password_manager::PasswordManagerDriver> driver,
password_manager::PasswordStore* store,

@ -6,7 +6,7 @@
#define CHROME_BROWSER_PASSWORD_MANAGER_ANDROID_ALL_PASSWORDS_BOTTOM_SHEET_CONTROLLER_H_
#include "base/callback.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "components/autofill/core/common/mojom/autofill_types.mojom-forward.h"
#include "components/password_manager/core/browser/password_store_consumer.h"
#include "ui/gfx/native_widget_types.h"
@ -29,7 +29,7 @@ class AllPasswordsBottomSheetController
public:
// No-op constructor for tests.
AllPasswordsBottomSheetController(
util::PassKey<class AllPasswordsBottomSheetControllerTest>,
base::PassKey<class AllPasswordsBottomSheetControllerTest>,
std::unique_ptr<AllPasswordsBottomSheetView> view,
base::WeakPtr<password_manager::PasswordManagerDriver> driver,
password_manager::PasswordStore* store,

@ -6,7 +6,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/test/mock_callback.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "chrome/browser/password_manager/password_manager_test_util.h"
#include "chrome/browser/ui/android/passwords/all_passwords_bottom_sheet_view.h"
#include "chrome/test/base/testing_profile.h"
@ -102,7 +102,7 @@ class AllPasswordsBottomSheetControllerTest : public testing::Test {
mock_view_ = mock_view_unique_ptr.get();
all_passwords_controller_ =
std::make_unique<AllPasswordsBottomSheetController>(
util::PassKey<AllPasswordsBottomSheetControllerTest>(),
base::PassKey<AllPasswordsBottomSheetControllerTest>(),
std::move(mock_view_unique_ptr), driver_.AsWeakPtr(), store_.get(),
dissmissal_callback_.Get(), focused_field_type,
mock_pwd_manager_client_.get());

@ -10,7 +10,7 @@
#include "base/bind.h"
#include "base/run_loop.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/performance_manager/persistence/site_data/site_data_cache_facade_factory.h"
#include "chrome/browser/profiles/incognito_helpers.h"
@ -24,7 +24,7 @@
namespace performance_manager {
class GraphImpl;
using PassKey = util::PassKey<SiteDataCacheFacade>;
using PassKey = base::PassKey<SiteDataCacheFacade>;
SiteDataCacheFacade::SiteDataCacheFacade(
content::BrowserContext* browser_context)

@ -73,7 +73,7 @@ bool SiteDataCacheFacadeFactory::ServiceIsNULLWhileTesting() const {
}
void SiteDataCacheFacadeFactory::OnBeforeFacadeCreated(
util::PassKey<SiteDataCacheFacade>) {
base::PassKey<SiteDataCacheFacade>) {
if (service_instance_count_ == 0U) {
DCHECK(cache_factory_.is_null());
cache_factory_ = base::SequenceBound<SiteDataCacheFactory>(
@ -83,7 +83,7 @@ void SiteDataCacheFacadeFactory::OnBeforeFacadeCreated(
}
void SiteDataCacheFacadeFactory::OnFacadeDestroyed(
util::PassKey<SiteDataCacheFacade>) {
base::PassKey<SiteDataCacheFacade>) {
DCHECK_GT(service_instance_count_, 0U);
// Destroy the cache factory if there's no more SiteDataCacheFacade needing
// it.

@ -9,7 +9,7 @@
#include "base/memory/weak_ptr.h"
#include "base/no_destructor.h"
#include "base/threading/sequence_bound.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
class Profile;
@ -69,11 +69,11 @@ class SiteDataCacheFacadeFactory : public BrowserContextKeyedServiceFactory {
// Should be called early in the creation of a SiteDataCacheFacade to make
// sure that |cache_factory_| gets created.
void OnBeforeFacadeCreated(util::PassKey<SiteDataCacheFacade> key);
void OnBeforeFacadeCreated(base::PassKey<SiteDataCacheFacade> key);
// Should be called at the end of the destruction of a SiteDataCacheFacade to
// release |cache_factory_| if there's no more profile needing it.
void OnFacadeDestroyed(util::PassKey<SiteDataCacheFacade> key);
void OnFacadeDestroyed(base::PassKey<SiteDataCacheFacade> key);
private:
// BrowserContextKeyedServiceFactory:

@ -8,7 +8,7 @@
#include "base/check.h"
#include "base/metrics/histogram_functions.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "chrome/browser/password_manager/chrome_password_manager_client.h"
#include "chrome/browser/touch_to_fill/touch_to_fill_view.h"
#include "components/password_manager/core/browser/android_affiliation/affiliation_utils.h"
@ -28,7 +28,7 @@ using password_manager::PasswordManagerDriver;
using password_manager::UiCredential;
TouchToFillController::TouchToFillController(
util::PassKey<TouchToFillControllerTest>) {}
base::PassKey<TouchToFillControllerTest>) {}
TouchToFillController::TouchToFillController(
ChromePasswordManagerClient* password_client)

@ -11,7 +11,7 @@
#include "base/containers/span.h"
#include "base/memory/weak_ptr.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "chrome/browser/touch_to_fill/touch_to_fill_view.h"
#include "chrome/browser/touch_to_fill/touch_to_fill_view_factory.h"
#include "services/metrics/public/cpp/ukm_source_id.h"
@ -42,7 +42,7 @@ class TouchToFillController {
// No-op constructor for tests.
explicit TouchToFillController(
util::PassKey<class TouchToFillControllerTest>);
base::PassKey<class TouchToFillControllerTest>);
explicit TouchToFillController(ChromePasswordManagerClient* web_contents);
TouchToFillController(const TouchToFillController&) = delete;
TouchToFillController& operator=(const TouchToFillController&) = delete;

@ -11,7 +11,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/task_environment.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "components/password_manager/core/browser/origin_credential_store.h"
#include "components/password_manager/core/browser/stub_password_manager_driver.h"
#include "components/ukm/test_ukm_recorder.h"
@ -100,7 +100,7 @@ class TouchToFillControllerTest : public testing::Test {
base::HistogramTester histogram_tester_;
ukm::TestAutoSetUkmRecorder test_recorder_;
TouchToFillController touch_to_fill_controller_{
util::PassKey<TouchToFillControllerTest>()};
base::PassKey<TouchToFillControllerTest>()};
};
TEST_F(TouchToFillControllerTest, Show_And_Fill) {

@ -8,7 +8,7 @@
#include "base/callback_forward.h"
#include "base/containers/span.h"
#include "base/strings/string_piece_forward.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "url/gurl.h"
namespace password_manager {
@ -19,7 +19,7 @@ class UiCredential;
// To Fill controller with the Android frontend.
class TouchToFillView {
public:
using IsOriginSecure = util::StrongAlias<class IsOriginSecureTag, bool>;
using IsOriginSecure = base::StrongAlias<class IsOriginSecureTag, bool>;
TouchToFillView() = default;
TouchToFillView(const TouchToFillView&) = delete;

@ -11,7 +11,7 @@
#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "build/branding_buildflags.h"
#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/browser/ui/passwords/bubble_controllers/items_bubble_controller.h"

@ -15,7 +15,7 @@
#include "base/memory/weak_ptr.h"
#include "base/scoped_observer.h"
#include "base/time/time.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "build/branding_buildflags.h"
#include "build/build_config.h"
#include "chrome/browser/extensions/api/passwords_private/passwords_private_delegate.h"
@ -178,12 +178,12 @@ class SafetyCheckHandler
private:
// These ensure integers are passed in the correct possitions in the extension
// check methods.
using Compromised = util::StrongAlias<class CompromisedTag, int>;
using Done = util::StrongAlias<class DoneTag, int>;
using Total = util::StrongAlias<class TotalTag, int>;
using Blocklisted = util::StrongAlias<class BlocklistedTag, int>;
using ReenabledUser = util::StrongAlias<class ReenabledUserTag, int>;
using ReenabledAdmin = util::StrongAlias<class ReenabledAdminTag, int>;
using Compromised = base::StrongAlias<class CompromisedTag, int>;
using Done = base::StrongAlias<class DoneTag, int>;
using Total = base::StrongAlias<class TotalTag, int>;
using Blocklisted = base::StrongAlias<class BlocklistedTag, int>;
using ReenabledUser = base::StrongAlias<class ReenabledUserTag, int>;
using ReenabledAdmin = base::StrongAlias<class ReenabledAdminTag, int>;
// Handles triggering the safety check from the frontend (by user pressing a
// button).

@ -16,7 +16,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/metrics/user_action_tester.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "build/build_config.h"
#include "chrome/browser/extensions/api/passwords_private/passwords_private_delegate.h"
#include "chrome/browser/extensions/api/passwords_private/test_passwords_private_delegate.h"
@ -64,8 +64,8 @@ constexpr char kChromeCleaner[] = "chrome-cleaner";
#endif
namespace {
using Enabled = util::StrongAlias<class EnabledTag, bool>;
using UserCanDisable = util::StrongAlias<class UserCanDisableTag, bool>;
using Enabled = base::StrongAlias<class EnabledTag, bool>;
using UserCanDisable = base::StrongAlias<class UserCanDisableTag, bool>;
class TestingSafetyCheckHandler : public SafetyCheckHandler {
public:

@ -7,7 +7,7 @@
#include <memory>
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "build/build_config.h"
#include "content/public/browser/xr_integration_client.h"
@ -18,7 +18,7 @@ namespace vr {
class ChromeXrIntegrationClient : public content::XrIntegrationClient {
public:
explicit ChromeXrIntegrationClient(
util::PassKey<ChromeContentBrowserClient>) {}
base::PassKey<ChromeContentBrowserClient>) {}
~ChromeXrIntegrationClient() override = default;
ChromeXrIntegrationClient(const ChromeXrIntegrationClient&) = delete;
ChromeXrIntegrationClient& operator=(const ChromeXrIntegrationClient&) =

@ -21,7 +21,7 @@ bool RegistryUpdateData::IsEmpty() const {
}
WebAppRegistryUpdate::WebAppRegistryUpdate(const WebAppRegistrar* registrar,
util::PassKey<WebAppSyncBridge>)
base::PassKey<WebAppSyncBridge>)
: registrar_(registrar) {
DCHECK(registrar_);
update_data_ = std::make_unique<RegistryUpdateData>();

@ -9,7 +9,7 @@
#include <vector>
#include "base/callback.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "chrome/browser/web_applications/components/web_app_id.h"
namespace web_app {
@ -41,7 +41,7 @@ struct RegistryUpdateData {
class WebAppRegistryUpdate {
public:
WebAppRegistryUpdate(const WebAppRegistrar* registrar,
util::PassKey<WebAppSyncBridge>);
base::PassKey<WebAppSyncBridge>);
WebAppRegistryUpdate(const WebAppRegistryUpdate&) = delete;
WebAppRegistryUpdate& operator=(const WebAppRegistryUpdate&) = delete;
~WebAppRegistryUpdate();

@ -14,7 +14,7 @@
#include "base/logging.h"
#include "base/metrics/user_metrics.h"
#include "base/optional.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "chrome/browser/web_applications/components/os_integration_manager.h"
#include "chrome/browser/web_applications/components/web_app_helpers.h"
#include "chrome/browser/web_applications/components/web_app_provider_base.h"
@ -141,7 +141,7 @@ std::unique_ptr<WebAppRegistryUpdate> WebAppSyncBridge::BeginUpdate() {
is_in_update_ = true;
return std::make_unique<WebAppRegistryUpdate>(
registrar_, util::PassKey<WebAppSyncBridge>());
registrar_, base::PassKey<WebAppSyncBridge>());
}
void WebAppSyncBridge::CommitUpdate(

@ -21,7 +21,7 @@
#include "base/optional.h"
#include "base/strings/string16.h"
#include "base/strings/string_piece.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "base/version.h"
#include "base/win/registry.h"
#include "base/win/scoped_handle.h"
@ -188,8 +188,8 @@ class InstallUtil {
static std::vector<std::pair<std::wstring, std::wstring>>
GetCloudManagementEnrollmentTokenRegistryPaths();
using ReadOnly = util::StrongAlias<class ReadOnlyTag, bool>;
using BrowserLocation = util::StrongAlias<class BrowserLocationTag, bool>;
using ReadOnly = base::StrongAlias<class ReadOnlyTag, bool>;
using BrowserLocation = base::StrongAlias<class BrowserLocationTag, bool>;
// Returns the registry key and value name from/to which a cloud management DM
// token may be read/written. |read_only| indicates whether they key is opened

@ -14,7 +14,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "build/build_config.h"
#include "components/autofill/content/common/mojom/autofill_agent.mojom.h"
#include "components/autofill/content/common/mojom/autofill_driver.mojom.h"
@ -108,9 +108,9 @@ class PasswordAutofillAgent : public content::RenderFrameObserver,
public FormTracker::Observer,
public mojom::PasswordAutofillAgent {
public:
using UseFallbackData = util::StrongAlias<class UseFallbackDataTag, bool>;
using ShowAll = util::StrongAlias<class ShowAllTag, bool>;
using GenerationShowing = util::StrongAlias<class GenerationShowingTag, bool>;
using UseFallbackData = base::StrongAlias<class UseFallbackDataTag, bool>;
using ShowAll = base::StrongAlias<class ShowAllTag, bool>;
using GenerationShowing = base::StrongAlias<class GenerationShowingTag, bool>;
PasswordAutofillAgent(content::RenderFrame* render_frame,
blink::AssociatedInterfaceRegistry* registry);
@ -247,7 +247,7 @@ class PasswordAutofillAgent : public content::RenderFrameObserver,
}
private:
using OnPasswordField = util::StrongAlias<class OnPasswordFieldTag, bool>;
using OnPasswordField = base::StrongAlias<class OnPasswordFieldTag, bool>;
// Enumeration representing possible Touch To Fill states. This is used to
// make sure that Touch To Fill will only be shown in response to the first

@ -15,7 +15,7 @@
#include "base/i18n/rtl.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "base/values.h"
#include "build/build_config.h"
#include "components/autofill/core/browser/payments/legal_message_line.h"
@ -180,7 +180,7 @@ class AutofillClient : public RiskDataLoader {
// Required arguments to create a dropdown showing autofill suggestions.
struct PopupOpenArgs {
using AutoselectFirstSuggestion =
::util::StrongAlias<class AutoSelectFirstSuggestionTag, bool>;
::base::StrongAlias<class AutoSelectFirstSuggestionTag, bool>;
PopupOpenArgs();
PopupOpenArgs(const gfx::RectF& element_bounds,

@ -12,7 +12,7 @@
#include "base/optional.h"
#include "base/sequence_checker.h"
#include "base/strings/string16.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
namespace autofill {
// AlternativeStateNameMap encapsulates mappings from state names in the
@ -71,17 +71,17 @@ namespace autofill {
class AlternativeStateNameMap {
public:
// Represents ISO 3166-1 alpha-2 codes (always uppercase ASCII).
using CountryCode = util::StrongAlias<class CountryCodeTag, std::string>;
using CountryCode = base::StrongAlias<class CountryCodeTag, std::string>;
// Represents either a canonical state name, or an abbreviation, or an
// alternative name or normalized state name from the profile.
using StateName = util::StrongAlias<class StateNameTag, base::string16>;
using StateName = base::StrongAlias<class StateNameTag, base::string16>;
// States can be represented as different strings (different spellings,
// translations, abbreviations). All representations of a single state in a
// single country are mapped to the same canonical name.
using CanonicalStateName =
util::StrongAlias<class CanonicalStateNameTag, base::string16>;
base::StrongAlias<class CanonicalStateNameTag, base::string16>;
static AlternativeStateNameMap* GetInstance();

@ -11,7 +11,7 @@
#include "base/macros.h"
#include "base/no_destructor.h"
#include "base/sequence_checker.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "base/version.h"
#include "components/autofill/core/browser/autofill_regex_constants.h"
#include "components/autofill/core/browser/field_types.h"

@ -10,7 +10,7 @@
#include "base/optional.h"
#include "base/strings/string16.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "components/autofill/core/browser/ui/accessory_sheet_enums.h"
namespace password_manager {
@ -65,7 +65,7 @@ class UserInfo {
};
using IsPslMatch =
util::StrongAlias<password_manager::IsPublicSuffixMatchTag, bool>;
base::StrongAlias<password_manager::IsPublicSuffixMatchTag, bool>;
UserInfo();
explicit UserInfo(std::string origin);

@ -9,13 +9,13 @@
#include "base/strings/string16.h"
#include "base/strings/string_piece.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "ui/gfx/image/image.h"
namespace autofill {
struct Suggestion {
using IsLoading = util::StrongAlias<class IsLoadingTag, bool>;
using IsLoading = base::StrongAlias<class IsLoadingTag, bool>;
enum MatchMode {
PREFIX_MATCH, // for prefix matched suggestions;

@ -11,16 +11,16 @@
#include "base/check.h"
#include "base/ranges/algorithm.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
namespace autofill {
// A LanguageCode is a two-letter lowercase abbreviation according to ISO 639-1
// or "und", which is the ISO 639-2 code for "undetermined".
class LanguageCode
: public util::StrongAlias<class LanguageCodeTag, std::string> {
: public base::StrongAlias<class LanguageCodeTag, std::string> {
private:
using BaseClass = util::StrongAlias<LanguageCodeTag, std::string>;
using BaseClass = base::StrongAlias<LanguageCodeTag, std::string>;
public:
LanguageCode() = default;

@ -8,7 +8,7 @@
#include "base/callback.h"
#include "base/macros.h"
#include "base/time/time.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "components/password_manager/core/browser/password_form.h"
#include "url/gurl.h"
@ -18,7 +18,7 @@ class Database;
namespace password_manager {
using BulkCheckDone = util::StrongAlias<class BulkCheckDoneTag, bool>;
using BulkCheckDone = base::StrongAlias<class BulkCheckDoneTag, bool>;
enum class CompromiseType {
// If the credentials was leaked by a data breach.

@ -8,7 +8,7 @@
#include <vector>
#include "base/strings/string16.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "url/origin.h"
namespace password_manager {
@ -22,7 +22,7 @@ class CredentialCache {
// TODO(crbug.com/1051553): Consider reusing this alias for other password
// manager code as well.
using IsOriginBlacklisted =
util::StrongAlias<class IsOriginBlacklistedTag, bool>;
base::StrongAlias<class IsOriginBlacklistedTag, bool>;
CredentialCache();
CredentialCache(const CredentialCache&) = delete;
CredentialCache& operator=(const CredentialCache&) = delete;

@ -5,7 +5,7 @@
#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LEAK_DETECTION_LEAK_DETECTION_DELEGATE_INTERFACE_H_
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LEAK_DETECTION_LEAK_DETECTION_DELEGATE_INTERFACE_H_
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "url/gurl.h"
namespace password_manager {
@ -31,7 +31,7 @@ enum class LeakDetectionError {
kMaxValue = kQuotaLimit,
};
using IsLeaked = util::StrongAlias<class IsLeakedTag, bool>;
using IsLeaked = base::StrongAlias<class IsLeakedTag, bool>;
// Interface with callbacks for LeakDetectionCheck. Used to get the result of
// the check.

@ -9,7 +9,7 @@
#include "base/macros.h"
#include "base/strings/string16.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "components/password_manager/core/browser/password_manager_metrics_util.h"
#include "ui/gfx/range/range.h"
#include "url/gurl.h"
@ -38,11 +38,11 @@ using CredentialLeakType = std::underlying_type_t<CredentialLeakFlags>;
// Contains a number of compromised sites.
using CompromisedSitesCount =
util::StrongAlias<class CompromisedSitesCountTag, int>;
base::StrongAlias<class CompromisedSitesCountTag, int>;
using IsSaved = util::StrongAlias<class IsSavedTag, bool>;
using IsReused = util::StrongAlias<class IsReusedTag, bool>;
using IsSyncing = util::StrongAlias<class IsSyncingTag, bool>;
using IsSaved = base::StrongAlias<class IsSavedTag, bool>;
using IsReused = base::StrongAlias<class IsReusedTag, bool>;
using IsSyncing = base::StrongAlias<class IsSyncingTag, bool>;
// Creates CredentialLeakType from strong booleans.
CredentialLeakType CreateLeakType(IsSaved is_saved,
IsReused is_reused,

@ -9,7 +9,7 @@
#include "base/containers/span.h"
#include "base/strings/string16.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "url/gurl.h"
#include "url/origin.h"
@ -21,10 +21,10 @@ struct PasswordForm;
class UiCredential {
public:
using IsPublicSuffixMatch =
util::StrongAlias<class IsPublicSuffixMatchTag, bool>;
base::StrongAlias<class IsPublicSuffixMatchTag, bool>;
using IsAffiliationBasedMatch =
util::StrongAlias<class IsAffiliationBasedMatchTag, bool>;
base::StrongAlias<class IsAffiliationBasedMatchTag, bool>;
UiCredential(base::string16 username,
base::string16 password,

@ -12,7 +12,7 @@
#include "base/i18n/rtl.h"
#include "base/macros.h"
#include "base/task/cancelable_task_tracker.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "components/autofill/core/browser/autofill_client.h"
#include "components/autofill/core/browser/ui/autofill_popup_delegate.h"
#include "components/autofill/core/common/password_form_fill_data.h"
@ -111,11 +111,11 @@ class PasswordAutofillManager : public autofill::AutofillPopupDelegate {
#endif // defined(UNIT_TEST)
private:
using ForPasswordField = util::StrongAlias<class ForPasswordFieldTag, bool>;
using OffersGeneration = util::StrongAlias<class OffersGenerationTag, bool>;
using ShowAllPasswords = util::StrongAlias<class ShowAllPasswordsTag, bool>;
using ForPasswordField = base::StrongAlias<class ForPasswordFieldTag, bool>;
using OffersGeneration = base::StrongAlias<class OffersGenerationTag, bool>;
using ShowAllPasswords = base::StrongAlias<class ShowAllPasswordsTag, bool>;
using ShowPasswordSuggestions =
util::StrongAlias<class ShowPasswordSuggestionsTag, bool>;
base::StrongAlias<class ShowPasswordSuggestionsTag, bool>;
// Builds the suggestions used to show or update the autofill popup.
std::vector<autofill::Suggestion> BuildSuggestions(

@ -10,7 +10,7 @@
#include <string>
#include <vector>
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
namespace password_manager {
@ -18,7 +18,7 @@ struct PasswordForm;
// Multimap from sort key to password forms.
using DuplicatesMap = std::multimap<std::string, std::unique_ptr<PasswordForm>>;
using IgnoreStore = util::StrongAlias<class IgnoreStoreTag, bool>;
using IgnoreStore = base::StrongAlias<class IgnoreStoreTag, bool>;
// Creates key for sorting password or password exception entries. The key is
// eTLD+1 followed by the reversed list of domains (e.g.

@ -12,7 +12,7 @@
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/scoped_refptr.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "build/build_config.h"
#include "components/autofill/core/common/language_code.h"
#include "components/autofill/core/common/mojom/autofill_types.mojom.h"
@ -91,7 +91,7 @@ enum SyncState {
class PasswordManagerClient {
public:
using CredentialsCallback = base::OnceCallback<void(const PasswordForm*)>;
using ReauthSucceeded = util::StrongAlias<class ReauthSucceededTag, bool>;
using ReauthSucceeded = base::StrongAlias<class ReauthSucceededTag, bool>;
PasswordManagerClient() {}
virtual ~PasswordManagerClient() {}

@ -12,7 +12,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "components/autofill/core/common/mojom/autofill_types.mojom.h"
#include "components/autofill/core/common/renderer_id.h"
@ -34,7 +34,7 @@ class PasswordManagerDriver
: public base::SupportsWeakPtr<PasswordManagerDriver> {
public:
using ShowVirtualKeyboard =
util::StrongAlias<class ShowVirtualKeyboardTag, bool>;
base::StrongAlias<class ShowVirtualKeyboardTag, bool>;
PasswordManagerDriver() = default;
virtual ~PasswordManagerDriver() = default;

@ -17,8 +17,8 @@ namespace password_manager {
namespace metrics_util {
using IsUsernameChanged = util::StrongAlias<class IsUsernameChangedTag, bool>;
using IsPasswordChanged = util::StrongAlias<class IsPasswordChangedTag, bool>;
using IsUsernameChanged = base::StrongAlias<class IsUsernameChangedTag, bool>;
using IsPasswordChanged = base::StrongAlias<class IsPasswordChangedTag, bool>;
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.

@ -20,16 +20,16 @@
#include "base/observer_list_threadsafe.h"
#include "base/sequenced_task_runner.h"
#include "base/time/time.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "build/build_config.h"
#include "components/keyed_service/core/refcounted_keyed_service.h"
#include "components/password_manager/core/browser/compromised_credentials_table.h"
#include "components/password_manager/core/browser/password_store_change.h"
#include "components/password_manager/core/browser/password_store_sync.h"
#include "components/password_manager/core/browser/hash_password_manager.h"
#include "components/password_manager/core/browser/password_manager_metrics_util.h"
#include "components/password_manager/core/browser/password_reuse_detector.h"
#include "components/password_manager/core/browser/password_reuse_detector_consumer.h"
#include "components/password_manager/core/browser/password_store_change.h"
#include "components/password_manager/core/browser/password_store_sync.h"
class PrefService;
@ -49,7 +49,7 @@ namespace password_manager {
struct PasswordForm;
using IsAccountStore = util::StrongAlias<class IsAccountStoreTag, bool>;
using IsAccountStore = base::StrongAlias<class IsAccountStoreTag, bool>;
using metrics_util::GaiaPasswordHashChange;

@ -15,7 +15,7 @@
#include "base/observer_list_types.h"
#include "base/scoped_observation.h"
#include "base/timer/elapsed_timer.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "components/password_manager/core/browser/compromised_credentials_consumer.h"
#include "components/password_manager/core/browser/compromised_credentials_table.h"
#include "components/password_manager/core/browser/leak_detection/bulk_leak_check.h"

@ -8,11 +8,11 @@
#include "base/containers/flat_set.h"
#include "base/strings/string16.h"
#include "base/strings/string_piece_forward.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
namespace password_manager {
using IsWeakPassword = util::StrongAlias<class IsWeakPasswordTag, bool>;
using IsWeakPassword = base::StrongAlias<class IsWeakPasswordTag, bool>;
// Returns whether `password` is weak.
IsWeakPassword IsWeak(base::StringPiece16 password);

@ -5,7 +5,7 @@
#include "components/performance_manager/execution_context/execution_context_impl.h"
#include "base/sequence_checker.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "components/performance_manager/graph/frame_node_impl.h"
#include "components/performance_manager/graph/node_attached_data_impl.h"
#include "components/performance_manager/graph/process_node_impl.h"
@ -19,7 +19,7 @@ namespace execution_context {
// implementations.
class ExecutionContextAccess {
public:
using PassKey = util::PassKey<ExecutionContextAccess>;
using PassKey = base::PassKey<ExecutionContextAccess>;
template <typename NodeImplType>
static std::unique_ptr<NodeAttachedData>* GetExecutionAccessStorage(

@ -27,7 +27,7 @@ void FreezingVoteAggregator::SetUpstreamVotingChannel(
}
FreezingVoteReceipt FreezingVoteAggregator::SubmitVote(
util::PassKey<FreezingVotingChannel>,
base::PassKey<FreezingVotingChannel>,
voting::VoterId<FreezingVote> voter_id,
const PageNode* page_node,
const FreezingVote& vote) {
@ -47,7 +47,7 @@ FreezingVoteReceipt FreezingVoteAggregator::SubmitVote(
return receipt;
}
void FreezingVoteAggregator::ChangeVote(util::PassKey<AcceptedFreezingVote>,
void FreezingVoteAggregator::ChangeVote(base::PassKey<AcceptedFreezingVote>,
AcceptedFreezingVote* old_vote,
const FreezingVote& new_vote) {
DCHECK(old_vote->IsValid());
@ -61,7 +61,7 @@ void FreezingVoteAggregator::ChangeVote(util::PassKey<AcceptedFreezingVote>,
}
void FreezingVoteAggregator::VoteInvalidated(
util::PassKey<AcceptedFreezingVote>,
base::PassKey<AcceptedFreezingVote>,
AcceptedFreezingVote* vote) {
DCHECK(!vote->IsValid());
auto it = GetVoteData(vote->context());

@ -49,14 +49,14 @@ class FreezingVoteAggregator final : public FreezingVoteConsumer {
void SetUpstreamVotingChannel(FreezingVotingChannel&& channel);
// VoteConsumer implementation:
FreezingVoteReceipt SubmitVote(util::PassKey<FreezingVotingChannel>,
FreezingVoteReceipt SubmitVote(base::PassKey<FreezingVotingChannel>,
voting::VoterId<FreezingVote> voter_id,
const PageNode* page_node,
const FreezingVote& vote) override;
void ChangeVote(util::PassKey<AcceptedFreezingVote>,
void ChangeVote(base::PassKey<AcceptedFreezingVote>,
AcceptedFreezingVote* old_vote,
const FreezingVote& new_vote) override;
void VoteInvalidated(util::PassKey<AcceptedFreezingVote>,
void VoteInvalidated(base::PassKey<AcceptedFreezingVote>,
AcceptedFreezingVote* vote) override;
private:

@ -345,7 +345,7 @@ void FrameNodeImpl::SetPriorityAndReason(
priority_and_reason_.SetAndMaybeNotify(this, priority_and_reason);
}
void FrameNodeImpl::AddOpenedPage(util::PassKey<PageNodeImpl>,
void FrameNodeImpl::AddOpenedPage(base::PassKey<PageNodeImpl>,
PageNodeImpl* page_node) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(page_node);
@ -356,7 +356,7 @@ void FrameNodeImpl::AddOpenedPage(util::PassKey<PageNodeImpl>,
DCHECK(inserted);
}
void FrameNodeImpl::RemoveOpenedPage(util::PassKey<PageNodeImpl>,
void FrameNodeImpl::RemoveOpenedPage(base::PassKey<PageNodeImpl>,
PageNodeImpl* page_node) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(page_node);

@ -10,8 +10,8 @@
#include "base/containers/flat_set.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/types/pass_key.h"
#include "base/unguessable_token.h"
#include "base/util/type_safety/pass_key.h"
#include "components/performance_manager/graph/node_base.h"
#include "components/performance_manager/public/graph/frame_node.h"
#include "components/performance_manager/public/graph/node_attached_data.h"
@ -61,7 +61,7 @@ class FrameNodeImpl
public TypedNodeBase<FrameNodeImpl, FrameNode, FrameNodeObserver>,
public mojom::DocumentCoordinationUnit {
public:
using PassKey = util::PassKey<FrameNodeImpl>;
using PassKey = base::PassKey<FrameNodeImpl>;
static const char kDefaultPriorityReason[];
static constexpr NodeTypeEnum Type() { return NodeTypeEnum::kFrame; }
@ -158,13 +158,13 @@ class FrameNodeImpl
// Invoked by opened pages when this frame is set/cleared as their opener.
// See PageNodeImpl::(Set|Clear)OpenerFrameNodeAndOpenedType.
void AddOpenedPage(util::PassKey<PageNodeImpl> key, PageNodeImpl* page_node);
void RemoveOpenedPage(util::PassKey<PageNodeImpl> key,
void AddOpenedPage(base::PassKey<PageNodeImpl> key, PageNodeImpl* page_node);
void RemoveOpenedPage(base::PassKey<PageNodeImpl> key,
PageNodeImpl* page_node);
// Used by the ExecutionContextRegistry mechanism.
std::unique_ptr<NodeAttachedData>* GetExecutionContextStorage(
util::PassKey<execution_context::ExecutionContextAccess> key) {
base::PassKey<execution_context::ExecutionContextAccess> key) {
return &execution_context_;
}

@ -13,7 +13,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "components/performance_manager/graph/node_attached_data.h"
#include "components/performance_manager/graph/node_base.h"
#include "components/performance_manager/public/graph/page_node.h"
@ -28,7 +28,7 @@ class PageNodeImpl
: public PublicNodeImpl<PageNodeImpl, PageNode>,
public TypedNodeBase<PageNodeImpl, PageNode, PageNodeObserver> {
public:
using PassKey = util::PassKey<PageNodeImpl>;
using PassKey = base::PassKey<PageNodeImpl>;
static constexpr NodeTypeEnum Type() { return NodeTypeEnum::kPage; }

@ -14,7 +14,7 @@
#include "base/process/process.h"
#include "base/process/process_handle.h"
#include "base/time/time.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "components/performance_manager/graph/node_attached_data.h"
#include "components/performance_manager/graph/node_base.h"
#include "components/performance_manager/graph/properties.h"
@ -47,7 +47,7 @@ class ProcessNodeImpl
public TypedNodeBase<ProcessNodeImpl, ProcessNode, ProcessNodeObserver>,
public mojom::ProcessCoordinationUnit {
public:
using PassKey = util::PassKey<ProcessNodeImpl>;
using PassKey = base::PassKey<ProcessNodeImpl>;
static constexpr NodeTypeEnum Type() { return NodeTypeEnum::kProcess; }

@ -12,7 +12,7 @@
#include "base/containers/flat_set.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "components/performance_manager/graph/node_base.h"
#include "components/performance_manager/public/graph/worker_node.h"
#include "third_party/blink/public/common/tokens/tokens.h"
@ -76,7 +76,7 @@ class WorkerNodeImpl
// Used by the ExecutionContextRegistry mechanism.
std::unique_ptr<NodeAttachedData>* GetExecutionContextStorage(
util::PassKey<execution_context::ExecutionContextAccess> key) {
base::PassKey<execution_context::ExecutionContextAccess> key) {
return &execution_context_;
}

@ -8,7 +8,7 @@
#include "base/containers/flat_set.h"
#include "base/macros.h"
#include "base/optional.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.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/mojom/coordination_unit.mojom.h"

@ -16,7 +16,7 @@
#include "base/sequenced_task_runner.h"
#include "base/threading/sequence_bound.h"
#include "base/time/time.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.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_registered.h"
@ -237,17 +237,17 @@ class V8DetailedMemoryDecorator
// V8DetailedMemoryRequest objects register themselves with the decorator.
// If |process_node| is null, the request will be sent to every renderer
// process, otherwise it will be sent only to |process_node|.
void AddMeasurementRequest(util::PassKey<V8DetailedMemoryRequest>,
void AddMeasurementRequest(base::PassKey<V8DetailedMemoryRequest>,
V8DetailedMemoryRequest* request,
const ProcessNode* process_node = nullptr);
void RemoveMeasurementRequest(util::PassKey<V8DetailedMemoryRequest>,
void RemoveMeasurementRequest(base::PassKey<V8DetailedMemoryRequest>,
V8DetailedMemoryRequest* request);
// Internal helper class that can call NotifyObserversOnMeasurementAvailable
// when a measurement is received.
class ObserverNotifier;
void NotifyObserversOnMeasurementAvailable(
util::PassKey<ObserverNotifier>,
base::PassKey<ObserverNotifier>,
const ProcessNode* process_node) const;
private:
@ -422,7 +422,7 @@ class V8DetailedMemoryRequest {
// request will be sent to every renderer process, otherwise it will be sent
// only to |process_to_measure|.
V8DetailedMemoryRequest(
util::PassKey<V8DetailedMemoryRequestAnySeq>,
base::PassKey<V8DetailedMemoryRequestAnySeq>,
const base::TimeDelta& min_time_between_requests,
MeasurementMode mode,
base::Optional<base::WeakPtr<ProcessNode>> process_to_measure,
@ -432,7 +432,7 @@ class V8DetailedMemoryRequest {
// min_time_between_requests_ to 0, which is not allowed for repeating
// requests, and registers |on_owner_unregistered_closure| to be called from
// OnOwnerUnregistered.
V8DetailedMemoryRequest(util::PassKey<V8DetailedMemoryRequestOneShot>,
V8DetailedMemoryRequest(base::PassKey<V8DetailedMemoryRequestOneShot>,
MeasurementMode mode,
base::OnceClosure on_owner_unregistered_closure);
@ -440,12 +440,12 @@ class V8DetailedMemoryRequest {
// OnOwnerUnregistered for all requests in the queue when the owning
// decorator or process node is removed from the graph.
void OnOwnerUnregistered(
util::PassKey<V8DetailedMemoryDecorator::MeasurementRequestQueue>);
base::PassKey<V8DetailedMemoryDecorator::MeasurementRequestQueue>);
// V8DetailedMemoryDecorator::MeasurementRequestQueue calls
// NotifyObserversOnMeasurementAvailable when a measurement is received.
void NotifyObserversOnMeasurementAvailable(
util::PassKey<V8DetailedMemoryDecorator::MeasurementRequestQueue>,
base::PassKey<V8DetailedMemoryDecorator::MeasurementRequestQueue>,
const ProcessNode* process_node) const;
private:
@ -530,7 +530,7 @@ class V8DetailedMemoryRequestOneShot final : public V8DetailedMemoryObserver {
// Private constructor for V8DetailedMemoryRequestOneShotAnySeq. Will be
// called from off-sequence.
V8DetailedMemoryRequestOneShot(
util::PassKey<V8DetailedMemoryRequestOneShotAnySeq>,
base::PassKey<V8DetailedMemoryRequestOneShotAnySeq>,
base::WeakPtr<ProcessNode> process,
MeasurementCallback callback,
MeasurementMode mode = MeasurementMode::kDefault);
@ -615,7 +615,7 @@ class V8DetailedMemoryRequestAnySeq {
// V8DetailedMemoryRequest calls NotifyObserversOnMeasurementAvailable when
// a measurement is received.
void NotifyObserversOnMeasurementAvailable(
util::PassKey<V8DetailedMemoryRequest>,
base::PassKey<V8DetailedMemoryRequest>,
RenderProcessHostId render_process_host_id,
const V8DetailedMemoryProcessData& process_data,
const V8DetailedMemoryObserverAnySeq::FrameDataMap& frame_data) const;

@ -9,7 +9,7 @@
#include "base/callback.h"
#include "base/memory/scoped_refptr.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "components/performance_manager/public/mojom/web_memory.mojom.h"
#include "third_party/blink/public/common/tokens/tokens.h"

@ -64,8 +64,8 @@
#include "base/check.h"
#include "base/check_op.h"
#include "base/types/pass_key.h"
#include "base/util/type_safety/id_type.h"
#include "base/util/type_safety/pass_key.h"
namespace performance_manager {
namespace voting {
@ -118,7 +118,7 @@ class AcceptedVote;
template <class VoteImpl>
class VoteReceipt final {
public:
using PassKey = util::PassKey<VoteReceipt<VoteImpl>>;
using PassKey = base::PassKey<VoteReceipt<VoteImpl>>;
VoteReceipt();
VoteReceipt(const VoteReceipt& rhs) = delete;
@ -157,11 +157,11 @@ class VoteReceipt final {
// functions are only meant to be used by AcceptedVote.
// Allows an AcceptedVote to create an entangled receipt.
VoteReceipt(util::PassKey<AcceptedVote<VoteImpl>>,
VoteReceipt(base::PassKey<AcceptedVote<VoteImpl>>,
AcceptedVote<VoteImpl>* vote);
// Allows an AcceptedVote to update its backpointer.
void MoveVote(util::PassKey<AcceptedVote<VoteImpl>>,
void MoveVote(base::PassKey<AcceptedVote<VoteImpl>>,
AcceptedVote<VoteImpl>* old_vote,
AcceptedVote<VoteImpl>* new_vote);
@ -191,7 +191,7 @@ template <class VoteImpl>
class AcceptedVote final {
public:
using ContextType = typename VoteImpl::ContextType;
using PassKey = util::PassKey<AcceptedVote<VoteImpl>>;
using PassKey = base::PassKey<AcceptedVote<VoteImpl>>;
AcceptedVote();
AcceptedVote(VoteConsumer<VoteImpl>* consumer,
@ -226,21 +226,21 @@ class AcceptedVote final {
// functions are only meant to be used by VoteReceipt.
// Allows a VoteReceipt to associate itself with this vote.
void SetReceipt(util::PassKey<VoteReceipt<VoteImpl>>,
void SetReceipt(base::PassKey<VoteReceipt<VoteImpl>>,
VoteReceipt<VoteImpl>* receipt);
// Allows a VoteReceipt to update its backpointer.
void MoveReceipt(util::PassKey<VoteReceipt<VoteImpl>>,
void MoveReceipt(base::PassKey<VoteReceipt<VoteImpl>>,
VoteReceipt<VoteImpl>* old_receipt,
VoteReceipt<VoteImpl>* new_receipt);
// Allows a VoteReceipt to change this vote.
void ChangeVote(util::PassKey<VoteReceipt<VoteImpl>>,
void ChangeVote(base::PassKey<VoteReceipt<VoteImpl>>,
typename VoteImpl::VoteType vote,
const char* reason);
// Allows a VoteReceipt to invalidate this vote.
void InvalidateVote(util::PassKey<VoteReceipt<VoteImpl>>,
void InvalidateVote(base::PassKey<VoteReceipt<VoteImpl>>,
VoteReceipt<VoteImpl>* receipt);
private:
@ -275,7 +275,7 @@ template <class VoteImpl>
class VotingChannel final {
public:
using ContextType = typename VoteImpl::ContextType;
using PassKey = util::PassKey<VotingChannel<VoteImpl>>;
using PassKey = base::PassKey<VotingChannel<VoteImpl>>;
VotingChannel();
VotingChannel(const VotingChannel& rhs) = delete;
@ -302,7 +302,7 @@ class VotingChannel final {
}
// VotingChannelFactory is the sole producer of VotingChannels.
VotingChannel(util::PassKey<VotingChannelFactory<VoteImpl>>,
VotingChannel(base::PassKey<VotingChannelFactory<VoteImpl>>,
VotingChannelFactory<VoteImpl>* factory,
VoterId<VoteImpl> voter_id);
@ -339,9 +339,9 @@ class VotingChannelFactory final {
// Used by ~VotingChannel to notify the factory that a channel has been
// torn down.
void OnVotingChannelDestroyed(util::PassKey<VotingChannel<VoteImpl>>);
void OnVotingChannelDestroyed(base::PassKey<VotingChannel<VoteImpl>>);
VoteConsumer<VoteImpl>* GetConsumer(util::PassKey<VotingChannel<VoteImpl>>) {
VoteConsumer<VoteImpl>* GetConsumer(base::PassKey<VotingChannel<VoteImpl>>) {
return consumer_;
}
@ -368,7 +368,7 @@ class VoteConsumer {
// Used by a VotingChannel to submit votes to this consumer.
virtual VoteReceipt<VoteImpl> SubmitVote(
util::PassKey<VotingChannel<VoteImpl>>,
base::PassKey<VotingChannel<VoteImpl>>,
VoterId<VoteImpl> voter_id,
const ContextType* context,
const VoteImpl& vote) = 0;
@ -376,7 +376,7 @@ class VoteConsumer {
// Used by an AcceptedVote to notify a consumer that a previously issued vote
// has been changed. The consumer should update |old_vote| in-place using the
// data from |new_vote|.
virtual void ChangeVote(util::PassKey<AcceptedVote<VoteImpl>>,
virtual void ChangeVote(base::PassKey<AcceptedVote<VoteImpl>>,
AcceptedVote<VoteImpl>* old_vote,
const VoteImpl& new_vote) = 0;
@ -384,7 +384,7 @@ class VoteConsumer {
// receipt has been destroyed, and the vote is now invalidated. This is kept
// protected as it is part of a private contract between an AcceptedVote and a
// VoteConsumer.
virtual void VoteInvalidated(util::PassKey<AcceptedVote<VoteImpl>>,
virtual void VoteInvalidated(base::PassKey<AcceptedVote<VoteImpl>>,
AcceptedVote<VoteImpl>* vote) = 0;
};
@ -420,7 +420,7 @@ template <class VoteImpl>
class VoteConsumerDefaultImpl : public VoteConsumer<VoteImpl> {
public:
using ContextType = typename VoteImpl::ContextType;
using PassKey = util::PassKey<VoteConsumerDefaultImpl>;
using PassKey = base::PassKey<VoteConsumerDefaultImpl>;
explicit VoteConsumerDefaultImpl(VoteObserver<VoteImpl>* vote_observer);
~VoteConsumerDefaultImpl() override;
@ -433,14 +433,14 @@ class VoteConsumerDefaultImpl : public VoteConsumer<VoteImpl> {
}
// VoteConsumer:
VoteReceipt<VoteImpl> SubmitVote(util::PassKey<VotingChannel<VoteImpl>>,
VoteReceipt<VoteImpl> SubmitVote(base::PassKey<VotingChannel<VoteImpl>>,
VoterId<VoteImpl> voter_id,
const ContextType* context,
const VoteImpl& vote) override;
void ChangeVote(util::PassKey<AcceptedVote<VoteImpl>>,
void ChangeVote(base::PassKey<AcceptedVote<VoteImpl>>,
AcceptedVote<VoteImpl>* old_vote,
const VoteImpl& new_vote) override;
void VoteInvalidated(util::PassKey<AcceptedVote<VoteImpl>>,
void VoteInvalidated(base::PassKey<AcceptedVote<VoteImpl>>,
AcceptedVote<VoteImpl>* vote) override;
private:
@ -601,7 +601,7 @@ void VoteReceipt<VoteImpl>::Reset() {
}
template <class VoteImpl>
void VoteReceipt<VoteImpl>::MoveVote(util::PassKey<AcceptedVote<VoteImpl>>,
void VoteReceipt<VoteImpl>::MoveVote(base::PassKey<AcceptedVote<VoteImpl>>,
AcceptedVote<VoteImpl>* old_vote,
AcceptedVote<VoteImpl>* new_vote) {
DCHECK(old_vote);
@ -615,7 +615,7 @@ void VoteReceipt<VoteImpl>::MoveVote(util::PassKey<AcceptedVote<VoteImpl>>,
}
template <class VoteImpl>
VoteReceipt<VoteImpl>::VoteReceipt(util::PassKey<AcceptedVote<VoteImpl>>,
VoteReceipt<VoteImpl>::VoteReceipt(base::PassKey<AcceptedVote<VoteImpl>>,
AcceptedVote<VoteImpl>* vote)
: vote_(vote) {
// The vote should be valid and not be associated with any receipt.
@ -710,7 +710,7 @@ void AcceptedVote<VoteImpl>::UpdateVote(const VoteImpl& vote) {
}
template <class VoteImpl>
void AcceptedVote<VoteImpl>::SetReceipt(util::PassKey<VoteReceipt<VoteImpl>>,
void AcceptedVote<VoteImpl>::SetReceipt(base::PassKey<VoteReceipt<VoteImpl>>,
VoteReceipt<VoteImpl>* receipt) {
// A receipt can only be set on a vote once in its lifetime.
DCHECK(!receipt_);
@ -723,7 +723,7 @@ void AcceptedVote<VoteImpl>::SetReceipt(util::PassKey<VoteReceipt<VoteImpl>>,
}
template <class VoteImpl>
void AcceptedVote<VoteImpl>::MoveReceipt(util::PassKey<VoteReceipt<VoteImpl>>,
void AcceptedVote<VoteImpl>::MoveReceipt(base::PassKey<VoteReceipt<VoteImpl>>,
VoteReceipt<VoteImpl>* old_receipt,
VoteReceipt<VoteImpl>* new_receipt) {
DCHECK(old_receipt);
@ -737,7 +737,7 @@ void AcceptedVote<VoteImpl>::MoveReceipt(util::PassKey<VoteReceipt<VoteImpl>>,
}
template <class VoteImpl>
void AcceptedVote<VoteImpl>::ChangeVote(util::PassKey<VoteReceipt<VoteImpl>>,
void AcceptedVote<VoteImpl>::ChangeVote(base::PassKey<VoteReceipt<VoteImpl>>,
typename VoteImpl::VoteType vote,
const char* reason) {
DCHECK(!invalidated_);
@ -750,7 +750,7 @@ void AcceptedVote<VoteImpl>::ChangeVote(util::PassKey<VoteReceipt<VoteImpl>>,
template <class VoteImpl>
void AcceptedVote<VoteImpl>::InvalidateVote(
util::PassKey<VoteReceipt<VoteImpl>>,
base::PassKey<VoteReceipt<VoteImpl>>,
VoteReceipt<VoteImpl>* receipt) {
DCHECK(receipt);
DCHECK_EQ(receipt_, receipt);
@ -830,7 +830,7 @@ void VotingChannel<VoteImpl>::Reset() {
template <class VoteImpl>
VotingChannel<VoteImpl>::VotingChannel(
util::PassKey<VotingChannelFactory<VoteImpl>>,
base::PassKey<VotingChannelFactory<VoteImpl>>,
VotingChannelFactory<VoteImpl>* factory,
VoterId<VoteImpl> voter_id)
: factory_(factory), voter_id_(voter_id) {}
@ -866,12 +866,12 @@ VotingChannel<VoteImpl> VotingChannelFactory<VoteImpl>::BuildVotingChannel() {
VoterId<VoteImpl> new_voter_id =
VoterId<VoteImpl>::FromUnsafeValue(++voting_channels_issued_);
return VotingChannel<VoteImpl>(
util::PassKey<VotingChannelFactory<VoteImpl>>(), this, new_voter_id);
base::PassKey<VotingChannelFactory<VoteImpl>>(), this, new_voter_id);
}
template <class VoteImpl>
void VotingChannelFactory<VoteImpl>::OnVotingChannelDestroyed(
util::PassKey<VotingChannel<VoteImpl>>) {
base::PassKey<VotingChannel<VoteImpl>>) {
DCHECK_LT(0u, voting_channels_outstanding_);
--voting_channels_outstanding_;
}
@ -907,7 +907,7 @@ VoteConsumerDefaultImpl<VoteImpl>::BuildVotingChannel() {
template <class VoteImpl>
VoteReceipt<VoteImpl> VoteConsumerDefaultImpl<VoteImpl>::SubmitVote(
util::PassKey<VotingChannel<VoteImpl>>,
base::PassKey<VotingChannel<VoteImpl>>,
VoterId<VoteImpl> voter_id,
const ContextType* context,
const VoteImpl& vote) {
@ -928,7 +928,7 @@ VoteReceipt<VoteImpl> VoteConsumerDefaultImpl<VoteImpl>::SubmitVote(
template <class VoteImpl>
void VoteConsumerDefaultImpl<VoteImpl>::ChangeVote(
util::PassKey<AcceptedVote<VoteImpl>>,
base::PassKey<AcceptedVote<VoteImpl>>,
AcceptedVote<VoteImpl>* old_vote,
const VoteImpl& new_vote) {
VoterId<VoteImpl> voter_id = old_vote->voter_id();
@ -948,7 +948,7 @@ void VoteConsumerDefaultImpl<VoteImpl>::ChangeVote(
template <class VoteImpl>
void VoteConsumerDefaultImpl<VoteImpl>::VoteInvalidated(
util::PassKey<AcceptedVote<VoteImpl>>,
base::PassKey<AcceptedVote<VoteImpl>>,
AcceptedVote<VoteImpl>* vote) {
VoterId<VoteImpl> voter_id = vote->voter_id();
auto& accepted_votes = accepted_votes_by_voter_id_[voter_id];

@ -33,14 +33,14 @@ class DummyVoteConsumer : public VoteConsumer<VoteImpl> {
DummyVoteConsumer& operator=(const DummyVoteConsumer& rhs) = delete;
// VoteConsumer implementation:
VoteReceipt<VoteImpl> SubmitVote(util::PassKey<VotingChannel>,
VoteReceipt<VoteImpl> SubmitVote(base::PassKey<VotingChannel>,
voting::VoterId<VoteImpl> voter_id,
const ContextType* context,
const VoteImpl& vote) override;
void ChangeVote(util::PassKey<AcceptedVote>,
void ChangeVote(base::PassKey<AcceptedVote>,
AcceptedVote* old_vote,
const VoteImpl& new_vote) override;
void VoteInvalidated(util::PassKey<AcceptedVote>,
void VoteInvalidated(base::PassKey<AcceptedVote>,
AcceptedVote* vote) override;
void ExpectInvalidVote(size_t index);
@ -125,7 +125,7 @@ DummyVoteConsumer<VoteImpl>::~DummyVoteConsumer() = default;
template <class VoteImpl>
VoteReceipt<VoteImpl> DummyVoteConsumer<VoteImpl>::SubmitVote(
util::PassKey<VotingChannel>,
base::PassKey<VotingChannel>,
voting::VoterId<VoteImpl> voter_id,
const ContextType* context,
const VoteImpl& vote) {
@ -144,7 +144,7 @@ VoteReceipt<VoteImpl> DummyVoteConsumer<VoteImpl>::SubmitVote(
}
template <class VoteImpl>
void DummyVoteConsumer<VoteImpl>::ChangeVote(util::PassKey<AcceptedVote>,
void DummyVoteConsumer<VoteImpl>::ChangeVote(base::PassKey<AcceptedVote>,
AcceptedVote* old_vote,
const VoteImpl& new_vote) {
// We should own this vote and it should be valid.
@ -158,7 +158,7 @@ void DummyVoteConsumer<VoteImpl>::ChangeVote(util::PassKey<AcceptedVote>,
}
template <class VoteImpl>
void DummyVoteConsumer<VoteImpl>::VoteInvalidated(util::PassKey<AcceptedVote>,
void DummyVoteConsumer<VoteImpl>::VoteInvalidated(base::PassKey<AcceptedVote>,
AcceptedVote* vote) {
// We should own this vote.
EXPECT_LE(votes_.data(), vote);

@ -87,7 +87,7 @@ const V8ContextTracker::V8ContextState* V8ContextTracker::GetV8ContextState(
}
void V8ContextTracker::OnV8ContextCreated(
util::PassKey<ProcessNodeImpl> key,
base::PassKey<ProcessNodeImpl> key,
ProcessNodeImpl* process_node,
const mojom::V8ContextDescription& description,
mojom::IframeAttributionDataPtr iframe_attribution_data) {
@ -162,7 +162,7 @@ void V8ContextTracker::OnV8ContextCreated(
}
void V8ContextTracker::OnV8ContextDetached(
util::PassKey<ProcessNodeImpl> key,
base::PassKey<ProcessNodeImpl> key,
ProcessNodeImpl* process_node,
const blink::V8ContextToken& v8_context_token) {
DCHECK_ON_GRAPH_SEQUENCE(process_node->graph());
@ -181,7 +181,7 @@ void V8ContextTracker::OnV8ContextDetached(
}
void V8ContextTracker::OnV8ContextDestroyed(
util::PassKey<ProcessNodeImpl> key,
base::PassKey<ProcessNodeImpl> key,
ProcessNodeImpl* process_node,
const blink::V8ContextToken& v8_context_token) {
DCHECK_ON_GRAPH_SEQUENCE(process_node->graph());
@ -196,7 +196,7 @@ void V8ContextTracker::OnV8ContextDestroyed(
}
void V8ContextTracker::OnRemoteIframeAttached(
util::PassKey<ProcessNodeImpl> key,
base::PassKey<ProcessNodeImpl> key,
FrameNodeImpl* parent_frame_node,
const blink::RemoteFrameToken& remote_frame_token,
mojom::IframeAttributionDataPtr iframe_attribution_data) {
@ -284,7 +284,7 @@ void V8ContextTracker::OnRemoteIframeAttached(
}
void V8ContextTracker::OnRemoteIframeDetached(
util::PassKey<ProcessNodeImpl> key,
base::PassKey<ProcessNodeImpl> key,
FrameNodeImpl* parent_frame_node,
const blink::RemoteFrameToken& remote_frame_token) {
DCHECK_ON_GRAPH_SEQUENCE(parent_frame_node->graph());

@ -7,7 +7,7 @@
#include <memory>
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "components/performance_manager/public/execution_context/execution_context.h"
#include "components/performance_manager/public/graph/graph.h"
#include "components/performance_manager/public/graph/graph_registered.h"
@ -135,7 +135,7 @@ class V8ContextTracker final
// parent frame. See the V8ContextWorldType enum for a description of the
// relationship between world types, world names and execution contexts.
void OnV8ContextCreated(
util::PassKey<ProcessNodeImpl> key,
base::PassKey<ProcessNodeImpl> key,
ProcessNodeImpl* process_node,
const mojom::V8ContextDescription& description,
mojom::IframeAttributionDataPtr iframe_attribution_data);
@ -147,14 +147,14 @@ class V8ContextTracker final
// context. All ExecutionContext-associated V8Contexts will have this method
// called before they are destroyed, and it will not be called for other
// V8Contexts (they are never considered detached).
void OnV8ContextDetached(util::PassKey<ProcessNodeImpl> key,
void OnV8ContextDetached(base::PassKey<ProcessNodeImpl> key,
ProcessNodeImpl* process_node,
const blink::V8ContextToken& v8_context_token);
// Notifies the tracker that a V8Context has been garbage collected. This will
// only be called after OnV8ContextDetached if the OnV8ContextCreated had a
// non-empty |execution_context_token|.
void OnV8ContextDestroyed(util::PassKey<ProcessNodeImpl> key,
void OnV8ContextDestroyed(base::PassKey<ProcessNodeImpl> key,
ProcessNodeImpl* process_node,
const blink::V8ContextToken& v8_context_token);
@ -165,7 +165,7 @@ class V8ContextTracker final
// be called for bookkeeping. This should only be called once for a given
// |remote_frame_token|.
void OnRemoteIframeAttached(
util::PassKey<ProcessNodeImpl> key,
base::PassKey<ProcessNodeImpl> key,
FrameNodeImpl* parent_frame_node,
const blink::RemoteFrameToken& remote_frame_token,
mojom::IframeAttributionDataPtr iframe_attribution_data);
@ -180,7 +180,7 @@ class V8ContextTracker final
// |remote_frame_token|, and only after a matching "OnRemoteIframeAttached"
// call.
void OnRemoteIframeDetached(
util::PassKey<ProcessNodeImpl> key,
base::PassKey<ProcessNodeImpl> key,
FrameNodeImpl* parent_frame_node,
const blink::RemoteFrameToken& remote_frame_token);

@ -38,7 +38,7 @@ bool ExecutionContextData::ShouldDestroy() const {
}
void ExecutionContextData::SetRemoteFrameData(
util::PassKey<RemoteFrameData>,
base::PassKey<RemoteFrameData>,
RemoteFrameData* remote_frame_data) {
DCHECK(!remote_frame_data_);
DCHECK(remote_frame_data);
@ -46,26 +46,26 @@ void ExecutionContextData::SetRemoteFrameData(
}
bool ExecutionContextData::ClearRemoteFrameData(
util::PassKey<RemoteFrameData>) {
base::PassKey<RemoteFrameData>) {
DCHECK(remote_frame_data_);
remote_frame_data_ = nullptr;
return ShouldDestroy();
}
void ExecutionContextData::IncrementV8ContextCount(
util::PassKey<V8ContextData>) {
base::PassKey<V8ContextData>) {
++v8_context_count_;
}
bool ExecutionContextData::DecrementV8ContextCount(
util::PassKey<V8ContextData>) {
base::PassKey<V8ContextData>) {
DCHECK_LT(0u, v8_context_count_);
DCHECK_LT(main_nondetached_v8_context_count_, v8_context_count_);
--v8_context_count_;
return ShouldDestroy();
}
bool ExecutionContextData::MarkDestroyed(util::PassKey<ProcessData>) {
bool ExecutionContextData::MarkDestroyed(base::PassKey<ProcessData>) {
if (destroyed)
return false;
destroyed = true;
@ -73,7 +73,7 @@ bool ExecutionContextData::MarkDestroyed(util::PassKey<ProcessData>) {
}
bool ExecutionContextData::MarkMainV8ContextCreated(
util::PassKey<V8ContextTrackerDataStore>) {
base::PassKey<V8ContextTrackerDataStore>) {
if (main_nondetached_v8_context_count_ >= v8_context_count_)
return false;
if (main_nondetached_v8_context_count_ >= 1)
@ -83,7 +83,7 @@ bool ExecutionContextData::MarkMainV8ContextCreated(
}
void ExecutionContextData::MarkMainV8ContextDetached(
util::PassKey<V8ContextData>) {
base::PassKey<V8ContextData>) {
DCHECK_LT(0u, main_nondetached_v8_context_count_);
--main_nondetached_v8_context_count_;
}
@ -165,12 +165,12 @@ ExecutionContextData* V8ContextData::GetExecutionContextData() const {
return static_cast<ExecutionContextData*>(execution_context_state);
}
void V8ContextData::SetWasTracked(util::PassKey<V8ContextTrackerDataStore>) {
void V8ContextData::SetWasTracked(base::PassKey<V8ContextTrackerDataStore>) {
DCHECK(!was_tracked_);
was_tracked_ = true;
}
bool V8ContextData::MarkDetached(util::PassKey<ProcessData>) {
bool V8ContextData::MarkDetached(base::PassKey<ProcessData>) {
return MarkDetachedImpl();
}
@ -253,7 +253,7 @@ void ProcessData::TearDown() {
DCHECK(v8_context_datas_.empty());
}
void ProcessData::Add(util::PassKey<V8ContextTrackerDataStore>,
void ProcessData::Add(base::PassKey<V8ContextTrackerDataStore>,
ExecutionContextData* ec_data) {
DCHECK(ec_data);
DCHECK_EQ(this, ec_data->process_data());
@ -263,7 +263,7 @@ void ProcessData::Add(util::PassKey<V8ContextTrackerDataStore>,
counts_.IncrementExecutionContextDataCount();
}
void ProcessData::Add(util::PassKey<V8ContextTrackerDataStore>,
void ProcessData::Add(base::PassKey<V8ContextTrackerDataStore>,
RemoteFrameData* rf_data) {
DCHECK(rf_data);
DCHECK_EQ(this, rf_data->process_data());
@ -271,7 +271,7 @@ void ProcessData::Add(util::PassKey<V8ContextTrackerDataStore>,
remote_frame_datas_.Append(rf_data);
}
void ProcessData::Add(util::PassKey<V8ContextTrackerDataStore>,
void ProcessData::Add(base::PassKey<V8ContextTrackerDataStore>,
V8ContextData* v8_data) {
DCHECK(v8_data);
DCHECK_EQ(this, v8_data->process_data());
@ -280,7 +280,7 @@ void ProcessData::Add(util::PassKey<V8ContextTrackerDataStore>,
counts_.IncrementV8ContextDataCount();
}
void ProcessData::Remove(util::PassKey<V8ContextTrackerDataStore>,
void ProcessData::Remove(base::PassKey<V8ContextTrackerDataStore>,
ExecutionContextData* ec_data) {
DCHECK(ec_data);
DCHECK_EQ(this, ec_data->process_data());
@ -290,7 +290,7 @@ void ProcessData::Remove(util::PassKey<V8ContextTrackerDataStore>,
ec_data->RemoveFromList();
}
void ProcessData::Remove(util::PassKey<V8ContextTrackerDataStore>,
void ProcessData::Remove(base::PassKey<V8ContextTrackerDataStore>,
RemoteFrameData* rf_data) {
DCHECK(rf_data);
DCHECK_EQ(this, rf_data->process_data());
@ -298,7 +298,7 @@ void ProcessData::Remove(util::PassKey<V8ContextTrackerDataStore>,
rf_data->RemoveFromList();
}
void ProcessData::Remove(util::PassKey<V8ContextTrackerDataStore>,
void ProcessData::Remove(base::PassKey<V8ContextTrackerDataStore>,
V8ContextData* v8_data) {
DCHECK(v8_data);
DCHECK_EQ(this, v8_data->process_data());
@ -307,7 +307,7 @@ void ProcessData::Remove(util::PassKey<V8ContextTrackerDataStore>,
v8_data->RemoveFromList();
}
bool ProcessData::MarkDestroyed(util::PassKey<V8ContextTrackerDataStore>,
bool ProcessData::MarkDestroyed(base::PassKey<V8ContextTrackerDataStore>,
ExecutionContextData* ec_data) {
bool result = ec_data->MarkDestroyed(PassKey());
if (result)
@ -315,7 +315,7 @@ bool ProcessData::MarkDestroyed(util::PassKey<V8ContextTrackerDataStore>,
return result;
}
bool ProcessData::MarkDetached(util::PassKey<V8ContextTrackerDataStore>,
bool ProcessData::MarkDetached(base::PassKey<V8ContextTrackerDataStore>,
V8ContextData* v8_data) {
bool result = v8_data->MarkDetached(PassKey());
if (result)

@ -15,7 +15,7 @@
#include "base/compiler_specific.h"
#include "base/containers/linked_list.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "components/performance_manager/graph/node_attached_data_impl.h"
#include "components/performance_manager/graph/process_node_impl.h"
#include "components/performance_manager/public/mojom/v8_contexts.mojom.h"
@ -92,28 +92,28 @@ class ExecutionContextData : public base::LinkNode<ExecutionContextData>,
WARN_UNUSED_RESULT bool ShouldDestroy() const;
// Manages remote frame data associated with this ExecutionContextData.
void SetRemoteFrameData(util::PassKey<RemoteFrameData>,
void SetRemoteFrameData(base::PassKey<RemoteFrameData>,
RemoteFrameData* remote_frame_data);
WARN_UNUSED_RESULT bool ClearRemoteFrameData(util::PassKey<RemoteFrameData>);
WARN_UNUSED_RESULT bool ClearRemoteFrameData(base::PassKey<RemoteFrameData>);
// Increments |v8_context_count_|.
void IncrementV8ContextCount(util::PassKey<V8ContextData>);
void IncrementV8ContextCount(base::PassKey<V8ContextData>);
// Decrements |v8_context_count_|, and returns true if the object has
// transitioned to "ShouldDestroy".
WARN_UNUSED_RESULT bool DecrementV8ContextCount(util::PassKey<V8ContextData>);
WARN_UNUSED_RESULT bool DecrementV8ContextCount(base::PassKey<V8ContextData>);
// Marks this context as destroyed. Returns true if the state changed, false
// if it was already destroyed.
WARN_UNUSED_RESULT bool MarkDestroyed(util::PassKey<ProcessData>);
WARN_UNUSED_RESULT bool MarkDestroyed(base::PassKey<ProcessData>);
// Used for tracking the total number of non-detached "main" V8Contexts
// associated with this ExecutionContext. This should always be no more than
// 1. A new context may become the main context during a same-document
// navigation of a frame.
WARN_UNUSED_RESULT bool MarkMainV8ContextCreated(
util::PassKey<V8ContextTrackerDataStore>);
void MarkMainV8ContextDetached(util::PassKey<V8ContextData>);
base::PassKey<V8ContextTrackerDataStore>);
void MarkMainV8ContextDetached(base::PassKey<V8ContextData>);
private:
ProcessData* const process_data_;
@ -139,7 +139,7 @@ class ExecutionContextData : public base::LinkNode<ExecutionContextData>,
class RemoteFrameData : public base::LinkNode<RemoteFrameData> {
public:
using Comparator = TokenComparator<RemoteFrameData, blink::RemoteFrameToken>;
using PassKey = util::PassKey<RemoteFrameData>;
using PassKey = base::PassKey<RemoteFrameData>;
RemoteFrameData() = delete;
RemoteFrameData(ProcessData* process_data,
@ -178,7 +178,7 @@ class V8ContextData : public base::LinkNode<V8ContextData>,
public V8ContextState {
public:
using Comparator = TokenComparator<V8ContextData, blink::V8ContextToken>;
using PassKey = util::PassKey<V8ContextData>;
using PassKey = base::PassKey<V8ContextData>;
V8ContextData() = delete;
V8ContextData(ProcessData* process_data,
@ -203,11 +203,11 @@ class V8ContextData : public base::LinkNode<V8ContextData>,
ExecutionContextData* GetExecutionContextData() const;
// Marks this context as having been successfully passed into the data store.
void SetWasTracked(util::PassKey<V8ContextTrackerDataStore>);
void SetWasTracked(base::PassKey<V8ContextTrackerDataStore>);
// Marks this context as detached. Returns true if the state changed, false
// if it was already detached.
WARN_UNUSED_RESULT bool MarkDetached(util::PassKey<ProcessData>);
WARN_UNUSED_RESULT bool MarkDetached(base::PassKey<ProcessData>);
// Returns true if this is the "main" V8Context for an ExecutionContext.
// This will return true if |GetExecutionContextData()| is a frame and
@ -229,7 +229,7 @@ class ProcessData : public NodeAttachedDataImpl<ProcessData> {
public:
struct Traits : public NodeAttachedDataInMap<ProcessNodeImpl> {};
using PassKey = util::PassKey<ProcessData>;
using PassKey = base::PassKey<ProcessData>;
explicit ProcessData(const ProcessNodeImpl* process_node);
~ProcessData() override;
@ -247,22 +247,22 @@ class ProcessData : public NodeAttachedDataImpl<ProcessData> {
// and it must return false for "ShouldDestroy" (if applicable). For removal,
// the object must be part of a list, the process data must match this one and
// "ShouldDestroy" must return false.
void Add(util::PassKey<V8ContextTrackerDataStore>,
void Add(base::PassKey<V8ContextTrackerDataStore>,
ExecutionContextData* ec_data);
void Add(util::PassKey<V8ContextTrackerDataStore>, RemoteFrameData* rf_data);
void Add(util::PassKey<V8ContextTrackerDataStore>, V8ContextData* v8_data);
void Remove(util::PassKey<V8ContextTrackerDataStore>,
void Add(base::PassKey<V8ContextTrackerDataStore>, RemoteFrameData* rf_data);
void Add(base::PassKey<V8ContextTrackerDataStore>, V8ContextData* v8_data);
void Remove(base::PassKey<V8ContextTrackerDataStore>,
ExecutionContextData* ec_data);
void Remove(util::PassKey<V8ContextTrackerDataStore>,
void Remove(base::PassKey<V8ContextTrackerDataStore>,
RemoteFrameData* rf_data);
void Remove(util::PassKey<V8ContextTrackerDataStore>, V8ContextData* v8_data);
void Remove(base::PassKey<V8ContextTrackerDataStore>, V8ContextData* v8_data);
// For marking objects detached/destroyed. Returns true if the state
// actually changed, false otherwise.
WARN_UNUSED_RESULT bool MarkDestroyed(
util::PassKey<V8ContextTrackerDataStore>,
base::PassKey<V8ContextTrackerDataStore>,
ExecutionContextData* ec_data);
WARN_UNUSED_RESULT bool MarkDetached(util::PassKey<V8ContextTrackerDataStore>,
WARN_UNUSED_RESULT bool MarkDetached(base::PassKey<V8ContextTrackerDataStore>,
V8ContextData* v8_data);
size_t GetExecutionContextDataCount() const {
@ -309,7 +309,7 @@ class ProcessData : public NodeAttachedDataImpl<ProcessData> {
// per-process lists is centralized through this object.
class V8ContextTrackerDataStore {
public:
using PassKey = util::PassKey<V8ContextTrackerDataStore>;
using PassKey = base::PassKey<V8ContextTrackerDataStore>;
V8ContextTrackerDataStore();
~V8ContextTrackerDataStore();

@ -14,7 +14,7 @@
#include "base/stl_util.h"
#include "base/threading/sequenced_task_runner_handle.h"
#include "base/timer/timer.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "components/performance_manager/public/graph/frame_node.h"
#include "components/performance_manager/public/graph/node_attached_data.h"
#include "components/performance_manager/public/graph/node_data_describer_registry.h"
@ -74,7 +74,7 @@ class V8DetailedMemoryDecorator::ObserverNotifier {
V8DetailedMemoryDecorator::GetFromGraph(process_node->GetGraph());
if (decorator)
decorator->NotifyObserversOnMeasurementAvailable(
util::PassKey<ObserverNotifier>(), process_node);
base::PassKey<ObserverNotifier>(), process_node);
}
};
@ -596,7 +596,7 @@ V8DetailedMemoryRequest::V8DetailedMemoryRequest(
// This constructor is called from the V8DetailedMemoryRequestAnySeq's
// sequence.
V8DetailedMemoryRequest::V8DetailedMemoryRequest(
util::PassKey<V8DetailedMemoryRequestAnySeq>,
base::PassKey<V8DetailedMemoryRequestAnySeq>,
const base::TimeDelta& min_time_between_requests,
MeasurementMode mode,
base::Optional<base::WeakPtr<ProcessNode>> process_to_measure,
@ -614,7 +614,7 @@ V8DetailedMemoryRequest::V8DetailedMemoryRequest(
}
V8DetailedMemoryRequest::V8DetailedMemoryRequest(
util::PassKey<V8DetailedMemoryRequestOneShot>,
base::PassKey<V8DetailedMemoryRequestOneShot>,
MeasurementMode mode,
base::OnceClosure on_owner_unregistered_closure)
: min_time_between_requests_(base::TimeDelta()),
@ -628,7 +628,7 @@ V8DetailedMemoryRequest::~V8DetailedMemoryRequest() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (decorator_)
decorator_->RemoveMeasurementRequest(
util::PassKey<V8DetailedMemoryRequest>(), this);
base::PassKey<V8DetailedMemoryRequest>(), this);
// TODO(crbug.com/1080672): Delete the decorator and its NodeAttachedData
// when the last request is destroyed. Make sure this doesn't mess up any
// measurement that's already in progress.
@ -660,7 +660,7 @@ void V8DetailedMemoryRequest::RemoveObserver(
}
void V8DetailedMemoryRequest::OnOwnerUnregistered(
util::PassKey<V8DetailedMemoryDecorator::MeasurementRequestQueue>) {
base::PassKey<V8DetailedMemoryDecorator::MeasurementRequestQueue>) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
decorator_ = nullptr;
if (on_owner_unregistered_closure_)
@ -668,7 +668,7 @@ void V8DetailedMemoryRequest::OnOwnerUnregistered(
}
void V8DetailedMemoryRequest::NotifyObserversOnMeasurementAvailable(
util::PassKey<V8DetailedMemoryDecorator::MeasurementRequestQueue>,
base::PassKey<V8DetailedMemoryDecorator::MeasurementRequestQueue>,
const ProcessNode* process_node) const {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
const auto* process_data =
@ -699,7 +699,7 @@ void V8DetailedMemoryRequest::NotifyObserversOnMeasurementAvailable(
base::BindOnce(&V8DetailedMemoryRequestAnySeq::
NotifyObserversOnMeasurementAvailable,
off_sequence_request_,
util::PassKey<V8DetailedMemoryRequest>(),
base::PassKey<V8DetailedMemoryRequest>(),
process_node->GetRenderProcessHostId(), *process_data,
V8DetailedMemoryObserverAnySeq::FrameDataMap(
std::move(all_frame_data))));
@ -741,7 +741,7 @@ void V8DetailedMemoryRequest::StartMeasurementImpl(
graph->PassToGraph(std::move(decorator_ptr));
}
decorator_->AddMeasurementRequest(util::PassKey<V8DetailedMemoryRequest>(),
decorator_->AddMeasurementRequest(base::PassKey<V8DetailedMemoryRequest>(),
this, process_node);
}
@ -801,7 +801,7 @@ void V8DetailedMemoryRequestOneShot::OnV8MemoryMeasurementAvailable(
// This constructor is called from the V8DetailedMemoryRequestOneShotAnySeq's
// sequence.
V8DetailedMemoryRequestOneShot::V8DetailedMemoryRequestOneShot(
util::PassKey<V8DetailedMemoryRequestOneShotAnySeq>,
base::PassKey<V8DetailedMemoryRequestOneShotAnySeq>,
base::WeakPtr<ProcessNode> process,
MeasurementCallback callback,
MeasurementMode mode)
@ -823,7 +823,7 @@ V8DetailedMemoryRequestOneShot::V8DetailedMemoryRequestOneShot(
void V8DetailedMemoryRequestOneShot::InitializeRequest() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
request_ = std::make_unique<V8DetailedMemoryRequest>(
util::PassKey<V8DetailedMemoryRequestOneShot>(), mode_,
base::PassKey<V8DetailedMemoryRequestOneShot>(), mode_,
base::BindOnce(&V8DetailedMemoryRequestOneShot::OnOwnerUnregistered,
// Unretained is safe because |this| owns the request
// object that will invoke the closure.
@ -985,7 +985,7 @@ V8DetailedMemoryDecorator::GetNextBoundedRequest() const {
}
void V8DetailedMemoryDecorator::AddMeasurementRequest(
util::PassKey<V8DetailedMemoryRequest> key,
base::PassKey<V8DetailedMemoryRequest> key,
V8DetailedMemoryRequest* request,
const ProcessNode* process_node) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@ -1000,7 +1000,7 @@ void V8DetailedMemoryDecorator::AddMeasurementRequest(
}
void V8DetailedMemoryDecorator::RemoveMeasurementRequest(
util::PassKey<V8DetailedMemoryRequest> key,
base::PassKey<V8DetailedMemoryRequest> key,
V8DetailedMemoryRequest* request) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
// Attempt to remove this request from all process-specific queues and the
@ -1039,7 +1039,7 @@ void V8DetailedMemoryDecorator::UpdateProcessMeasurementSchedules() const {
}
void V8DetailedMemoryDecorator::NotifyObserversOnMeasurementAvailable(
util::PassKey<ObserverNotifier> key,
base::PassKey<ObserverNotifier> key,
const ProcessNode* process_node) const {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
measurement_requests_->NotifyObserversOnMeasurementAvailable(process_node);
@ -1112,7 +1112,7 @@ void V8DetailedMemoryDecorator::MeasurementRequestQueue::
ApplyToAllRequests(base::BindRepeating(
[](const ProcessNode* process_node, V8DetailedMemoryRequest* request) {
request->NotifyObserversOnMeasurementAvailable(
util::PassKey<MeasurementRequestQueue>(), process_node);
base::PassKey<MeasurementRequestQueue>(), process_node);
},
process_node));
}
@ -1120,7 +1120,7 @@ void V8DetailedMemoryDecorator::MeasurementRequestQueue::
void V8DetailedMemoryDecorator::MeasurementRequestQueue::OnOwnerUnregistered() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
ApplyToAllRequests(base::BindRepeating([](V8DetailedMemoryRequest* request) {
request->OnOwnerUnregistered(util::PassKey<MeasurementRequestQueue>());
request->OnOwnerUnregistered(base::PassKey<MeasurementRequestQueue>());
}));
bounded_measurement_requests_.clear();
lazy_measurement_requests_.clear();
@ -1225,7 +1225,7 @@ void V8DetailedMemoryRequestAnySeq::RemoveObserver(
}
void V8DetailedMemoryRequestAnySeq::NotifyObserversOnMeasurementAvailable(
util::PassKey<V8DetailedMemoryRequest>,
base::PassKey<V8DetailedMemoryRequest>,
RenderProcessHostId render_process_host_id,
const V8DetailedMemoryProcessData& process_data,
const V8DetailedMemoryObserverAnySeq::FrameDataMap& frame_data) const {
@ -1244,7 +1244,7 @@ void V8DetailedMemoryRequestAnySeq::InitializeWrappedRequest(
// constructor. After construction the V8DetailedMemoryRequest must only be
// accessed on the graph sequence.
request_ = base::WrapUnique(new V8DetailedMemoryRequest(
util::PassKey<V8DetailedMemoryRequestAnySeq>(), min_time_between_requests,
base::PassKey<V8DetailedMemoryRequestAnySeq>(), min_time_between_requests,
mode, std::move(process_to_measure), weak_factory_.GetWeakPtr()));
}
@ -1313,7 +1313,7 @@ void V8DetailedMemoryRequestOneShotAnySeq::InitializeWrappedRequest(
// constructor. After construction the V8DetailedMemoryRequestOneShot must
// only be accessed on the graph sequence.
request_ = base::WrapUnique(new V8DetailedMemoryRequestOneShot(
util::PassKey<V8DetailedMemoryRequestOneShotAnySeq>(),
base::PassKey<V8DetailedMemoryRequestOneShotAnySeq>(),
std::move(process_node), std::move(wrapped_callback), mode));
}

@ -9,7 +9,7 @@
#include "base/component_export.h"
#include "base/files/file_path.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "components/services/storage/public/cpp/filesystem/file_error_or.h"
#include "components/services/storage/public/mojom/filesystem/directory.mojom.h"

@ -13,7 +13,7 @@
#include "base/files/file_util.h"
#include "base/files/important_file_writer.h"
#include "base/task/post_task.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "build/build_config.h"
#include "components/services/storage/public/cpp/filesystem/filesystem_impl.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"

@ -12,7 +12,7 @@
#include "base/files/file_path.h"
#include "base/memory/scoped_refptr.h"
#include "base/sequenced_task_runner.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "components/services/storage/public/cpp/filesystem/file_error_or.h"
#include "components/services/storage/public/mojom/filesystem/directory.mojom.h"
#include "mojo/public/cpp/bindings/pending_remote.h"

@ -7,7 +7,7 @@
#include <memory>
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "components/signin/public/identity_manager/account_info.h"
#include "components/version_info/version_info.h"
@ -74,7 +74,7 @@ extern const char kTypes[];
extern const char kOnInvalidationReceived[];
using IncludeSensitiveData =
util::StrongAlias<class IncludeSensitiveDataTag, bool>;
base::StrongAlias<class IncludeSensitiveDataTag, bool>;
// This function returns a DictionaryValue which contains all the information
// required to populate the 'About' tab of chrome://sync-internals.
// Note that |service| may be null.

@ -34,7 +34,7 @@ std::unique_ptr<SkiaOutputDeviceVulkan> SkiaOutputDeviceVulkan::Create(
gpu::MemoryTracker* memory_tracker,
DidSwapBufferCompleteCallback did_swap_buffer_complete_callback) {
auto output_device = std::make_unique<SkiaOutputDeviceVulkan>(
util::PassKey<SkiaOutputDeviceVulkan>(), context_provider, surface_handle,
base::PassKey<SkiaOutputDeviceVulkan>(), context_provider, surface_handle,
memory_tracker, did_swap_buffer_complete_callback);
if (UNLIKELY(!output_device->Initialize()))
return nullptr;
@ -42,7 +42,7 @@ std::unique_ptr<SkiaOutputDeviceVulkan> SkiaOutputDeviceVulkan::Create(
}
SkiaOutputDeviceVulkan::SkiaOutputDeviceVulkan(
util::PassKey<SkiaOutputDeviceVulkan>,
base::PassKey<SkiaOutputDeviceVulkan>,
VulkanContextProvider* context_provider,
gpu::SurfaceHandle surface_handle,
gpu::MemoryTracker* memory_tracker,

@ -11,7 +11,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/optional.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "build/build_config.h"
#include "components/viz/service/display_embedder/skia_output_device.h"
#include "gpu/ipc/common/surface_handle.h"
@ -28,7 +28,7 @@ class VulkanContextProvider;
class SkiaOutputDeviceVulkan final : public SkiaOutputDevice {
public:
SkiaOutputDeviceVulkan(
util::PassKey<SkiaOutputDeviceVulkan>,
base::PassKey<SkiaOutputDeviceVulkan>,
VulkanContextProvider* context_provider,
gpu::SurfaceHandle surface_handle,
gpu::MemoryTracker* memory_tracker,

@ -98,7 +98,7 @@ std::unique_ptr<SkiaOutputSurface> SkiaOutputSurfaceImpl::Create(
DCHECK(display_controller->skia_dependency());
DCHECK(display_controller->gpu_task_scheduler());
auto output_surface = std::make_unique<SkiaOutputSurfaceImpl>(
util::PassKey<SkiaOutputSurfaceImpl>(), display_controller,
base::PassKey<SkiaOutputSurfaceImpl>(), display_controller,
renderer_settings, debug_settings);
if (!output_surface->Initialize())
output_surface = nullptr;
@ -106,7 +106,7 @@ std::unique_ptr<SkiaOutputSurface> SkiaOutputSurfaceImpl::Create(
}
SkiaOutputSurfaceImpl::SkiaOutputSurfaceImpl(
util::PassKey<SkiaOutputSurfaceImpl> /* pass_key */,
base::PassKey<SkiaOutputSurfaceImpl> /* pass_key */,
DisplayCompositorMemoryAndTaskController* display_controller,
const RendererSettings& renderer_settings,
const DebugRendererSettings* debug_settings)

@ -12,7 +12,7 @@
#include "base/observer_list.h"
#include "base/optional.h"
#include "base/threading/thread_checker.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "build/build_config.h"
#include "components/viz/common/display/renderer_settings.h"
#include "components/viz/common/resources/resource_id.h"
@ -50,7 +50,7 @@ class VIZ_SERVICE_EXPORT SkiaOutputSurfaceImpl : public SkiaOutputSurface {
const DebugRendererSettings* debug_settings);
SkiaOutputSurfaceImpl(
util::PassKey<SkiaOutputSurfaceImpl> pass_key,
base::PassKey<SkiaOutputSurfaceImpl> pass_key,
DisplayCompositorMemoryAndTaskController* display_controller,
const RendererSettings& renderer_settings,
const DebugRendererSettings* debug_settings);

@ -382,7 +382,7 @@ std::unique_ptr<SkiaOutputSurfaceImplOnGpu> SkiaOutputSurfaceImplOnGpu::Create(
context_state->set_need_context_state_reset(true);
auto impl_on_gpu = std::make_unique<SkiaOutputSurfaceImplOnGpu>(
util::PassKey<SkiaOutputSurfaceImplOnGpu>(), deps,
base::PassKey<SkiaOutputSurfaceImplOnGpu>(), deps,
context_state->feature_info(), renderer_settings, sequence_id,
shared_gpu_deps, std::move(did_swap_buffer_complete_callback),
std::move(buffer_presented_callback), std::move(context_lost_callback),
@ -394,7 +394,7 @@ std::unique_ptr<SkiaOutputSurfaceImplOnGpu> SkiaOutputSurfaceImplOnGpu::Create(
}
SkiaOutputSurfaceImplOnGpu::SkiaOutputSurfaceImplOnGpu(
util::PassKey<SkiaOutputSurfaceImplOnGpu> /* pass_key */,
base::PassKey<SkiaOutputSurfaceImplOnGpu> /* pass_key */,
SkiaOutputSurfaceDependency* deps,
scoped_refptr<gpu::gles2::FeatureInfo> feature_info,
const RendererSettings& renderer_settings,

@ -12,7 +12,7 @@
#include "base/macros.h"
#include "base/optional.h"
#include "base/threading/thread_checker.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "build/build_config.h"
#include "components/viz/common/display/renderer_settings.h"
#include "components/viz/common/gpu/context_lost_reason.h"
@ -92,7 +92,7 @@ class SkiaOutputSurfaceImplOnGpu
GpuVSyncCallback gpu_vsync_callback);
SkiaOutputSurfaceImplOnGpu(
util::PassKey<SkiaOutputSurfaceImplOnGpu> pass_key,
base::PassKey<SkiaOutputSurfaceImplOnGpu> pass_key,
SkiaOutputSurfaceDependency* deps,
scoped_refptr<gpu::gles2::FeatureInfo> feature_info,
const RendererSettings& renderer_settings,

@ -174,7 +174,7 @@ class EntryReaderImpl : public storage::mojom::BlobDataItemReader {
} // namespace
CacheStorageCacheEntryHandler::DiskCacheBlobEntry::DiskCacheBlobEntry(
util::PassKey<CacheStorageCacheEntryHandler> key,
base::PassKey<CacheStorageCacheEntryHandler> key,
base::WeakPtr<CacheStorageCacheEntryHandler> entry_handler,
CacheStorageCacheHandle cache_handle,
disk_cache::ScopedEntryPtr disk_cache_entry)
@ -326,7 +326,7 @@ CacheStorageCacheEntryHandler::CreateDiskCacheBlobEntry(
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
auto blob_entry =
base::MakeRefCounted<CacheStorageCacheEntryHandler::DiskCacheBlobEntry>(
util::PassKey<CacheStorageCacheEntryHandler>(), GetWeakPtr(),
base::PassKey<CacheStorageCacheEntryHandler>(), GetWeakPtr(),
std::move(cache_handle), std::move(disk_cache_entry));
DCHECK_EQ(blob_entries_.count(blob_entry.get()), 0u);
blob_entries_.insert(blob_entry.get());

@ -12,7 +12,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "content/browser/cache_storage/cache_storage_cache.h"
#include "content/browser/cache_storage/cache_storage_cache_handle.h"
#include "content/browser/cache_storage/cache_storage_manager.h"
@ -72,7 +72,7 @@ class CONTENT_EXPORT CacheStorageCacheEntryHandler {
public:
// Use |CacheStorageCacheEntryHandler::CreateDiskCacheBlobEntry|.
DiskCacheBlobEntry(
util::PassKey<CacheStorageCacheEntryHandler> key,
base::PassKey<CacheStorageCacheEntryHandler> key,
base::WeakPtr<CacheStorageCacheEntryHandler> entry_handler,
CacheStorageCacheHandle cache_handle,
disk_cache::ScopedEntryPtr disk_cache_entry);

@ -136,7 +136,7 @@ struct NativeFileSystemFileWriterImpl::WriteState {
NativeFileSystemFileWriterImpl::NativeFileSystemFileWriterImpl(
NativeFileSystemManagerImpl* manager,
util::PassKey<NativeFileSystemManagerImpl> pass_key,
base::PassKey<NativeFileSystemManagerImpl> pass_key,
const BindingContext& context,
const storage::FileSystemURL& url,
const storage::FileSystemURL& swap_url,

@ -6,7 +6,7 @@
#define CONTENT_BROWSER_FILE_SYSTEM_ACCESS_NATIVE_FILE_SYSTEM_FILE_WRITER_IMPL_H_
#include "base/memory/weak_ptr.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "components/download/public/common/quarantine_connection.h"
#include "components/download/quarantine/quarantine.h"
#include "components/services/filesystem/public/mojom/types.mojom.h"
@ -42,7 +42,7 @@ class CONTENT_EXPORT NativeFileSystemFileWriterImpl
// FileWriters should only be created via the NativeFileSystemManagerImpl.
NativeFileSystemFileWriterImpl(
NativeFileSystemManagerImpl* manager,
util::PassKey<NativeFileSystemManagerImpl> pass_key,
base::PassKey<NativeFileSystemManagerImpl> pass_key,
const BindingContext& context,
const storage::FileSystemURL& url,
const storage::FileSystemURL& swap_url,

@ -10,7 +10,7 @@
#include "base/files/file_path.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/sequence_bound.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "components/download/public/common/quarantine_connection.h"
#include "components/services/storage/public/mojom/native_file_system_context.mojom.h"
#include "content/browser/blob_storage/chrome_blob_storage_context.h"
@ -61,7 +61,7 @@ class CONTENT_EXPORT NativeFileSystemManagerImpl
public storage::mojom::NativeFileSystemContext {
public:
using BindingContext = NativeFileSystemEntryFactory::BindingContext;
using PassKey = util::PassKey<NativeFileSystemManagerImpl>;
using PassKey = base::PassKey<NativeFileSystemManagerImpl>;
// State that is shared between handles that are derived from each other.
// Handles that are created through ChooseEntries or GetSandboxedFileSystem

@ -29,7 +29,6 @@
#include "base/single_thread_task_runner.h"
#include "base/synchronization/waitable_event.h"
#include "base/threading/sequence_bound.h"
#include "base/util/type_safety/pass_key.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "content/browser/child_process_launcher.h"

@ -32,7 +32,7 @@ void BindNewInProcessInstance(
} // namespace
TracingServiceController::ClientRegistration::ClientRegistration(
util::PassKey<TracingServiceController>,
base::PassKey<TracingServiceController>,
base::OnceClosure unregister)
: unregister_(std::move(unregister)) {}
@ -57,7 +57,7 @@ TracingServiceController::RegisterClient(base::ProcessId pid,
base::BindOnce(&TracingServiceController::RemoveClient,
base::Unretained(&TracingServiceController::Get()), pid);
auto registration = std::make_unique<ClientRegistration>(
util::PassKey<TracingServiceController>(), std::move(unregister));
base::PassKey<TracingServiceController>(), std::move(unregister));
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
// Force registration to happen on the UI thread.

@ -11,7 +11,7 @@
#include "base/callback.h"
#include "base/no_destructor.h"
#include "base/process/process_handle.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/tracing/public/mojom/traced_process.mojom.h"
@ -27,7 +27,7 @@ class TracingServiceController {
// the tracing service.
class ClientRegistration {
public:
ClientRegistration(util::PassKey<TracingServiceController>,
ClientRegistration(base::PassKey<TracingServiceController>,
base::OnceClosure unregister);
~ClientRegistration();

@ -8,7 +8,7 @@
#include <string>
#include "base/compiler_specific.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "content/public/browser/url_data_source.h"
namespace content {
@ -21,7 +21,7 @@ namespace content {
// working.
class SharedResourcesDataSource : public URLDataSource {
public:
using PassKey = util::PassKey<SharedResourcesDataSource>;
using PassKey = base::PassKey<SharedResourcesDataSource>;
// Creates a SharedResourcesDataSource instance for chrome://resources.
static std::unique_ptr<SharedResourcesDataSource> CreateForChromeScheme();

@ -130,7 +130,7 @@ VRServiceImpl::VRServiceImpl(content::RenderFrameHost* render_frame_host)
}
// Constructor for testing.
VRServiceImpl::VRServiceImpl(util::PassKey<XRRuntimeManagerTest>)
VRServiceImpl::VRServiceImpl(base::PassKey<XRRuntimeManagerTest>)
: render_frame_host_(nullptr) {
DVLOG(2) << __func__;
runtime_manager_ = XRRuntimeManagerImpl::GetOrCreateInstance();

@ -11,7 +11,7 @@
#include <vector>
#include "base/macros.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "build/build_config.h"
#include "content/browser/xr/metrics/session_metrics_helper.h"
#include "content/common/content_export.h"
@ -44,7 +44,7 @@ class CONTENT_EXPORT VRServiceImpl : public device::mojom::VRService,
explicit VRServiceImpl(content::RenderFrameHost* render_frame_host);
// Constructor for tests.
explicit VRServiceImpl(util::PassKey<XRRuntimeManagerTest>);
explicit VRServiceImpl(base::PassKey<XRRuntimeManagerTest>);
~VRServiceImpl() override;

@ -49,7 +49,7 @@ class XRRuntimeManagerTest : public testing::Test {
mojo::PendingRemote<device::mojom::VRServiceClient> proxy;
device::FakeVRServiceClient client(proxy.InitWithNewPipeAndPassReceiver());
auto service =
std::make_unique<VRServiceImpl>(util::PassKey<XRRuntimeManagerTest>());
std::make_unique<VRServiceImpl>(base::PassKey<XRRuntimeManagerTest>());
service->SetClient(std::move(proxy));
base::RunLoop run_loop;
run_loop.RunUntilIdle();

@ -22,7 +22,7 @@
#include "base/optional.h"
#include "base/strings/string_piece.h"
#include "base/time/time.h"
#include "base/util/type_safety/strong_alias.h"
#include "base/types/strong_alias.h"
#include "build/build_config.h"
#include "components/download/public/common/quarantine_connection.h"
#include "content/common/content_export.h"
@ -250,7 +250,7 @@ class CONTENT_EXPORT ContentBrowserClient {
public:
// Callback used with IsClipboardPasteAllowed() method.
using ClipboardPasteAllowed =
util::StrongAlias<class ClipboardPasteAllowedTag, bool>;
base::StrongAlias<class ClipboardPasteAllowedTag, bool>;
using IsClipboardPasteAllowedCallback =
base::OnceCallback<void(ClipboardPasteAllowed)>;

@ -5,7 +5,7 @@
#include "content/renderer/agent_scheduling_group.h"
#include "base/feature_list.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "content/common/agent_scheduling_group.mojom.h"
#include "content/public/common/content_features.h"
#include "content/renderer/compositor/compositor_dependencies.h"
@ -31,7 +31,7 @@ using ::mojo::PendingRemote;
using ::mojo::Receiver;
using ::mojo::Remote;
using PassKey = ::util::PassKey<AgentSchedulingGroup>;
using PassKey = ::base::PassKey<AgentSchedulingGroup>;
namespace {
RenderThreadImpl& ToImpl(RenderThread& render_thread) {

@ -182,6 +182,7 @@ namespace content {
namespace {
using ::base::PassKey;
using ::base::ThreadRestrictions;
using ::blink::WebDocument;
using ::blink::WebFrame;
@ -191,7 +192,6 @@ using ::blink::WebScriptController;
using ::blink::WebSecurityPolicy;
using ::blink::WebString;
using ::blink::WebView;
using ::util::PassKey;
// An implementation of mojom::RenderMessageFilter which can be mocked out
// for tests which may indirectly send messages over this interface.
@ -1349,7 +1349,7 @@ bool RenderThreadImpl::IsScrollAnimatorEnabled() {
void RenderThreadImpl::SetScrollAnimatorEnabled(
bool enable_scroll_animator,
util::PassKey<AgentSchedulingGroup>) {
base::PassKey<AgentSchedulingGroup>) {
is_scroll_animator_enabled_ = enable_scroll_animator;
}

@ -27,7 +27,7 @@
#include "base/optional.h"
#include "base/strings/string16.h"
#include "base/time/time.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "build/build_config.h"
#include "cc/mojom/render_frame_metadata.mojom.h"
#include "content/child/child_thread_impl.h"
@ -208,7 +208,7 @@ class CONTENT_EXPORT RenderThreadImpl
// global setting. It should probably be moved to some `mojom::Renderer` API
// and this method should be removed.
void SetScrollAnimatorEnabled(bool enable_scroll_animator,
util::PassKey<AgentSchedulingGroup>);
base::PassKey<AgentSchedulingGroup>);
bool IsThreadedAnimationEnabled();
scoped_refptr<base::SingleThreadTaskRunner>

@ -8,7 +8,7 @@
namespace device {
ArCoreAnchorManager::ArCoreAnchorManager(util::PassKey<ArCoreImpl> pass_key,
ArCoreAnchorManager::ArCoreAnchorManager(base::PassKey<ArCoreImpl> pass_key,
ArSession* arcore_session)
: arcore_session_(arcore_session) {
DCHECK(arcore_session_);
@ -216,7 +216,7 @@ base::Optional<AnchorId> ArCoreAnchorManager::CreateAnchor(
DVLOG(2) << __func__ << ": plane_id=" << plane_id;
auto ar_anchor = plane_manager->CreateAnchor(
util::PassKey<ArCoreAnchorManager>(), plane_id, pose);
base::PassKey<ArCoreAnchorManager>(), plane_id, pose);
if (!ar_anchor.is_valid()) {
return base::nullopt;
}

@ -7,8 +7,8 @@
#include <map>
#include "base/types/pass_key.h"
#include "base/util/type_safety/id_type.h"
#include "base/util/type_safety/pass_key.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_sdk.h"
@ -23,7 +23,7 @@ using AnchorId = util::IdTypeU64<class AnchorTag>;
class ArCoreAnchorManager {
public:
ArCoreAnchorManager(util::PassKey<ArCoreImpl> pass_key,
ArCoreAnchorManager(base::PassKey<ArCoreImpl> pass_key,
ArSession* arcore_session);
~ArCoreAnchorManager();

@ -12,7 +12,7 @@
#include "base/optional.h"
#include "base/strings/string_number_conversions.h"
#include "base/trace_event/trace_event.h"
#include "base/util/type_safety/pass_key.h"
#include "base/types/pass_key.h"
#include "device/vr/android/arcore/arcore_math_utils.h"
#include "device/vr/android/arcore/arcore_plane_manager.h"
#include "device/vr/android/arcore/type_converters.h"
@ -418,9 +418,9 @@ base::Optional<ArCore::InitializeResult> ArCoreImpl::Initialize(
arcore_session_ = std::move(session);
arcore_light_estimate_ = std::move(light_estimate);
anchor_manager_ = std::make_unique<ArCoreAnchorManager>(
util::PassKey<ArCoreImpl>(), arcore_session_.get());
base::PassKey<ArCoreImpl>(), arcore_session_.get());
plane_manager_ = std::make_unique<ArCorePlaneManager>(
util::PassKey<ArCoreImpl>(), arcore_session_.get());
base::PassKey<ArCoreImpl>(), arcore_session_.get());
return ArCore::InitializeResult(*maybe_enabled_features);
}

Some files were not shown because too many files have changed in this diff Show More