Commit 6869d80c authored by Yi Gu's avatar Yi Gu Committed by Chromium LUCI CQ

[CodeHealth] Convert chrome/browser/ui/views/frame from base::Bind and...

[CodeHealth] Convert chrome/browser/ui/views/frame from base::Bind and base::Callback to Once/Repeating

Bug: 1152282
Change-Id: I77fce1eabfc0652828547d9b59c2517e74fc629f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2585815Reviewed-by: default avatarAllen Bauer <kylixrd@chromium.org>
Commit-Queue: Yi Gu <yigu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836318}
parent 99aa384c
...@@ -36,8 +36,9 @@ BrowserWindowPropertyManager::BrowserWindowPropertyManager( ...@@ -36,8 +36,9 @@ BrowserWindowPropertyManager::BrowserWindowPropertyManager(
// relaunch icon when the version changes (e.g on initial icon creation). // relaunch icon when the version changes (e.g on initial icon creation).
profile_pref_registrar_.Add( profile_pref_registrar_.Add(
prefs::kProfileIconVersion, prefs::kProfileIconVersion,
base::Bind(&BrowserWindowPropertyManager::OnProfileIconVersionChange, base::BindRepeating(
base::Unretained(this))); &BrowserWindowPropertyManager::OnProfileIconVersionChange,
base::Unretained(this)));
} }
BrowserWindowPropertyManager::~BrowserWindowPropertyManager() { BrowserWindowPropertyManager::~BrowserWindowPropertyManager() {
......
...@@ -265,8 +265,8 @@ void DbusAppmenu::Initialize(DbusMenu::InitializedCallback callback) { ...@@ -265,8 +265,8 @@ void DbusAppmenu::Initialize(DbusMenu::InitializedCallback callback) {
pref_change_registrar_.Init(browser_->profile()->GetPrefs()); pref_change_registrar_.Init(browser_->profile()->GetPrefs());
pref_change_registrar_.Add( pref_change_registrar_.Add(
bookmarks::prefs::kShowBookmarkBar, bookmarks::prefs::kShowBookmarkBar,
base::Bind(&DbusAppmenu::OnBookmarkBarVisibilityChanged, base::BindRepeating(&DbusAppmenu::OnBookmarkBarVisibilityChanged,
base::Unretained(this))); base::Unretained(this)));
top_sites_ = TopSitesFactory::GetForProfile(profile_); top_sites_ = TopSitesFactory::GetForProfile(profile_);
if (top_sites_) { if (top_sites_) {
......
...@@ -51,7 +51,7 @@ std::unique_ptr<KeyedService> CreateTemplateURLService( ...@@ -51,7 +51,7 @@ std::unique_ptr<KeyedService> CreateTemplateURLService(
std::make_unique<ChromeTemplateURLServiceClient>( std::make_unique<ChromeTemplateURLServiceClient>(
HistoryServiceFactory::GetForProfile( HistoryServiceFactory::GetForProfile(
profile, ServiceAccessType::EXPLICIT_ACCESS)), profile, ServiceAccessType::EXPLICIT_ACCESS)),
base::Closure()); base::RepeatingClosure());
} }
std::unique_ptr<KeyedService> CreateAutocompleteClassifier( std::unique_ptr<KeyedService> CreateAutocompleteClassifier(
......
...@@ -456,8 +456,9 @@ WebUITabStripContainerView::WebUITabStripContainerView( ...@@ -456,8 +456,9 @@ WebUITabStripContainerView::WebUITabStripContainerView(
top_container_(top_container), top_container_(top_container),
tab_contents_container_(tab_contents_container), tab_contents_container_(tab_contents_container),
auto_closer_(std::make_unique<AutoCloser>( auto_closer_(std::make_unique<AutoCloser>(
base::Bind(&WebUITabStripContainerView::CloseForEventOutsideTabStrip, base::BindRepeating(
base::Unretained(this)), &WebUITabStripContainerView::CloseForEventOutsideTabStrip,
base::Unretained(this)),
browser_view->top_container(), browser_view->top_container(),
tab_contents_container, tab_contents_container,
omnibox)), omnibox)),
......
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