Commit 761e21ca authored by Reilly Grant's avatar Reilly Grant Committed by Chromium LUCI CQ

Convert callbacks in //chrome/browser/chromeos/ownership

This change converts callbacks from base::Bind and base::Callback to
Once/Repeating in //chrome/browser/chromeos/ownership.

Bug: 1148570
Change-Id: Ic4d13d66bed7e6a14b952441de17d39f3dfc5618
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645507
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Mitsuru Oshima <oshima@chromium.org>
Auto-Submit: Reilly Grant <reillyg@chromium.org>
Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#846355}
parent fbdbb16c
...@@ -776,8 +776,8 @@ void OwnerSettingsServiceChromeOS::OnPolicyAssembledAndSigned( ...@@ -776,8 +776,8 @@ void OwnerSettingsServiceChromeOS::OnPolicyAssembledAndSigned(
} }
device_settings_service_->Store( device_settings_service_->Store(
std::move(policy_response), std::move(policy_response),
base::Bind(&OwnerSettingsServiceChromeOS::OnSignedPolicyStored, base::BindOnce(&OwnerSettingsServiceChromeOS::OnSignedPolicyStored,
store_settings_factory_.GetWeakPtr(), true /* success */)); store_settings_factory_.GetWeakPtr(), true /* success */));
} }
void OwnerSettingsServiceChromeOS::OnSignedPolicyStored(bool success) { void OwnerSettingsServiceChromeOS::OnSignedPolicyStored(bool success) {
......
...@@ -52,8 +52,6 @@ class OwnerSettingsServiceChromeOS : public ownership::OwnerSettingsService, ...@@ -52,8 +52,6 @@ class OwnerSettingsServiceChromeOS : public ownership::OwnerSettingsService,
public SessionManagerClient::Observer, public SessionManagerClient::Observer,
public DeviceSettingsService::Observer { public DeviceSettingsService::Observer {
public: public:
typedef base::Callback<void(bool success)> OnManagementSettingsSetCallback;
struct ManagementSettings { struct ManagementSettings {
ManagementSettings(); ManagementSettings();
~ManagementSettings(); ~ManagementSettings();
......
...@@ -102,7 +102,7 @@ class OwnerSettingsServiceChromeOSTest : public DeviceSettingsTestBase { ...@@ -102,7 +102,7 @@ class OwnerSettingsServiceChromeOSTest : public DeviceSettingsTestBase {
void SetUp() override { void SetUp() override {
DeviceSettingsTestBase::SetUp(); DeviceSettingsTestBase::SetUp();
provider_.reset(new DeviceSettingsProvider( provider_.reset(new DeviceSettingsProvider(
base::Bind(&OnPrefChanged), device_settings_service_.get(), base::BindRepeating(&OnPrefChanged), device_settings_service_.get(),
TestingBrowserProcess::GetGlobal()->local_state())); TestingBrowserProcess::GetGlobal()->local_state()));
owner_key_util_->SetPrivateKey(device_policy_->GetSigningKey()); owner_key_util_->SetPrivateKey(device_policy_->GetSigningKey());
InitOwner( InitOwner(
...@@ -383,7 +383,7 @@ class OwnerSettingsServiceChromeOSNoOwnerTest ...@@ -383,7 +383,7 @@ class OwnerSettingsServiceChromeOSNoOwnerTest
void SetUp() override { void SetUp() override {
DeviceSettingsTestBase::SetUp(); DeviceSettingsTestBase::SetUp();
provider_.reset(new DeviceSettingsProvider( provider_.reset(new DeviceSettingsProvider(
base::Bind(&OnPrefChanged), device_settings_service_.get(), base::BindRepeating(&OnPrefChanged), device_settings_service_.get(),
TestingBrowserProcess::GetGlobal()->local_state())); TestingBrowserProcess::GetGlobal()->local_state()));
FlushDeviceSettings(); FlushDeviceSettings();
service_ = OwnerSettingsServiceChromeOSFactory::GetForBrowserContext( service_ = OwnerSettingsServiceChromeOSFactory::GetForBrowserContext(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment