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

Unified Diff: tools/sort-headers.py

Issue 7048007: Move scoped_temp_dir and scoped_native_library back from base/memory to base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: scriptfix Created 9 years, 7 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
« no previous file with comments | « remoting/host/json_host_config_unittest.cc ('k') | ui/base/resource/data_pack_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/sort-headers.py
diff --git a/tools/sort-headers.py b/tools/sort-headers.py
index b18ac6c4a83147e85a1051df45fa7f8e4206ac6e..3b309c4288a0632328399acd33c5c752dece2f1c 100755
--- a/tools/sort-headers.py
+++ b/tools/sort-headers.py
@@ -34,10 +34,16 @@ def IncludeCompareKey(line):
"""
for prefix in ('#include ', '#import '):
if line.startswith(prefix):
- return line[len(prefix):]
+ line = line[len(prefix):]
+ break
+ # <windows.h> needs to be before other includes, so return a key
+ # that's less than all other keys.
+ if line.find('<windows.h>') != -1:
+ return ''
return line
+
def IsInclude(line):
"""Returns True if the line is an #include/#import line."""
return line.startswith('#include ') or line.startswith('#import ')
« no previous file with comments | « remoting/host/json_host_config_unittest.cc ('k') | ui/base/resource/data_pack_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698