| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Without any args, this simply loads the IDs out of a bunch of the Chrome GRD | 6 """Without any args, this simply loads the IDs out of a bunch of the Chrome GRD |
| 7 files, and then checks the subset of the code that loads the strings to try | 7 files, and then checks the subset of the code that loads the strings to try |
| 8 and figure out what isn't in use any more. | 8 and figure out what isn't in use any more. |
| 9 You can give paths to GRD files and source directories to control what is | 9 You can give paths to GRD files and source directories to control what is |
| 10 check instead. | 10 check instead. |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 os.path.join(ui_base_strings_dir, 'app_locale_settings.grd'), | 156 os.path.join(ui_base_strings_dir, 'app_locale_settings.grd'), |
| 157 os.path.join(ui_base_strings_dir, 'ui_strings.grd'), | 157 os.path.join(ui_base_strings_dir, 'ui_strings.grd'), |
| 158 ] | 158 ] |
| 159 | 159 |
| 160 # If no source directories were given, default them: | 160 # If no source directories were given, default them: |
| 161 if len(src_dirs) == 0: | 161 if len(src_dirs) == 0: |
| 162 src_dirs = [ | 162 src_dirs = [ |
| 163 os.path.join(src_dir, 'app'), | 163 os.path.join(src_dir, 'app'), |
| 164 os.path.join(src_dir, 'ash'), | 164 os.path.join(src_dir, 'ash'), |
| 165 os.path.join(src_dir, 'chrome'), | 165 os.path.join(src_dir, 'chrome'), |
| 166 os.path.join(src_dir, 'chrome_frame'), | |
| 167 os.path.join(src_dir, 'components'), | 166 os.path.join(src_dir, 'components'), |
| 168 os.path.join(src_dir, 'content'), | 167 os.path.join(src_dir, 'content'), |
| 169 os.path.join(src_dir, 'device'), | 168 os.path.join(src_dir, 'device'), |
| 170 os.path.join(src_dir, 'ui'), | 169 os.path.join(src_dir, 'ui'), |
| 171 os.path.join(src_dir, 'views'), | 170 os.path.join(src_dir, 'views'), |
| 172 # nsNSSCertHelper.cpp has a bunch of ids | 171 # nsNSSCertHelper.cpp has a bunch of ids |
| 173 os.path.join(src_dir, 'third_party', 'mozilla_security_manager'), | 172 os.path.join(src_dir, 'third_party', 'mozilla_security_manager'), |
| 174 os.path.join(chrome_dir, 'installer'), | 173 os.path.join(chrome_dir, 'installer'), |
| 175 ] | 174 ] |
| 176 | 175 |
| 177 return CheckForUnusedGrdIDsInSources(grd_files, src_dirs) | 176 return CheckForUnusedGrdIDsInSources(grd_files, src_dirs) |
| 178 | 177 |
| 179 | 178 |
| 180 if __name__ == '__main__': | 179 if __name__ == '__main__': |
| 181 sys.exit(main()) | 180 sys.exit(main()) |
| OLD | NEW |