Commit 59b499ef authored by Giovanni Ortuño Urquidi's avatar Giovanni Ortuño Urquidi Committed by Commit Bot

desktop-pwas: Change base::Bind and base::Closure to base::BindOnce and base::OnceClosure

Changes all uses of base::Bind and base::Closure in
BookmarkAppNavigationThrottle code. base::Bind and base::Closure are
deprecated in favor of base::BindOnce and base::OnceClosure.

Bug: 804653
Change-Id: Idc4b84649b52835d67aaedd83c50cb7c0e0a7c00
Reviewed-on: https://chromium-review.googlesource.com/880082Reviewed-by: default avatarMatt Giuca <mgiuca@chromium.org>
Reviewed-by: default avatarBen Wells <benwells@chromium.org>
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532301}
parent 4faf2d6b
...@@ -369,7 +369,7 @@ BookmarkAppNavigationThrottle::ProcessNavigation(bool is_redirect) { ...@@ -369,7 +369,7 @@ BookmarkAppNavigationThrottle::ProcessNavigation(bool is_redirect) {
// experience for out-of-scope navigations improves. // experience for out-of-scope navigations improves.
DVLOG(1) << "Open in new tab."; DVLOG(1) << "Open in new tab.";
base::ThreadTaskRunnerHandle::Get()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&BookmarkAppNavigationThrottle::OpenInNewTab, FROM_HERE, base::BindOnce(&BookmarkAppNavigationThrottle::OpenInNewTab,
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
RecordProcessNavigationResult( RecordProcessNavigationResult(
ProcessNavigationResult::kDeferOpenNewTabInAppOutOfScope); ProcessNavigationResult::kDeferOpenNewTabInAppOutOfScope);
...@@ -392,7 +392,8 @@ BookmarkAppNavigationThrottle::OpenInAppWindowAndCloseTabIfNecessary( ...@@ -392,7 +392,8 @@ BookmarkAppNavigationThrottle::OpenInAppWindowAndCloseTabIfNecessary(
if (!source->HasOpener()) { if (!source->HasOpener()) {
DVLOG(1) << "Deferring opening app."; DVLOG(1) << "Deferring opening app.";
base::ThreadTaskRunnerHandle::Get()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&BookmarkAppNavigationThrottle::OpenBookmarkApp, FROM_HERE,
base::BindOnce(&BookmarkAppNavigationThrottle::OpenBookmarkApp,
weak_ptr_factory_.GetWeakPtr(), target_app)); weak_ptr_factory_.GetWeakPtr(), target_app));
} else { } else {
OpenBookmarkApp(target_app); OpenBookmarkApp(target_app);
...@@ -402,7 +403,8 @@ BookmarkAppNavigationThrottle::OpenInAppWindowAndCloseTabIfNecessary( ...@@ -402,7 +403,8 @@ BookmarkAppNavigationThrottle::OpenInAppWindowAndCloseTabIfNecessary(
// a WebContents should be done asynchronously to avoid UAFs. Closing the // a WebContents should be done asynchronously to avoid UAFs. Closing the
// WebContents will cancel the navigation. // WebContents will cancel the navigation.
base::ThreadTaskRunnerHandle::Get()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&BookmarkAppNavigationThrottle::CloseWebContents, FROM_HERE,
base::BindOnce(&BookmarkAppNavigationThrottle::CloseWebContents,
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
return content::NavigationThrottle::DEFER; return content::NavigationThrottle::DEFER;
} }
......
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