Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes rewards-image handler post C80 bump. #4514

Merged
merged 1 commit into from
Feb 6, 2020
Merged

Conversation

mkarolin
Copy link
Collaborator

@mkarolin mkarolin commented Feb 5, 2020

The handler now gets a full url instead of just the path. In the past the
path was the actual url we wanted retrieved, but now the url includes
the chrome://rewards-image prefix, so we need to extract path from
this url. URLDataSource::URLToRequestPath is used to do that.

Also updated NTP Sponsored Image handler to use
URLDataSource::URLToRequestPath instead of extracting path manually.

Fixes brave/brave-browser#8074

Submitter Checklist:

Test Plan:

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@mkarolin mkarolin added this to the 1.6.x - Nightly milestone Feb 5, 2020
@mkarolin mkarolin self-assigned this Feb 5, 2020
Copy link
Contributor

@emerick emerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

The handler now gets a full url instead of just path. In the past the
path was the actual url we wanted retrieved, but now the url includes
the chrome://rewards-image prefix, so we need to extract path from the
url. URLDataSource::URLToRequestPath is used to do that.

Also updated NTP Sponsored Image handler to use
URLDataSource::URLToRequestPath instead of extracting path manually.

Fixes brave/brave-browser#8074
Copy link
Member

@simonhong simonhong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ntp_sponsored_image_source.cc LGTM.
Thanks for cleanup! 👍

@mkarolin
Copy link
Collaborator Author

mkarolin commented Feb 5, 2020

CI passed (only known audit-network entries).

@petemill petemill merged commit 992247c into master Feb 6, 2020
@petemill petemill deleted the maxk-fix-rewards-image branch February 6, 2020 00:16
Copy link
Member

@petemill petemill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

mkarolin pushed a commit that referenced this pull request Feb 6, 2020
Fixes rewards-image handler post C80 bump.
mkarolin pushed a commit that referenced this pull request Feb 6, 2020
Fixes rewards-image handler post C80 bump.
mkarolin pushed a commit that referenced this pull request Feb 6, 2020
Fixes rewards-image handler post C80 bump.
@bbondy bbondy modified the milestones: 1.6.x - Beta, 1.7.x - Dev Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

C80 - custom tip banners do not display images
5 participants