Commit 5194a1d9 authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

weblayer: converts a couple of callbacks to once/repeatingcallback

There are more that need to be converted, but they are require
other code to be converted.

BUG=none
TEST=none

Change-Id: Ifc44aa4c015a32c49488b14bcda2c721767748bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1947389Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720770}
parent 8061760f
...@@ -305,7 +305,7 @@ ContentBrowserClientImpl::CreateThrottlesForNavigation( ...@@ -305,7 +305,7 @@ ContentBrowserClientImpl::CreateThrottlesForNavigation(
std::vector<std::unique_ptr<content::NavigationThrottle>> throttles; std::vector<std::unique_ptr<content::NavigationThrottle>> throttles;
throttles.push_back(std::make_unique<SSLErrorNavigationThrottle>( throttles.push_back(std::make_unique<SSLErrorNavigationThrottle>(
handle, std::make_unique<SSLCertReporterImpl>(), handle, std::make_unique<SSLCertReporterImpl>(),
base::Bind(&HandleSSLError), base::Bind(&IsInHostedApp))); base::BindOnce(&HandleSSLError), base::BindOnce(&IsInHostedApp)));
return throttles; return throttles;
} }
......
...@@ -293,8 +293,9 @@ ProfileImpl::ProfileImpl(const std::string& name) : name_(name) { ...@@ -293,8 +293,9 @@ ProfileImpl::ProfileImpl(const std::string& name) : name_(name) {
browser_context_ = std::make_unique<BrowserContextImpl>(this, data_path_); browser_context_ = std::make_unique<BrowserContextImpl>(this, data_path_);
locale_change_subscription_ = i18n::RegisterLocaleChangeCallback( locale_change_subscription_ =
base::Bind(&ProfileImpl::OnLocaleChanged, base::Unretained(this))); i18n::RegisterLocaleChangeCallback(base::BindRepeating(
&ProfileImpl::OnLocaleChanged, base::Unretained(this)));
} }
ProfileImpl::~ProfileImpl() { ProfileImpl::~ProfileImpl() {
......
...@@ -110,8 +110,9 @@ TabImpl::TabImpl(ProfileImpl* profile, ...@@ -110,8 +110,9 @@ TabImpl::TabImpl(ProfileImpl* profile,
} }
UpdateRendererPrefs(false); UpdateRendererPrefs(false);
locale_change_subscription_ = i18n::RegisterLocaleChangeCallback( locale_change_subscription_ =
base::Bind(&TabImpl::UpdateRendererPrefs, base::Unretained(this), true)); i18n::RegisterLocaleChangeCallback(base::BindRepeating(
&TabImpl::UpdateRendererPrefs, base::Unretained(this), true));
std::unique_ptr<UserData> user_data = std::make_unique<UserData>(); std::unique_ptr<UserData> user_data = std::make_unique<UserData>();
user_data->controller = this; user_data->controller = this;
......
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