Skip to content

Commit

Permalink
Merge pull request #184 from emerick/publisher-branded-site-banners
Browse files Browse the repository at this point in the history
Support publisher branded site banners
  • Loading branch information
NejcZdovc committed Dec 4, 2018
1 parent 16bfe91 commit 48344ee
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/bat_publishers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -864,10 +864,16 @@ void BatPublishers::getPublisherBanner(const std::string& publisher_id,

banner.title = values.banner.title_;
banner.description = values.banner.description_;
banner.background = values.banner.background_;
banner.logo = values.banner.logo_;
banner.amounts = values.banner.amounts_;
banner.social = values.banner.social_;

// WebUI must not make external network requests, so map
// external resopurces to chrome://rewards-image and handle them
// via our custom data source
if (!values.banner.background_.empty())
banner.background = "chrome://rewards-image/" + values.banner.background_;
if (!values.banner.logo_.empty())
banner.logo = "chrome://rewards-image/" + values.banner.logo_;
}
}

Expand All @@ -888,7 +894,6 @@ void BatPublishers::getPublisherBanner(const std::string& publisher_id,
_2);

ledger_->GetPublisherInfo(filter, callbackGetPublisher);

}

void BatPublishers::onPublisherBanner(ledger::PublisherBannerCallback callback,
Expand Down

0 comments on commit 48344ee

Please sign in to comment.