brave-intl / bat-native-ads Goto Github PK
View Code? Open in Web Editor NEWLicense: Mozilla Public License 2.0
License: Mozilla Public License 2.0
Any random number generation in Brave should use crypto::RandBytes unless there's a strong reason not to.
bat-native-ads/src/math_helper.cc
Lines 11 to 16 in 7c11b1b
(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.)
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.