Commit b3ea38c9 authored by Alex Turner's avatar Alex Turner Committed by Commit Bot

Enforce base::CancelableCallback/Closure deprecation presubmit

This will enable a presubmit to prevent reintroduction of the deprecated
base::CancelableCallback and base::CancelableClosure in directories that
have been migrated. This follows on from crrev.com/c/2505963, which
ensures that all converted directories have been appropriately migrated.

Bug: 1142629
Change-Id: I2ad4ba9340d8023c34835120b84173de83265291
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2506350Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831062}
parent 1df2c2e8
......@@ -319,6 +319,7 @@ _BANNED_IOS_EGTEST_FUNCTIONS = (
# checks for them and prevent regressions.
_NOT_CONVERTED_TO_MODERN_BIND_AND_CALLBACK = '|'.join((
'^base/callback.h', # Intentional.
'^base/cancelable_callback.h', # Intentional.
'^chrome/browser/android/webapps/add_to_homescreen_data_fetcher_unittest.cc',
'^chrome/browser/apps/guest_view/',
'^chrome/browser/browsing_data/',
......@@ -830,6 +831,24 @@ _BANNED_CPP_FUNCTIONS = (
False,
(_NOT_CONVERTED_TO_MODERN_BIND_AND_CALLBACK,),
),
(
r'/\bbase::CancelableCallback[<:]',
(
'Please use base::Cancelable{Once,Repeating}Callback instead',
'of base::CancelableCallback. (crbug.com/714018)',
),
False,
(_NOT_CONVERTED_TO_MODERN_BIND_AND_CALLBACK,),
),
(
r'/\bbase::CancelableClosure\b',
(
'Please use base::Cancelable{Once,Repeating}Closure instead',
'of base::CancelableClosure. (crbug.com/714018)',
),
False,
(_NOT_CONVERTED_TO_MODERN_BIND_AND_CALLBACK,),
),
(
r'/\bRunMessageLoop\b',
(
......
......@@ -107,8 +107,6 @@ _CONFIG = [
'base::CancelableOnceClosure',
'base::CancelableRepeatingCallback',
'base::CancelableRepeatingClosure',
'base::CancelableCallback',
'base::CancelableClosure',
# //base/mac/scoped_nsobject.h
'base::scoped_nsobject',
......
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