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

Side by Side Diff: ppapi/PRESUBMIT.py

Issue 13093006: Update PRESUBMIT scripts to use PresubmitPromptOrNotify helper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« PRESUBMIT_test.py ('K') | « PRESUBMIT_test.py ('k') | no next file » | 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 import os 5 import os
6 import re 6 import re
7 import sys 7 import sys
8 import subprocess 8 import subprocess
9 9
10 10
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 if name_parts[-1] == 'pp_macros': 169 if name_parts[-1] == 'pp_macros':
170 # The C header generator adds a PPAPI_RELEASE macro based on all the 170 # The C header generator adds a PPAPI_RELEASE macro based on all the
171 # IDL files, so pp_macros.h may change while its IDL does not. 171 # IDL files, so pp_macros.h may change while its IDL does not.
172 lines = input_api.RightHandSideLines( 172 lines = input_api.RightHandSideLines(
173 lambda f: f.LocalPath() == 'ppapi/c/%s.h' % filename) 173 lambda f: f.LocalPath() == 'ppapi/c/%s.h' % filename)
174 releaseChanged = False 174 releaseChanged = False
175 for line in lines: 175 for line in lines:
176 if line[2].split()[:2] == ['#define', 'PPAPI_RELEASE']: 176 if line[2].split()[:2] == ['#define', 'PPAPI_RELEASE']:
177 results.append( 177 results.append(
178 output_api.PresubmitNotifyResult( 178 output_api.PresubmitPromptOrNotify(
179 'PPAPI_RELEASE has changed', long_text=line[2])) 179 'PPAPI_RELEASE has changed', long_text=line[2]))
180 releaseChanged = True 180 releaseChanged = True
181 break 181 break
182 if releaseChanged: 182 if releaseChanged:
183 continue 183 continue
184 184
185 if 'trusted' in name_parts: 185 if 'trusted' in name_parts:
186 missing_priv.append(' ppapi/c/%s.h' % filename) 186 missing_priv.append(' ppapi/c/%s.h' % filename)
187 continue 187 continue
188 188
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 233
234 return results 234 return results
235 235
236 236
237 def CheckChangeOnUpload(input_api, output_api): 237 def CheckChangeOnUpload(input_api, output_api):
238 return CheckChange(input_api, output_api) 238 return CheckChange(input_api, output_api)
239 239
240 240
241 def CheckChangeOnCommit(input_api, output_api): 241 def CheckChangeOnCommit(input_api, output_api):
242 return CheckChange(input_api, output_api) 242 return CheckChange(input_api, output_api)
OLDNEW
« PRESUBMIT_test.py ('K') | « PRESUBMIT_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698