Skip to content

Commit

Permalink
[ads] Add SmartNTT locale condition matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
tmancey committed Oct 29, 2024
1 parent 6f44f2d commit c059f94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions browser/brave_ads/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ source_set("impl") {
"//brave/browser/ui/brave_ads",
"//brave/components/brave_adaptive_captcha",
"//brave/components/brave_ads/browser/application_state",
"//brave/components/l10n/common",
"//brave/components/p3a_utils",
"//chrome/browser:browser_process",
"//chrome/browser:browser_public_dependencies",
Expand Down
4 changes: 4 additions & 0 deletions browser/brave_ads/ads_service_delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "brave/browser/brave_ads/application_state/notification_helper/notification_helper.h"
#include "brave/browser/ui/brave_ads/notification_ad.h"
#include "brave/components/brave_adaptive_captcha/brave_adaptive_captcha_service.h"
#include "brave/components/l10n/common/locale_util.h"
#include "build/build_config.h"
#include "chrome/browser/notifications/notification_display_service.h"
#include "chrome/browser/profiles/profile.h"
Expand Down Expand Up @@ -158,6 +159,9 @@ bool AdsServiceDelegate::IsFullScreenMode() {
base::Value::Dict AdsServiceDelegate::GetVirtualPrefs() {
return base::Value::Dict()
.Set("[virtual]:operating_system.name", version_info::GetOSType())
.Set("[virtual]:operating_system.locale",
brave_l10n::GetDefaultLocaleString())
.Set("[virtual]:application_locale", application_locale_)
.Set("[virtual]:build_channel.name",
version_info::GetChannelString(chrome::GetChannel()))
.Set("[virtual]:browser_version", version_info::GetVersionNumber())
Expand Down

0 comments on commit c059f94

Please sign in to comment.