GithubHelp home page GithubHelp logo

bat-native-ads's People

Contributors

bridiver avatar mrose17 avatar tmancey avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

bat-native-ads's Issues

Use crypto::RandBytes for random number generation

Any random number generation in Brave should use crypto::RandBytes unless there's a strong reason not to.

size_t Math::Random(size_t maximum_value) {
std::random_device device;
std::mt19937_64 generator(device());
std::uniform_int_distribution<size_t> distribution(0, maximum_value);
return distribution(generator);
}

(Not a blocking security issue because this is only for randomized delays, not for, say, key generation, and it's not clear that the threat model is articulated well enough to identify this as a flaw, but we should avoid things like the Mersenne twister in general.)

Implement DemoAPI logs

The following logs have been implemented which are output as plaintext to the console but unlike Muon these logs are not in JSON format. If these logs are required in JSON then we need to convert them from plaintext:

  • 'Idle state changed', { idleState: action.get('idleState') }
  • 'Site visited', { url, immediateWinner, winnerOverTime }
  • 'Notification not made', { reason: 'no categories' }
  • 'Notification not made', { reason: 'no ads for category', category }
  • 'Notification not made', { reason: 'not in foreground' }
  • 'Notification not made', { reason: 'media playing in browser' }
  • 'Notification not made', { reason: 'not allowed based on history' }
  • 'Notification not made', { reason: 'no ad catalog' }
  • 'Notification not made', { reason: 'no classified pages for winnerOverTime', category, winnerOverTime, arbitraryKey }
  • 'Notification not made', { reason: 'no ads for category', category }
  • 'Notification not made', { reason: 'no ad (or permitted ad) for winnerOverTime', category, winnerOverTime, arbitraryKey }
  • 'Notification not made', { reason: 'incomplete ad information', category, winnerOverTime, arbitraryKey, notificationUrl, notificationText, advertiser
  • 'Notification shown', {category, winnerOverTime, arbitraryKey, notificationUrl, notificationText, advertiser, uuid, hierarchy}
  • appConstants.APP_ON_NATIVE_NOTIFICATION_AVAILABLE_CHECK, {err, result}
  • 'Ad not served', { reason: 'notifications not presently allowed' }
  • 'Ad not served', { reason: 'network connection not available' }
  • 'Ad not served', { reason: 'catalog older than one day' }
  • 'Catalog downloaded', [ 'version', 'catalog', 'status' ]
  • 'Catalog current', { method, server, path }
  • 'Catalog download failed', { error, method, server, path }
  • 'Catalog parsed', underscore.extend(underscore.clone(header), { status: 'processed', campaigns: underscore.keys(campaigns).length, creativeSets: underscore.keys(creativeSets).length }
  • 'Generated bundle'
  • 'patch invalid', { reason: 'unsupported version', version: version }

The following logs have been implemented which are output as plaintext to the console but unlike Muon these logs are not in JSON format. If these logs are required in JSON then we need to convert them from plaintext:

The following logs have already been implemented which are output as JSON to the console under AdsService Event Log and are already exposed to the Brave Core Ads Service implementation layer via EventLog:

  • GenerateAdReportingNotificationShownEvent
  • GenerateAdReportingNotificationResultEvent
  • GenerateAdReportingSustainEvent
  • GenerateAdReportingLoadEvent
  • GenerateAdReportingBackgroundEvent
  • GenerateAdReportingForegroundEvent
  • GenerateAdReportingBlurEvent
  • GenerateAdReportingDestroyEvent
  • GenerateAdReportingFocusEvent
  • GenerateAdReportingRestartEvent
  • GenerateAdReportingSettingsEvent

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.