Commit df40ea01 authored by Charlie Hu's avatar Charlie Hu Committed by Commit Bot

[CodeHealthRotation] Migrate |PerfMember::Init| calls from base::Bind to base::BindRepeating

|PerfMember::Init| accepts an instance of |base::RepeatingClosure| as
its last parameter. Call sites should use |base::BindRepeating|.

Bug: 1007635
Change-Id: I7be18e3614984c74767950b0239457be87499328
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2521777Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Charlie Hu <chenleihu@google.com>
Cr-Commit-Position: refs/heads/master@{#824975}
parent 79f876ff
......@@ -48,9 +48,8 @@ NotifierStateTracker::NotifierStateTracker(Profile* profile)
prefs::kMessageCenterDisabledExtensionIds, &disabled_extension_ids_);
disabled_extension_id_pref_.Init(
prefs::kMessageCenterDisabledExtensionIds,
profile_->GetPrefs(),
base::Bind(
prefs::kMessageCenterDisabledExtensionIds, profile_->GetPrefs(),
base::BindRepeating(
&NotifierStateTracker::OnStringListPrefChanged,
base::Unretained(this),
base::Unretained(prefs::kMessageCenterDisabledExtensionIds),
......
......@@ -178,8 +178,8 @@ BrowserCommandController::BrowserCommandController(Browser* browser)
#endif
pref_signin_allowed_.Init(
prefs::kSigninAllowed, profile()->GetOriginalProfile()->GetPrefs(),
base::Bind(&BrowserCommandController::OnSigninAllowedPrefChange,
base::Unretained(this)));
base::BindRepeating(&BrowserCommandController::OnSigninAllowedPrefChange,
base::Unretained(this)));
InitCommandState();
......
......@@ -21,8 +21,9 @@ DesktopBrowserFrameAuraLinux::DesktopBrowserFrameAuraLinux(
use_custom_frame_pref_.Init(
prefs::kUseCustomChromeFrame,
browser_view->browser()->profile()->GetPrefs(),
base::Bind(&DesktopBrowserFrameAuraLinux::OnUseCustomChromeFrameChanged,
base::Unretained(this)));
base::BindRepeating(
&DesktopBrowserFrameAuraLinux::OnUseCustomChromeFrameChanged,
base::Unretained(this)));
}
DesktopBrowserFrameAuraLinux::~DesktopBrowserFrameAuraLinux() {}
......
......@@ -355,9 +355,9 @@ ExtensionsUI::ExtensionsUI(content::WebUI* web_ui)
Profile* profile = Profile::FromWebUI(web_ui);
content::WebUIDataSource* source = nullptr;
in_dev_mode_.Init(
prefs::kExtensionsUIDeveloperMode, profile->GetPrefs(),
base::Bind(&ExtensionsUI::OnDevModeChanged, base::Unretained(this)));
in_dev_mode_.Init(prefs::kExtensionsUIDeveloperMode, profile->GetPrefs(),
base::BindRepeating(&ExtensionsUI::OnDevModeChanged,
base::Unretained(this)));
source = CreateMdExtensionsSource(profile, *in_dev_mode_);
ManagedUIHandler::Initialize(web_ui, source);
......
......@@ -549,9 +549,9 @@ bool LocalDiscoveryUIHandler::IsUserProfileRestricted() {
void LocalDiscoveryUIHandler::StartCloudPrintConnector() {
Profile* profile = Profile::FromWebUI(web_ui());
base::Closure cloud_print_callback = base::Bind(
&LocalDiscoveryUIHandler::OnCloudPrintPrefsChanged,
base::Unretained(this));
base::Closure cloud_print_callback =
base::BindRepeating(&LocalDiscoveryUIHandler::OnCloudPrintPrefsChanged,
base::Unretained(this));
if (cloud_print_connector_email_.GetPrefName().empty()) {
cloud_print_connector_email_.Init(
......
......@@ -26,8 +26,10 @@ ProfileInfoWatcher::ProfileInfoWatcher(
if (profile_manager)
profile_manager->GetProfileAttributesStorage().AddObserver(this);
signin_allowed_pref_.Init(prefs::kSigninAllowed, profile_->GetPrefs(),
base::Bind(&ProfileInfoWatcher::RunCallback, base::Unretained(this)));
signin_allowed_pref_.Init(
prefs::kSigninAllowed, profile_->GetPrefs(),
base::BindRepeating(&ProfileInfoWatcher::RunCallback,
base::Unretained(this)));
}
ProfileInfoWatcher::~ProfileInfoWatcher() {
......
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