From 8058ab6ca44d5eaa0b8325a197e9e8e8936a8047 Mon Sep 17 00:00:00 2001 From: bridiver Date: Tue, 4 Sep 2018 10:26:12 -0700 Subject: [PATCH] enable/disable production/verbose based on official build status --- DEPS | 2 +- .../brave_rewards/browser/rewards_service_impl.cc | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 640f3bde25e1..6c8126a178ce 100644 --- a/DEPS +++ b/DEPS @@ -10,7 +10,7 @@ deps = { "vendor/boto": "https://github.com/boto/boto@f7574aa6cc2c819430c1f05e9a1a1a666ef8169b", "vendor/python-patch": "https://github.com/svn2github/python-patch@a336a458016ced89aba90dfc3f4c8222ae3b1403", "vendor/sparkle": "https://github.com/brave/Sparkle.git@c0759cce415d7c0feae45005c8a013b1898711f0", - "vendor/bat-native-ledger": "https://github.com/brave-intl/bat-native-ledger@65b9ec93925f3b99c4bd12282053bdbe011168c9", + "vendor/bat-native-ledger": "https://github.com/brave-intl/bat-native-ledger@81f53c47bc5e83cc453a1e4e6556b12143a6693a", "vendor/bat-native-rapidjson": "https://github.com/brave-intl/bat-native-rapidjson.git@86aafe2ef89835ae71c9ed7c2527e3bb3000930e", "vendor/bip39wally-core-native": "https://github.com/brave-intl/bip39wally-core-native.git@9b119931c702d55be994117eb505d56310720b1d", "vendor/bat-native-anonize": "https://github.com/brave-intl/bat-native-anonize.git@6f5817c5a4dcabb49e22b578ecae4993159e6481", diff --git a/components/brave_rewards/browser/rewards_service_impl.cc b/components/brave_rewards/browser/rewards_service_impl.cc index 991325052f30..65d8ab5bf6b5 100644 --- a/components/brave_rewards/browser/rewards_service_impl.cc +++ b/components/brave_rewards/browser/rewards_service_impl.cc @@ -206,6 +206,19 @@ RewardsServiceImpl::RewardsServiceImpl(Profile* profile) : publisher_list_path_(profile->GetPath().Append("publishers_list")), publisher_info_backend_(new PublisherInfoDatabase(publisher_info_db_path_)), next_timer_id_(0) { +// TODO(bridiver) - production/verbose should +// also be controllable by command line flags +#if defined(IS_OFFICIAL_BUILD) +ledger::is_production = true; +#else +ledger::is_production = false; +#endif + +#if defined(NDEBUG) +ledger::is_verbose = false; +#else +ledger::is_verbose = true; +#endif } RewardsServiceImpl::~RewardsServiceImpl() {