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

Side by Side Diff: chrome/app/nibs/PRESUBMIT.py

Issue 11488009: Add content settings page action for Pepper broker authorization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 10 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 | « chrome/app/nibs/ContentBlockedSimple.xib ('k') | chrome/app/theme/theme_resources.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 """Presubmit script to verify that XIB changes are done with the right version. 5 """Presubmit script to verify that XIB changes are done with the right version.
6 6
7 See http://dev.chromium.org/developers/design-documents/mac-xib-files for more 7 See http://dev.chromium.org/developers/design-documents/mac-xib-files for more
8 information. 8 information.
9 """ 9 """
10 10
(...skipping 15 matching lines...) Expand all
26 r'<string key="IBDocument\.InterfaceBuilderVersion">([0-9]+)</string>' 26 r'<string key="IBDocument\.InterfaceBuilderVersion">([0-9]+)</string>'
27 27
28 def _CheckXIBSystemAndXcodeVersions(input_api, output_api, error_type): 28 def _CheckXIBSystemAndXcodeVersions(input_api, output_api, error_type):
29 affected_xibs = [x for x in input_api.AffectedFiles() 29 affected_xibs = [x for x in input_api.AffectedFiles()
30 if x.LocalPath().endswith('.xib')] 30 if x.LocalPath().endswith('.xib')]
31 31
32 incorrect_system_versions = [] 32 incorrect_system_versions = []
33 incorrect_ib_versions = [] 33 incorrect_ib_versions = []
34 34
35 for xib in affected_xibs: 35 for xib in affected_xibs:
36 if len(xib.NewContents()) == 0:
37 continue
38
36 system_version = None 39 system_version = None
37 ib_version = None 40 ib_version = None
38 41
39 new_contents = xib.NewContents() 42 new_contents = xib.NewContents()
40 if not new_contents: 43 if not new_contents:
41 # Deleting files is always fine. 44 # Deleting files is always fine.
42 continue 45 continue
43 46
44 for line in new_contents: 47 for line in new_contents:
45 m = re.search(SYSTEM_VERSION_RE, line) 48 m = re.search(SYSTEM_VERSION_RE, line)
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 84
82 def CheckChangeOnUpload(input_api, output_api): 85 def CheckChangeOnUpload(input_api, output_api):
83 # Allow uploads to happen even if the presubmit fails, so that contributors 86 # Allow uploads to happen even if the presubmit fails, so that contributors
84 # can ask their reviewer or another person to re-save the XIBs for them. 87 # can ask their reviewer or another person to re-save the XIBs for them.
85 return _CheckXIBSystemAndXcodeVersions(input_api, output_api, 88 return _CheckXIBSystemAndXcodeVersions(input_api, output_api,
86 error_type=output_api.PresubmitPromptWarning) 89 error_type=output_api.PresubmitPromptWarning)
87 90
88 def CheckChangeOnCommit(input_api, output_api): 91 def CheckChangeOnCommit(input_api, output_api):
89 return _CheckXIBSystemAndXcodeVersions(input_api, output_api, 92 return _CheckXIBSystemAndXcodeVersions(input_api, output_api,
90 error_type=output_api.PresubmitError) 93 error_type=output_api.PresubmitError)
OLDNEW
« no previous file with comments | « chrome/app/nibs/ContentBlockedSimple.xib ('k') | chrome/app/theme/theme_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698