Skip to content

Commit

Permalink
Adapt to removal of base::DictionaryValue::SetDictionary() method II
Browse files Browse the repository at this point in the history
Use base::Value::SetPath() instead.

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/61bc6c4bf56e93687fed13327c02e0addc97a0c4

commit 61bc6c4bf56e93687fed13327c02e0addc97a0c4
Author: Alex Cooper <alcooper@chromium.org>
Date:   Tue Jan 4 22:53:42 2022 +0000

    [CodeHealth] Remove deprecated SetDictionary method

    The SetDictionary method is deprecated. Now that all callers of it have
    been removed, it can be removed as well.

    Bug: 1187029
  • Loading branch information
samartnik authored and mariospr committed Jan 18, 2022
1 parent 7cc6170 commit 7e28f09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions browser/brave_rewards/android/brave_rewards_native_worker.cc
Expand Up @@ -261,9 +261,9 @@ BraveRewardsNativeWorker::GetWalletBalance(JNIEnv* env) {
base::DictionaryValue json_root;
json_root.SetDoubleKey("total", balance_.total);

auto json_wallets = std::make_unique<base::DictionaryValue>();
base::Value json_wallets = base::Value(base::Value::Type::DICTIONARY);
for (const auto & item : balance_.wallets) {
json_wallets->SetDoubleKey(item.first, item.second);
json_wallets.SetDoubleKey(item.first, item.second);
}
json_root.SetPath("wallets", std::move(json_wallets));
base::JSONWriter::Write(json_root, &json_balance);
Expand Down

0 comments on commit 7e28f09

Please sign in to comment.