This PR migrates `CookieMonster` from macro replacements to be handled by `plaster`. This is going to be specially useful in `cr149` where a recent landed changed (https://crrev.com/c/7727488) would force the introduction of patch files, and become very disruptive for how these replacement macros work right now in general. This PR attemps a novel approach to replicate the common pattern where in Brave we want to replace a Chromium class with a derived Brave class: the Chromium class is moved into a nested namespace called `chromium_impl`, and the brave implementation is declared in its place in a shadow file. This has required additional plaster for types that absolutely have to refer to the chromium implementation, but the outcome is much simpler than the previous invisible replacements. This change leaves no `#define` uses for replacement in the shadow files. Resolve https://github.com/brave/brave-browser/issues/54496
20 lines
691 B
Diff
20 lines
691 B
Diff
diff --git a/net/cookies/cookie_monster_unittest.cc b/net/cookies/cookie_monster_unittest.cc
|
|
index 3a5696f5f060e5aa98e31fc6be153181719368c7..738f366b4cf584a264723f730d0fb3439c4fb1f9 100644
|
|
--- a/net/cookies/cookie_monster_unittest.cc
|
|
+++ b/net/cookies/cookie_monster_unittest.cc
|
|
@@ -71,7 +71,7 @@
|
|
#include "url/third_party/mozilla/url_parse.h"
|
|
#include "url/url_constants.h"
|
|
|
|
-namespace net {
|
|
+namespace net::chromium_impl {
|
|
|
|
using base::Time;
|
|
using CookieDeletionInfo = net::CookieDeletionInfo;
|
|
@@ -8668,4 +8668,4 @@ TEST_F(CookieMonsterTest, RejectsHiddenHostHttpPrefix) {
|
|
EXCLUDE_AMBIGUOUS_SERIALIZATION}));
|
|
}
|
|
|
|
-} // namespace net
|
|
+} // namespace net::chromium_impl
|