Commit 4dfeeb2c authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

[jumbo] Give two GetPromoStringSpecifier() functions unique names

In jumbo builds many cc files compile together in the same
translation unit and then they share the same anonymous namespace.
That means that within a (jumbo) build target, also symbols in
anonymous namespaces need (build target) unique names.

In a recent patch, two GetPromoStringSpecifier functions appeared.
They are almost identical but not quite, so this patch just
gives them unique names to make all jumbo build configurations
happy again. Most jumbo build configurations were already happy
because the relevant files did not easily end up in the same
jumbo chunk.

See https://chromium-review.googlesource.com/c/1298394

TBR=collinbaker@chromium.org,bsep@chromium.org,nyquist@chromium.org,robliao@chromium.org

Change-Id: I5f244fc6a4e5b2047f2fdb443d0e40565c8bc103
Reviewed-on: https://chromium-review.googlesource.com/c/1309739Reviewed-by: default avatarDaniel Bratell <bratell@opera.com>
Reviewed-by: default avatarRobert Liao <robliao@chromium.org>
Commit-Queue: Robert Liao <robliao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604284}
parent 4f5d2fcb
......@@ -27,7 +27,7 @@
namespace {
// For bookmark in-product help.
int GetPromoStringSpecifier() {
int GetBookmarkPromoStringSpecifier() {
static constexpr int kTextIds[] = {IDS_BOOKMARK_PROMO_0, IDS_BOOKMARK_PROMO_1,
IDS_BOOKMARK_PROMO_2};
const std::string& str = variations::GetVariationParamValue(
......@@ -62,7 +62,8 @@ void StarView::SetToggled(bool on) {
void StarView::ShowPromo() {
FeaturePromoBubbleView* bookmark_promo_bubble =
FeaturePromoBubbleView::CreateOwned(
this, views::BubbleBorder::TOP_RIGHT, GetPromoStringSpecifier(),
this, views::BubbleBorder::TOP_RIGHT,
GetBookmarkPromoStringSpecifier(),
FeaturePromoBubbleView::ActivationAction::ACTIVATE);
if (!bookmark_promo_observer_.IsObserving(
bookmark_promo_bubble->GetWidget())) {
......
......@@ -41,7 +41,7 @@
namespace {
// For new tab in-product help.
int GetPromoStringSpecifier() {
int GetNewTabPromoStringSpecifier() {
static constexpr int kTextIds[] = {IDS_NEWTAB_PROMO_0, IDS_NEWTAB_PROMO_1,
IDS_NEWTAB_PROMO_2};
const std::string& str = variations::GetVariationParamValue(
......@@ -102,7 +102,7 @@ void NewTabButton::ShowPromo() {
DCHECK(!new_tab_promo_);
// Owned by its native widget. Will be destroyed as its widget is destroyed.
new_tab_promo_ = FeaturePromoBubbleView::CreateOwned(
this, views::BubbleBorder::LEFT_CENTER, GetPromoStringSpecifier(),
this, views::BubbleBorder::LEFT_CENTER, GetNewTabPromoStringSpecifier(),
FeaturePromoBubbleView::ActivationAction::DO_NOT_ACTIVATE);
new_tab_promo_observer_.Add(new_tab_promo_->GetWidget());
SchedulePaint();
......
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