Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Side by Side Diff: PRESUBMIT.py

Issue 6714032: Move some files in base to base/memory. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: only base Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/atomic_ref_count.h » ('j') | base/callback_internal.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Top-level presubmit script for Chromium. 5 """Top-level presubmit script for Chromium.
6 6
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8 for more details about the presubmit API built into gcl. 8 for more details about the presubmit API built into gcl.
9 """ 9 """
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 'See http://groups.google.com/a/chromium.org/group/chromium-dev/' + 48 'See http://groups.google.com/a/chromium.org/group/chromium-dev/' +
49 'browse_thread/thread/efb28c10435987fd', 49 'browse_thread/thread/efb28c10435987fd',
50 files) ] 50 files) ]
51 return [] 51 return []
52 52
53 def _CheckSingletonInHeaders(input_api, output_api, source_file_filter): 53 def _CheckSingletonInHeaders(input_api, output_api, source_file_filter):
54 """Checks to make sure no header files have |Singleton<|.""" 54 """Checks to make sure no header files have |Singleton<|."""
55 pattern = input_api.re.compile(r'Singleton<') 55 pattern = input_api.re.compile(r'Singleton<')
56 files = [] 56 files = []
57 for f in input_api.AffectedSourceFiles(source_file_filter): 57 for f in input_api.AffectedSourceFiles(source_file_filter):
58 if f.LocalPath().startswith('base/memory/singleton'):
59 continue
58 if (f.LocalPath().endswith('.h') or f.LocalPath().endswith('.hxx') or 60 if (f.LocalPath().endswith('.h') or f.LocalPath().endswith('.hxx') or
59 f.LocalPath().endswith('.hpp') or f.LocalPath().endswith('.inl')): 61 f.LocalPath().endswith('.hpp') or f.LocalPath().endswith('.inl')):
60 contents = input_api.ReadFile(f) 62 contents = input_api.ReadFile(f)
61 if pattern.search(contents): 63 if pattern.search(contents):
62 files.append(f) 64 files.append(f)
63 65
64 if len(files): 66 if len(files):
65 return [ output_api.PresubmitError( 67 return [ output_api.PresubmitError(
66 'Found Singleton<T> in the following header files.\n' + 68 'Found Singleton<T> in the following header files.\n' +
67 'Please move them to an appropriate source file so that the ' + 69 'Please move them to an appropriate source file so that the ' +
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 results.extend(input_api.canned_checks.CheckChangeHasBugField( 225 results.extend(input_api.canned_checks.CheckChangeHasBugField(
224 input_api, output_api)) 226 input_api, output_api))
225 results.extend(input_api.canned_checks.CheckChangeHasTestField( 227 results.extend(input_api.canned_checks.CheckChangeHasTestField(
226 input_api, output_api)) 228 input_api, output_api))
227 results.extend(_CheckSubversionConfig(input_api, output_api)) 229 results.extend(_CheckSubversionConfig(input_api, output_api))
228 return results 230 return results
229 231
230 232
231 def GetPreferredTrySlaves(): 233 def GetPreferredTrySlaves():
232 return ['win', 'linux', 'mac'] 234 return ['win', 'linux', 'mac']
OLDNEW
« no previous file with comments | « no previous file | base/atomic_ref_count.h » ('j') | base/callback_internal.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698