Skip to content

Commit

Permalink
Remove base::Value::SetIntegerWithoutPathExpansion
Browse files Browse the repository at this point in the history
This change removes the deprecated SetIntegerWithoutPathExpansion from
base::Value. Existing usages are replaced by SetKey(key, Value(int)).

Bug: 646113
Change-Id: I546e9bd09fb572dcb62d5856f4f8f5dbc11d079c
Reviewed-on: https://chromium-review.googlesource.com/591655
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Brett Wilson <brettw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492216}
  • Loading branch information
jdoerrie authored and Commit Bot committed Aug 5, 2017
1 parent 2440912 commit 19cdc03
Show file tree
Hide file tree
Showing 50 changed files with 110 additions and 134 deletions.
8 changes: 4 additions & 4 deletions base/json/json_writer_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,17 @@ TEST(JSONWriterTest, KeysWithPeriods) {
std::string output_js;

DictionaryValue period_dict;
period_dict.SetIntegerWithoutPathExpansion("a.b", 3);
period_dict.SetIntegerWithoutPathExpansion("c", 2);
period_dict.SetKey("a.b", base::Value(3));
period_dict.SetKey("c", base::Value(2));
std::unique_ptr<DictionaryValue> period_dict2(new DictionaryValue());
period_dict2->SetIntegerWithoutPathExpansion("g.h.i.j", 1);
period_dict2->SetKey("g.h.i.j", base::Value(1));
period_dict.SetWithoutPathExpansion("d.e.f", std::move(period_dict2));
EXPECT_TRUE(JSONWriter::Write(period_dict, &output_js));
EXPECT_EQ("{\"a.b\":3,\"c\":2,\"d.e.f\":{\"g.h.i.j\":1}}", output_js);

DictionaryValue period_dict3;
period_dict3.SetInteger("a.b", 2);
period_dict3.SetIntegerWithoutPathExpansion("a.b", 1);
period_dict3.SetKey("a.b", base::Value(1));
EXPECT_TRUE(JSONWriter::Write(period_dict3, &output_js));
EXPECT_EQ("{\"a\":{\"b\":2},\"a.b\":1}", output_js);
}
Expand Down
2 changes: 1 addition & 1 deletion base/trace_event/trace_event_argument.cc
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ std::unique_ptr<base::Value> TracedValue::ToBaseValue() const {
int value;
CHECK(it.ReadInt(&value));
if (cur_dict) {
cur_dict->SetIntegerWithoutPathExpansion(ReadKeyName(it), value);
cur_dict->SetKey(ReadKeyName(it), Value(value));
} else {
cur_list->AppendInteger(value);
}
Expand Down
5 changes: 0 additions & 5 deletions base/values.cc
Original file line number Diff line number Diff line change
Expand Up @@ -803,11 +803,6 @@ Value* DictionaryValue::SetWithoutPathExpansion(
return ((*dict_)[key.as_string()] = std::move(in_value)).get();
}

Value* DictionaryValue::SetIntegerWithoutPathExpansion(StringPiece path,
int in_value) {
return SetWithoutPathExpansion(path, MakeUnique<Value>(in_value));
}

Value* DictionaryValue::SetDoubleWithoutPathExpansion(StringPiece path,
double in_value) {
return SetWithoutPathExpansion(path, MakeUnique<Value>(in_value));
Expand Down
2 changes: 0 additions & 2 deletions base/values.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,6 @@ class BASE_EXPORT DictionaryValue : public Value {
std::unique_ptr<Value> in_value);

// Convenience forms of SetWithoutPathExpansion().
// DEPRECATED, use Value::SetKey(path, Value(int)) instead.
Value* SetIntegerWithoutPathExpansion(StringPiece path, int in_value);
// DEPRECATED, use Value::SetKey(path, Value(double)) instead.
Value* SetDoubleWithoutPathExpansion(StringPiece path, double in_value);
// DEPRECATED, use Value::SetKey(path, Value(string)) instead.
Expand Down
7 changes: 0 additions & 7 deletions base/values_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -889,13 +889,6 @@ TEST(ValuesTest, DictionarySetReturnsPointer) {
EXPECT_EQ(42, int_ptr->GetInt());
}

{
DictionaryValue dict;
Value* int_ptr = dict.SetIntegerWithoutPathExpansion("foo.bar", 123);
EXPECT_EQ(Value::Type::INTEGER, int_ptr->type());
EXPECT_EQ(123, int_ptr->GetInt());
}

{
DictionaryValue dict;
Value* double_ptr = dict.SetDouble("foo.bar", 3.142);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2397,7 +2397,7 @@ TEST_F(ChromeBrowsingDataRemoverDelegateTest, AllTypesAreGettingDeleted) {
} else {
// Other website settings only allow dictionaries.
base::DictionaryValue dict;
dict.SetIntegerWithoutPathExpansion("foo", 42);
dict.SetKey("foo", base::Value(42));
some_value = std::move(dict);
}
// Create an exception.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ class ArcKioskAppManagerTest : public InProcessBrowserTest {
entry->SetStringWithoutPathExpansion(
kAccountsPrefDeviceLocalAccountsKeyId,
GenerateAccountId(app.package_name()));
entry->SetIntegerWithoutPathExpansion(
entry->SetKey(
kAccountsPrefDeviceLocalAccountsKeyType,
policy::DeviceLocalAccount::TYPE_ARC_KIOSK_APP);
base::Value(policy::DeviceLocalAccount::TYPE_ARC_KIOSK_APP));
entry->SetStringWithoutPathExpansion(
kAccountsPrefDeviceLocalAccountsKeyArcKioskPackage,
app.package_name());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,8 @@ class KioskAppManagerTest : public InProcessBrowserTest {
// existing app entry created here.
entry->SetStringWithoutPathExpansion(kAccountsPrefDeviceLocalAccountsKeyId,
app_id + "@kiosk-apps");
entry->SetIntegerWithoutPathExpansion(
kAccountsPrefDeviceLocalAccountsKeyType,
policy::DeviceLocalAccount::TYPE_KIOSK_APP);
entry->SetKey(kAccountsPrefDeviceLocalAccountsKeyType,
base::Value(policy::DeviceLocalAccount::TYPE_KIOSK_APP));
entry->SetStringWithoutPathExpansion(
kAccountsPrefDeviceLocalAccountsKeyKioskAppId,
app_id);
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/chromeos/file_system_provider/registry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ void Registry::RememberFileSystem(
base::Value(file_system_info.writable()));
file_system->SetKey(kPrefKeySupportsNotifyTag,
base::Value(file_system_info.supports_notify_tag()));
file_system->SetIntegerWithoutPathExpansion(
kPrefKeyOpenedFilesLimit, file_system_info.opened_files_limit());
file_system->SetKey(kPrefKeyOpenedFilesLimit,
base::Value(file_system_info.opened_files_limit()));

auto watchers_value = base::MakeUnique<base::DictionaryValue>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ void RememberFakeFileSystem(TestingProfile* profile,
file_system->SetKey(kPrefKeyWritable, base::Value(writable));
file_system->SetKey(kPrefKeySupportsNotifyTag,
base::Value(supports_notify_tag));
file_system->SetIntegerWithoutPathExpansion(kPrefKeyOpenedFilesLimit,
opened_files_limit);
file_system->SetKey(kPrefKeyOpenedFilesLimit,
base::Value(opened_files_limit));

// Remember watchers.
auto watcher_value = base::MakeUnique<base::DictionaryValue>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ class ExistingUserControllerAutoLoginTest : public ::testing::Test {
std::unique_ptr<base::DictionaryValue> account(new base::DictionaryValue);
account->SetStringWithoutPathExpansion(
kAccountsPrefDeviceLocalAccountsKeyId, auto_login_user_id_);
account->SetIntegerWithoutPathExpansion(
account->SetKey(
kAccountsPrefDeviceLocalAccountsKeyType,
policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION);
base::Value(policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION));
base::ListValue accounts;
accounts.Append(std::move(account));
CrosSettings::Get()->Set(kAccountsPrefDeviceLocalAccounts, accounts);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@ bool SupervisedUserAuthentication::FillDataForNewUser(
return false;

if (schema == SCHEMA_SALT_HASHED) {
password_data->SetIntegerWithoutPathExpansion(kSchemaVersion, schema);
password_data->SetKey(kSchemaVersion, base::Value(schema));
std::string salt = CreateSalt();
password_data->SetStringWithoutPathExpansion(kSalt, salt);
int revision = kMinPasswordRevision;
password_data->SetIntegerWithoutPathExpansion(kPasswordRevision, revision);
password_data->SetKey(kPasswordRevision, base::Value(revision));
Key key(password);
key.Transform(Key::KEY_TYPE_SALTED_PBKDF2_AES256_1234, salt);
const std::string salted_password = key.GetSecret();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ IN_PROC_BROWSER_TEST_F(SupervisedUserPasswordTest,
ChromeUserManager::Get()->GetSupervisedUserManager()->GetUserSyncId(
user->GetAccountId().GetUserEmail());
base::DictionaryValue password;
password.SetIntegerWithoutPathExpansion(
kSchemaVersion, SupervisedUserAuthentication::SCHEMA_SALT_HASHED);
password.SetIntegerWithoutPathExpansion(kPasswordRevision, 2);
password.SetKey(
kSchemaVersion,
base::Value(SupervisedUserAuthentication::SCHEMA_SALT_HASHED));
password.SetKey(kPasswordRevision, base::Value(2));

password.SetStringWithoutPathExpansion(kPasswordSignature, "signature");
password.SetStringWithoutPathExpansion(kEncryptedPassword,
Expand Down Expand Up @@ -154,9 +155,10 @@ IN_PROC_BROWSER_TEST_F(SupervisedUserPasswordTest,
content::RunAllPendingInMessageLoop();

base::DictionaryValue password;
password.SetIntegerWithoutPathExpansion(
kSchemaVersion, SupervisedUserAuthentication::SCHEMA_SALT_HASHED);
password.SetIntegerWithoutPathExpansion(kPasswordRevision, 2);
password.SetKey(
kSchemaVersion,
base::Value(SupervisedUserAuthentication::SCHEMA_SALT_HASHED));
password.SetKey(kPasswordRevision, base::Value(2));

password.SetStringWithoutPathExpansion(kPasswordSignature, "signature");
password.SetStringWithoutPathExpansion(kEncryptedPassword,
Expand Down Expand Up @@ -203,9 +205,10 @@ IN_PROC_BROWSER_TEST_F(SupervisedUserPasswordTest,
ChromeUserManager::Get()->GetSupervisedUserManager()->GetUserSyncId(
user->GetAccountId().GetUserEmail());
base::DictionaryValue password;
password.SetIntegerWithoutPathExpansion(
kSchemaVersion, SupervisedUserAuthentication::SCHEMA_SALT_HASHED);
password.SetIntegerWithoutPathExpansion(kPasswordRevision, 2);
password.SetKey(
kSchemaVersion,
base::Value(SupervisedUserAuthentication::SCHEMA_SALT_HASHED));
password.SetKey(kPasswordRevision, base::Value(2));

password.SetStringWithoutPathExpansion(kPasswordSignature, "signature");
password.SetStringWithoutPathExpansion(kEncryptedPassword,
Expand Down Expand Up @@ -244,9 +247,10 @@ IN_PROC_BROWSER_TEST_F(SupervisedUserPasswordTest,
content::RunAllPendingInMessageLoop();

base::DictionaryValue password;
password.SetIntegerWithoutPathExpansion(
kSchemaVersion, SupervisedUserAuthentication::SCHEMA_SALT_HASHED);
password.SetIntegerWithoutPathExpansion(kPasswordRevision, 2);
password.SetKey(
kSchemaVersion,
base::Value(SupervisedUserAuthentication::SCHEMA_SALT_HASHED));
password.SetKey(kPasswordRevision, base::Value(2));

password.SetStringWithoutPathExpansion(kPasswordSignature, "signature");
password.SetStringWithoutPathExpansion(kEncryptedPassword,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,9 @@ void SupervisedUserManagerImpl::GetPasswordInformation(
base::DictionaryValue* result) {
int value;
if (GetUserIntegerValue(user_id, kSupervisedUserPasswordSchema, &value))
result->SetIntegerWithoutPathExpansion(kSchemaVersion, value);
result->SetKey(kSchemaVersion, base::Value(value));
if (GetUserIntegerValue(user_id, kSupervisedUserPasswordRevision, &value))
result->SetIntegerWithoutPathExpansion(kPasswordRevision, value);
result->SetKey(kPasswordRevision, base::Value(value));

bool flag;
if (GetUserBooleanValue(user_id, kSupervisedUserNeedPasswordUpdate, &flag))
Expand Down Expand Up @@ -351,7 +351,7 @@ void SupervisedUserManagerImpl::SetUserIntegerValue(
const int value) {
PrefService* local_state = g_browser_process->local_state();
DictionaryPrefUpdate update(local_state, key);
update->SetIntegerWithoutPathExpansion(user_id, value);
update->SetKey(user_id, base::Value(value));
}

void SupervisedUserManagerImpl::SetUserBooleanValue(const std::string& user_id,
Expand Down
5 changes: 2 additions & 3 deletions chrome/browser/chromeos/policy/device_local_account.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,8 @@ void SetDeviceLocalAccounts(chromeos::OwnerSettingsServiceChromeOS* service,
entry->SetStringWithoutPathExpansion(
chromeos::kAccountsPrefDeviceLocalAccountsKeyId,
it->account_id);
entry->SetIntegerWithoutPathExpansion(
chromeos::kAccountsPrefDeviceLocalAccountsKeyType,
it->type);
entry->SetKey(chromeos::kAccountsPrefDeviceLocalAccountsKeyType,
base::Value(it->type));
if (it->type == DeviceLocalAccount::TYPE_KIOSK_APP) {
entry->SetStringWithoutPathExpansion(
chromeos::kAccountsPrefDeviceLocalAccountsKeyKioskAppId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ void DecodeLoginPolicies(const em::ChromeDeviceSettingsProto& policy,
chromeos::kAccountsPrefDeviceLocalAccountsKeyId,
entry.account_id());
}
entry_dict->SetIntegerWithoutPathExpansion(
chromeos::kAccountsPrefDeviceLocalAccountsKeyType, entry.type());
entry_dict->SetKey(chromeos::kAccountsPrefDeviceLocalAccountsKeyType,
base::Value(entry.type()));
if (entry.kiosk_app().has_app_id()) {
entry_dict->SetStringWithoutPathExpansion(
chromeos::kAccountsPrefDeviceLocalAccountsKeyKioskAppId,
Expand Down Expand Up @@ -228,9 +228,9 @@ void DecodeLoginPolicies(const em::ChromeDeviceSettingsProto& policy,
entry_dict->SetStringWithoutPathExpansion(
chromeos::kAccountsPrefDeviceLocalAccountsKeyId,
entry.deprecated_public_session_id());
entry_dict->SetIntegerWithoutPathExpansion(
entry_dict->SetKey(
chromeos::kAccountsPrefDeviceLocalAccountsKeyType,
DeviceLocalAccount::TYPE_PUBLIC_SESSION);
base::Value(DeviceLocalAccount::TYPE_PUBLIC_SESSION));
}
account_list->Append(std::move(entry_dict));
}
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/chromeos/policy/user_policy_test_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ std::string BuildPolicy(const base::DictionaryValue& mandatory,
root_dict.SetWithoutPathExpansion("managed_users",
std::move(managed_users_list));
root_dict.SetStringWithoutPathExpansion("policy_user", account_id);
root_dict.SetIntegerWithoutPathExpansion("current_key_index", 0);
root_dict.SetKey("current_key_index", base::Value(0));

std::string json_policy;
base::JSONWriter::WriteWithOptions(
Expand Down
8 changes: 4 additions & 4 deletions chrome/browser/chromeos/settings/device_settings_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ void DecodeLoginPolicies(
entry_dict->SetStringWithoutPathExpansion(
kAccountsPrefDeviceLocalAccountsKeyId, entry->account_id());
}
entry_dict->SetIntegerWithoutPathExpansion(
kAccountsPrefDeviceLocalAccountsKeyType, entry->type());
entry_dict->SetKey(kAccountsPrefDeviceLocalAccountsKeyType,
base::Value(entry->type()));
if (entry->kiosk_app().has_app_id()) {
entry_dict->SetStringWithoutPathExpansion(
kAccountsPrefDeviceLocalAccountsKeyKioskAppId,
Expand Down Expand Up @@ -231,9 +231,9 @@ void DecodeLoginPolicies(
entry_dict->SetStringWithoutPathExpansion(
kAccountsPrefDeviceLocalAccountsKeyId,
entry->deprecated_public_session_id());
entry_dict->SetIntegerWithoutPathExpansion(
entry_dict->SetKey(
kAccountsPrefDeviceLocalAccountsKeyType,
policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION);
base::Value(policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION));
}
account_list->Append(std::move(entry_dict));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ void MediaGalleriesAddUserSelectedFolderFunction::ReturnGalleriesAndId(
}
std::unique_ptr<base::DictionaryValue> results(new base::DictionaryValue);
results->SetWithoutPathExpansion("mediaFileSystems", std::move(list));
results->SetIntegerWithoutPathExpansion("selectedFileSystemIndex", index);
results->SetKey("selectedFileSystemIndex", base::Value(index));
SetResult(std::move(results));
SendResponse(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ class NetworkingPrivateChromeOSApiTest : public ExtensionApiTest {
base::DictionaryValue ipconfig;
ipconfig.SetStringWithoutPathExpansion(shill::kAddressProperty, "0.0.0.0");
ipconfig.SetStringWithoutPathExpansion(shill::kGatewayProperty, "0.0.0.1");
ipconfig.SetIntegerWithoutPathExpansion(shill::kPrefixlenProperty, 0);
ipconfig.SetKey(shill::kPrefixlenProperty, base::Value(0));
ipconfig.SetStringWithoutPathExpansion(shill::kMethodProperty,
shill::kTypeIPv4);
ip_config_test->AddIPConfig(kIPConfigPath, ipconfig);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ void BuildWebCryptoRSAAlgorithmDictionary(const PublicKeyInfo& key_info,
base::DictionaryValue* algorithm) {
CHECK_EQ(net::X509Certificate::kPublicKeyTypeRSA, key_info.key_type);
algorithm->SetStringWithoutPathExpansion("name", kWebCryptoRSASSA_PKCS1_v1_5);
algorithm->SetIntegerWithoutPathExpansion("modulusLength",
key_info.key_size_bits);
algorithm->SetKey("modulusLength",
base::Value(static_cast<int>(key_info.key_size_bits)));

// Equals 65537.
const unsigned char defaultPublicExponent[] = {0x01, 0x00, 0x01};
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/signin/easy_unlock_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,8 @@ void EasyUnlockService::SetHardlockStateForUser(
}

DictionaryPrefUpdate update(local_state, prefs::kEasyUnlockHardlockState);
update->SetIntegerWithoutPathExpansion(account_id.GetUserEmail(),
static_cast<int>(state));
update->SetKey(account_id.GetUserEmail(),
base::Value(static_cast<int>(state)));

if (GetAccountId() == account_id)
SetScreenlockHardlockedState(state);
Expand Down
6 changes: 3 additions & 3 deletions chrome/browser/ssl/chrome_ssl_host_state_delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,9 @@ void ChromeSSLHostStateDelegate::AllowCert(const std::string& host,
if (!cert_dict)
return;

dict->SetIntegerWithoutPathExpansion(kSSLCertDecisionVersionKey,
kDefaultSSLCertDecisionVersion);
cert_dict->SetIntegerWithoutPathExpansion(GetKey(cert, error), ALLOWED);
dict->SetKey(kSSLCertDecisionVersionKey,
base::Value(kDefaultSSLCertDecisionVersion));
cert_dict->SetKey(GetKey(cert, error), base::Value(ALLOWED));

// The map takes ownership of the value, so it is released in the call to
// SetWebsiteSettingDefaultScope.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void SupervisedUserBookmarksHandler::AddFoldersToTree() {
folders_failed.clear();
for (const auto& folder : folders) {
std::unique_ptr<base::DictionaryValue> node(new base::DictionaryValue);
node->SetIntegerWithoutPathExpansion(kId, folder.id);
node->SetKey(kId, base::Value(folder.id));
node->SetStringWithoutPathExpansion(kName, folder.name);
node->SetWithoutPathExpansion(kChildren,
base::MakeUnique<base::ListValue>());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ void UserManagerScreenHandler::RemoveUserDialogLoadStatsCallback(
base::DictionaryValue return_value;
for (const auto& item : result) {
auto stat = base::MakeUnique<base::DictionaryValue>();
stat->SetIntegerWithoutPathExpansion("count", item.count);
stat->SetKey("count", base::Value(item.count));
return_value.SetWithoutPathExpansion(item.category, std::move(stat));
}
if (result.size() == profiles::kProfileStatisticsCategories.size()) {
Expand Down
5 changes: 3 additions & 2 deletions chrome/renderer/extensions/platform_keys_natives.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ std::unique_ptr<base::DictionaryValue> WebCryptoAlgorithmToBaseValue(
const blink::WebCryptoRsaHashedKeyGenParams* rsaHashedKeyGen =
algorithm.RsaHashedKeyGenParams();
if (rsaHashedKeyGen) {
dict->SetIntegerWithoutPathExpansion("modulusLength",
rsaHashedKeyGen->ModulusLengthBits());
dict->SetKey(
"modulusLength",
base::Value(static_cast<int>(rsaHashedKeyGen->ModulusLengthBits())));
const blink::WebVector<unsigned char>& public_exponent =
rsaHashedKeyGen->PublicExponent();
dict->SetWithoutPathExpansion(
Expand Down
4 changes: 2 additions & 2 deletions chromeos/dbus/fake_shill_device_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,8 @@ void FakeShillDeviceClient::SetSimLockStatus(const std::string& device_path,
simlock_dict->Clear();
simlock_dict->SetStringWithoutPathExpansion(shill::kSIMLockTypeProperty,
status.type);
simlock_dict->SetIntegerWithoutPathExpansion(
shill::kSIMLockRetriesLeftProperty, status.retries_left);
simlock_dict->SetKey(shill::kSIMLockRetriesLeftProperty,
base::Value(status.retries_left));
simlock_dict->SetKey(shill::kSIMLockEnabledProperty,
base::Value(status.lock_enabled));
NotifyObserversPropertyChanged(dbus::ObjectPath(device_path),
Expand Down
3 changes: 1 addition & 2 deletions chromeos/dbus/fake_shill_manager_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,7 @@ void FakeShillManagerClient::SetupDefaultEnvironment() {
shill::kAddressProperty, "100.0.0.1");
ipconfig_v4_dictionary.SetStringWithoutPathExpansion(
shill::kGatewayProperty, "100.0.0.2");
ipconfig_v4_dictionary.SetIntegerWithoutPathExpansion(
shill::kPrefixlenProperty, 1);
ipconfig_v4_dictionary.SetKey(shill::kPrefixlenProperty, base::Value(1));
ipconfig_v4_dictionary.SetStringWithoutPathExpansion(
shill::kMethodProperty, shill::kTypeIPv4);
ipconfig_v4_dictionary.SetStringWithoutPathExpansion(
Expand Down
Loading

0 comments on commit 19cdc03

Please sign in to comment.