diff options
author | dilmah@chromium.org <dilmah@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-16 14:21:07 +0000 |
---|---|---|
committer | dilmah@chromium.org <dilmah@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-16 14:21:07 +0000 |
commit | 440e4928ac89d844f79bb4377ced0a2d964c5d0a (patch) | |
tree | e28c53dd191ea1e45c22ce7d34aba0a17e8af549 /chrome/browser/chromeos/offline | |
parent | 5832419f9625a1e286b5c796f1217fa4c3247087 (diff) | |
download | chromium_src-440e4928ac89d844f79bb4377ced0a2d964c5d0a.zip chromium_src-440e4928ac89d844f79bb4377ced0a2d964c5d0a.tar.gz chromium_src-440e4928ac89d844f79bb4377ced0a2d964c5d0a.tar.bz2 |
Google codestyle prescribes sorting #include filenames within a section.
Do it fast with following shell script:
export LC_ALL=C
find chrome/browser/chromeos/ -name '*.h' -o -name '*.cc' \
| xargs grep -C1 '^#include' \
| awk -F: '$2 !~ "include" { prev=""; next } ($2 <= prev) { print $1 } { prev=$2 }' \
| uniq \
| xargs -n1 sh -c 'cat "$1" \
| awk "{ tag=((/^#include/) \"_\" (/</) \"_\" (/third.party/)); print tag \"\t\" \$0 }" \
| awk -vi=0 -F\\t "{ if (!/^1_0_/ || \$1 != prev) { ++i } } { printf \"%09d\t%s\n\",i,\$0; prev=\$1 }" \
| sort \
| sed "s/^[0-9]*\t[0-9]_[0-9]_[0-9]\t//" > "$1".fixed; mv -f "$1".fixed "$1"' xxx
BUG=None
TEST=Manual
Review URL: http://codereview.chromium.org/3402010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59646 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/offline')
-rw-r--r-- | chrome/browser/chromeos/offline/offline_load_service.cc | 6 | ||||
-rw-r--r-- | chrome/browser/chromeos/offline/offline_load_service.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/chromeos/offline/offline_load_service.cc b/chrome/browser/chromeos/offline/offline_load_service.cc index 63602f5..a000357 100644 --- a/chrome/browser/chromeos/offline/offline_load_service.cc +++ b/chrome/browser/chromeos/offline/offline_load_service.cc @@ -4,13 +4,13 @@ #include "chrome/browser/chromeos/offline/offline_load_service.h" -#include "base/singleton.h" #include "base/ref_counted.h" -#include "chrome/common/notification_service.h" +#include "base/singleton.h" #include "chrome/browser/chrome_thread.h" +#include "chrome/browser/tab_contents/navigation_controller.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/tab_contents/tab_util.h" -#include "chrome/browser/tab_contents/navigation_controller.h" +#include "chrome/common/notification_service.h" namespace chromeos { diff --git a/chrome/browser/chromeos/offline/offline_load_service.h b/chrome/browser/chromeos/offline/offline_load_service.h index 45baff6..d052d51 100644 --- a/chrome/browser/chromeos/offline/offline_load_service.h +++ b/chrome/browser/chromeos/offline/offline_load_service.h @@ -10,8 +10,8 @@ #include "base/ref_counted.h" #include "chrome/common/notification_observer.h" -#include "chrome/common/notification_type.h" #include "chrome/common/notification_registrar.h" +#include "chrome/common/notification_type.h" class GURL; class NavigationController; |