summaryrefslogtreecommitdiffstats
path: root/PRESUBMIT_test.py
diff options
context:
space:
mode:
authorolli.raula <olli.raula@intel.com>2015-09-10 04:14:22 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-10 11:15:10 +0000
commit36aa8be4eb53b3ea75b84a9646e0204725f3bc43 (patch)
tree74da8174db2a6edd8d55cf141ec1976b3b37365d /PRESUBMIT_test.py
parent68fc3715f76e3da9131b035ddd9606dfee6180bd (diff)
downloadchromium_src-36aa8be4eb53b3ea75b84a9646e0204725f3bc43.zip
chromium_src-36aa8be4eb53b3ea75b84a9646e0204725f3bc43.tar.gz
chromium_src-36aa8be4eb53b3ea75b84a9646e0204725f3bc43.tar.bz2
Move Singleton and related structs to namespace base
Public APIs from base should live inside base:: so moved Singleton class and structs to base{} and fixed consumers. also fixed: ** Presubmit ERRORS ** Found Singleton<T> in the following header files. Please move them to an appropriate source file so that the template gets instantiated in a single compilation unit. chrome/browser/plugins/plugin_finder.h \ chromecast/media/base/media_message_loop.h \ content/browser/media/android/media_drm_credential_manager.h Presubmit warnings: src/chrome/browser/extensions/warning_badge_service_factory.h:5: #ifndef header guard has wrong style, please use: CHROME_BROWSER_EXTENSIONS_WARNING_BADGE_SERVICE_FACTORY_H_ [build/header_guard] [5] src/chrome/browser/extensions/warning_badge_service_factory.h:39: #endif line should be "#endif // CHROME_BROWSER_EXTENSIONS_WARNING_BADGE_SERVICE_FACTORY_H_" [build/header_guard] [5] TBR=jam@chromium.org Review URL: https://codereview.chromium.org/1308823002 Cr-Commit-Position: refs/heads/master@{#348136}
Diffstat (limited to 'PRESUBMIT_test.py')
-rwxr-xr-xPRESUBMIT_test.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/PRESUBMIT_test.py b/PRESUBMIT_test.py
index e0de967..f57159f 100755
--- a/PRESUBMIT_test.py
+++ b/PRESUBMIT_test.py
@@ -389,10 +389,10 @@ class BadExtensionsTest(unittest.TestCase):
class CheckSingletonInHeadersTest(unittest.TestCase):
def testSingletonInArbitraryHeader(self):
diff_singleton_h = ['base::subtle::AtomicWord '
- 'Singleton<Type, Traits, DifferentiatingType>::']
- diff_foo_h = ['// Singleton<Foo> in comment.',
- 'friend class Singleton<Foo>']
- diff_bad_h = ['Foo* foo = Singleton<Foo>::get();']
+ 'base::Singleton<Type, Traits, DifferentiatingType>::']
+ diff_foo_h = ['// base::Singleton<Foo> in comment.',
+ 'friend class base::Singleton<Foo>']
+ diff_bad_h = ['Foo* foo = base::Singleton<Foo>::get();']
mock_input_api = MockInputApi()
mock_input_api.files = [MockAffectedFile('base/memory/singleton.h',
diff_singleton_h),
@@ -402,10 +402,10 @@ class CheckSingletonInHeadersTest(unittest.TestCase):
MockOutputApi())
self.assertEqual(1, len(warnings))
self.assertEqual('error', warnings[0].type)
- self.assertTrue('Found Singleton<T>' in warnings[0].message)
+ self.assertTrue('Found base::Singleton<T>' in warnings[0].message)
def testSingletonInCC(self):
- diff_cc = ['Foo* foo = Singleton<Foo>::get();']
+ diff_cc = ['Foo* foo = base::Singleton<Foo>::get();']
mock_input_api = MockInputApi()
mock_input_api.files = [MockAffectedFile('some/path/foo.cc', diff_cc)]
warnings = PRESUBMIT._CheckSingletonInHeaders(mock_input_api,