Sort project headers in a case-sensitive way since PRESUBMIT enforces that

The PRESUBMIT check requires that the lines:

#include "third_party/WebKit/...h"
#include "third_party/skia/...h"

be sorted in that order, which requires doing a case-sensitive sort. sort-headers.py was
changed to do a case-insensitive sort in r139294 to avoid shuffling system header includes
like these:

#include <uxtheme.h>
#include <Vssym32.h>

This preserves that behavior only for system-style includes (those with <>).

Review URL: https://codereview.chromium.org/12719005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187945 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/tools/sort-headers.py b/tools/sort-headers.py
index b1575b3..ac20ca1 100755
--- a/tools/sort-headers.py
+++ b/tools/sort-headers.py
@@ -37,7 +37,6 @@
   """Sorting comparator key used for comparing two #include lines.
   Returns the filename without the #include/#import prefix.
   """
-  line = line.lower()
   for prefix in ('#include ', '#import '):
     if line.startswith(prefix):
       line = line[len(prefix):]
@@ -56,9 +55,9 @@
   # C++ system headers should come after C system headers.
   if line.startswith('<'):
     if line.find('.h>') != -1:
-      return '2' + line
+      return '2' + line.lower()
     else:
-      return '3' + line
+      return '3' + line.lower()
 
   return '4' + line