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

Migrate brave-core changes from Android Ads #2947

Merged
merged 28 commits into from
Jul 18, 2019
Merged

Migrate brave-core changes from Android Ads #2947

merged 28 commits into from
Jul 18, 2019

Conversation

tmancey
Copy link
Collaborator

@tmancey tmancey commented Jul 17, 2019

Fixes brave/brave-browser#5160

Submitter Checklist:

Test Plan:

  • Confirm ad notifications are shown
  • Switch ads off and then back on and confirm ad notifications are still shown (when turning off ads, state is removed so you will need to visit a website for page classification)
  • Confirm ads are cashed-in
  • Confirm clicking an ad opens in a new tab (or same tab for duplicate ad)
  • Confirm default/ads_service state is removed when ads are switched off
  • Confirm default/ads_service state is created when ads are switched on

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 0.69.x - Nightly milestone Jul 17, 2019
@tmancey tmancey requested review from bridiver and NejcZdovc July 17, 2019 23:58
@tmancey tmancey self-assigned this Jul 17, 2019
@tmancey tmancey changed the title Issues/5160 Migrate brave-core changes from Android Ads Jul 17, 2019
~NotificationInfo();

const std::string ToJson() const;
Result FromJson(
const std::string& json,
std::string* error_description = nullptr);

std::string id;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should add this property to BATAdsNotification

// Should be called when Ads are enabled or disabled on the Client
virtual void Initialize() = 0;
// Should be called when Ads is enabled on the Client
virtual void Initialize(InitializeCallback callback) = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

You changed the Initialize signature but I don't see a change to how its called in BATBraveAds.mm as seen here:

https://github.com/brave/brave-core/blob/40e6df39e1903e1240f54d97fe2d9a3168420c70/vendor/brave-ios/Ads/BATBraveAds.mm#L70

// Should be called when the browser enters the foreground
virtual void OnForeground() = 0;
// Should be called when Ads is disabled on the Client
virtual void Shutdown(ShutdownCallback callback) = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

@tmancey tmancey requested a review from kylehickinson July 18, 2019 17:17
@tmancey
Copy link
Collaborator Author

tmancey commented Jul 18, 2019

Closing and reopening #5160 as not picking up branch changes

@tmancey tmancey closed this Jul 18, 2019
@tmancey tmancey reopened this Jul 18, 2019
@tmancey tmancey force-pushed the issues/5160 branch 8 times, most recently from 92b9390 to 83a9deb Compare July 18, 2019 22:12
@tmancey tmancey requested a review from kylehickinson July 18, 2019 22:21
kylehickinson
kylehickinson previously approved these changes Jul 18, 2019
bsclifton
bsclifton previously approved these changes Jul 18, 2019
@tmancey tmancey dismissed stale reviews from bsclifton and kylehickinson via 18ec991 July 18, 2019 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate brave-core changes from Android Ads
3 participants