Commit b5c5cc3a authored by Yue Ru Sun's avatar Yue Ru Sun Committed by Commit Bot

Remove coercive comparisons of base::UkmSourceId

Bug: 873866
Change-Id: I36b283ee1f2b7dbe878834c2083a1383fda6ddca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2471799Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
Reviewed-by: default avatarRobert Kaplow <rkaplow@chromium.org>
Commit-Queue: Yue Ru Sun <yrsun@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819146}
parent 5987fd43
...@@ -76,11 +76,6 @@ class BASE_EXPORT UkmSourceId { ...@@ -76,11 +76,6 @@ class BASE_EXPORT UkmSourceId {
return value_ != other.value_; return value_ != other.value_;
} }
// Allow coercive comparisons to simplify test migration.
// TODO(crbug/873866): Remove these once callers are migrated.
constexpr bool operator==(int64_t other) const { return value_ == other; }
constexpr bool operator!=(int64_t other) const { return value_ == other; }
// Extract the Type of the SourceId. // Extract the Type of the SourceId.
Type GetType() const; Type GetType() const;
......
...@@ -319,7 +319,7 @@ class ExtensionProtocolsTestBase : public testing::Test { ...@@ -319,7 +319,7 @@ class ExtensionProtocolsTestBase : public testing::Test {
entries, entries,
ExtensionResourceAccessResult expected) { ExtensionResourceAccessResult expected) {
ASSERT_EQ(1u, entries.size()); ASSERT_EQ(1u, entries.size());
EXPECT_EQ(test_ukm_id_, entries[0].source); EXPECT_EQ(test_ukm_id_.ToInt64(), entries[0].source);
ASSERT_EQ(1u, entries[0].metrics.size()); ASSERT_EQ(1u, entries[0].metrics.size());
EXPECT_EQ(blink::IdentifiableSurface::FromTypeAndToken( EXPECT_EQ(blink::IdentifiableSurface::FromTypeAndToken(
blink::IdentifiableSurface::Type::kExtensionFileAccess, blink::IdentifiableSurface::Type::kExtensionFileAccess,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment