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

Unified Diff: ppapi/generators/idl_c_proto.py

Issue 23569005: Add PPAPI interfaces for platform verification. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/generators/idl_c_proto.py
diff --git a/ppapi/generators/idl_c_proto.py b/ppapi/generators/idl_c_proto.py
index 2989a09afd449d61ba81780f1a3a1984720b30ce..0e0797ac42ce047e4b3050142f11bdd3203f6e84 100755
--- a/ppapi/generators/idl_c_proto.py
+++ b/ppapi/generators/idl_c_proto.py
@@ -606,8 +606,14 @@ class CGen(object):
for line in data.split('\n'):
# Add indentation
line = tab + line
- if len(line) <= 80:
+ space_break = line.rfind(' ', 0, 80)
+ if len(line) <= 80 or 'http' in line:
+ # Ignore normal line and URLs permitted by the style guide.
lines.append(line.rstrip())
+ elif not '(' in line and space_break >= 0:
+ # Break long typedefs on nearest space.
+ lines.append(line[0:space_break])
+ lines.append(' ' + line[space_break + 1:])
else:
left = line.rfind('(') + 1
args = line[left:].split(',')
« no previous file with comments | « ppapi/c/private/ppb_platform_verification_private.h ('k') | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698