From e3c945500273d95512e31180f4f49fa399f8091d Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" Date: Tue, 26 Jun 2012 20:01:49 +0000 Subject: Add a presubmit check to stop any more usages of harmful browser::Find* methods while we work through the existing list. BUG=129187 Review URL: https://chromiumcodereview.appspot.com/10636058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144245 0039d316-1c4b-4281-b951-d872f2087c98 --- PRESUBMIT.py | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 5 deletions(-) (limited to 'PRESUBMIT.py') diff --git a/PRESUBMIT.py b/PRESUBMIT.py index ab24b57..cfd0cda 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -114,7 +114,7 @@ _BANNED_CPP_FUNCTIONS = ( ( 'FRIEND_TEST(', ( - 'Chromium code should not use gtest\'s FRIEND_TEST() macro. Include' + 'Chromium code should not use gtest\'s FRIEND_TEST() macro. Include', 'base/gtest_prod_util.h and use FRIEND_TEST_ALL_PREFIXES() instead.', ), False, @@ -122,19 +122,64 @@ _BANNED_CPP_FUNCTIONS = ( ( 'ScopedAllowIO', ( - 'New code should not use ScopedAllowIO. Post a task to the blocking pool' - 'or the FILE thread instead.', + 'New code should not use ScopedAllowIO. Post a task to the blocking', + 'pool or the FILE thread instead.', ), - False, + True, ), ( 'FilePathWatcher::Delegate', ( - 'New code should not use FilePathWatcher::Delegate. Use the callback' + 'New code should not use FilePathWatcher::Delegate. Use the callback', 'interface instead.', ), False, ), + ( + 'browser::FindLastActiveWithProfile', + ( + 'This function is deprecated and we\'re working on removing it. Pass', + 'more context to get a Browser*, like a WebContents, window, or session', + 'id. Talk to ben@ or jam@ for more information.', + ), + True, + ), + ( + 'browser::FindBrowserWithProfile', + ( + 'This function is deprecated and we\'re working on removing it. Pass', + 'more context to get a Browser*, like a WebContents, window, or session', + 'id. Talk to ben@ or jam@ for more information.', + ), + True, + ), + ( + 'browser::FindAnyBrowser', + ( + 'This function is deprecated and we\'re working on removing it. Pass', + 'more context to get a Browser*, like a WebContents, window, or session', + 'id. Talk to ben@ or jam@ for more information.', + ), + True, + ), + ( + 'browser::FindOrCreateTabbedBrowser', + ( + 'This function is deprecated and we\'re working on removing it. Pass', + 'more context to get a Browser*, like a WebContents, window, or session', + 'id. Talk to ben@ or jam@ for more information.', + ), + True, + ), + ( + 'browser::FindTabbedBrowser', + ( + 'This function is deprecated and we\'re working on removing it. Pass', + 'more context to get a Browser*, like a WebContents, window, or session', + 'id. Talk to ben@ or jam@ for more information.', + ), + True, + ), ) -- cgit v1.1