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 Already sustaining ad notification interaction is shown for conversion of the second ad within the same creative set #4906

Merged
merged 1 commit into from
Mar 14, 2020

Conversation

tmancey
Copy link
Collaborator

@tmancey tmancey commented Mar 11, 2020

Resolves brave/brave-browser#8634

Submitter Checklist:

Test Plan:

See brave/brave-browser#8634 however if the same ad already exists landed confirmations will not occur and is covered by brave/brave-browser#5949

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.

@tmancey tmancey added this to the 1.8.x - Nightly milestone Mar 11, 2020
@tmancey tmancey self-assigned this Mar 11, 2020
@tmancey tmancey requested a review from gdregalo March 11, 2020 16:05
@tmancey tmancey force-pushed the issues/8634 branch 2 times, most recently from e14748b to 7b49f89 Compare March 11, 2020 16:49
@tmancey tmancey added CI/skip-android Do not run CI builds for Android CI/skip-ios Do not run CI builds for iOS CI/skip-macos-x64 Do not run CI builds for macOS x64 CI/skip-windows labels Mar 11, 2020
@tmancey
Copy link
Collaborator Author

tmancey commented Mar 11, 2020

Passed on macOS, Windows, Android, iOS. Failed on Linux, restarting Linux

Copy link
Contributor

@moritzhaller moritzhaller left a comment

Choose a reason for hiding this comment

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

lgtm

@@ -1784,12 +1784,17 @@ void AdsImpl::SustainAdNotificationInteractionIfNeeded() {
BLOG(INFO) << "Failed to sustain ad notification interaction, domain for "
"the focused tab does not match the last shown ad notification for "
<< last_shown_ad_notification_.target_url;

last_sustained_ad_notification_url_ = "";
Copy link
Contributor

@NejcZdovc NejcZdovc Mar 13, 2020

Choose a reason for hiding this comment

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

could this be moved at the top of SustainAdNotificationInteractionIfNeeded, so that we don't need to do it twice? As far as I can see all paths set this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah yes, was put here originally as I was resetting last_shown_ad_notification_ which was needed here. Changing now

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

…onversion of the second ad within the same creative set
if (!IsStillViewingAdNotification()) {
BLOG(INFO) << "Failed to sustain ad notification interaction, domain for "
"the focused tab does not match the last shown ad notification for "
<< last_shown_ad_notification_.target_url;

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: extra line

@tmancey
Copy link
Collaborator Author

tmancey commented Mar 14, 2020

Unrelated CI lint error

@tmancey tmancey merged commit afa9f29 into master Mar 14, 2020
@tmancey tmancey deleted the issues/8634 branch March 14, 2020 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug CI/skip-android Do not run CI builds for Android CI/skip-ios Do not run CI builds for iOS CI/skip-macos-x64 Do not run CI builds for macOS x64 feature/ads
Projects
None yet
3 participants