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

Side by Side Diff: chrome/tools/check_grd_for_unused_strings.py

Issue 16231013: device: Restructure the layout of gyp files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: doh forgot to rename the principal - the target Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/tools/build/repack_locales.py ('k') | device/bluetooth/bluetooth.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 os.path.join(chrome_app_res_dir, 'locale_settings_chromiumos.grd'), 144 os.path.join(chrome_app_res_dir, 'locale_settings_chromiumos.grd'),
145 os.path.join(chrome_app_res_dir, 'locale_settings_google_chromeos.grd'), 145 os.path.join(chrome_app_res_dir, 'locale_settings_google_chromeos.grd'),
146 os.path.join(chrome_app_res_dir, 'locale_settings_linux.grd'), 146 os.path.join(chrome_app_res_dir, 'locale_settings_linux.grd'),
147 os.path.join(chrome_app_res_dir, 'locale_settings_mac.grd'), 147 os.path.join(chrome_app_res_dir, 'locale_settings_mac.grd'),
148 os.path.join(chrome_app_res_dir, 'locale_settings_win.grd'), 148 os.path.join(chrome_app_res_dir, 'locale_settings_win.grd'),
149 os.path.join(chrome_app_dir, 'theme', 'theme_resources.grd'), 149 os.path.join(chrome_app_dir, 'theme', 'theme_resources.grd'),
150 os.path.join(chrome_dir, 'browser', 'browser_resources.grd'), 150 os.path.join(chrome_dir, 'browser', 'browser_resources.grd'),
151 os.path.join(chrome_dir, 'common', 'common_resources.grd'), 151 os.path.join(chrome_dir, 'common', 'common_resources.grd'),
152 os.path.join(chrome_dir, 'renderer', 'resources', 152 os.path.join(chrome_dir, 'renderer', 'resources',
153 'renderer_resources.grd'), 153 'renderer_resources.grd'),
154 os.path.join(device_base_dir, 'device_bluetooth_strings.grd'), 154 os.path.join(device_base_dir, 'bluetooth', 'bluetooth_strings.grd'),
155 os.path.join(src_dir, 'ui', 'resources', 'ui_resources.grd'), 155 os.path.join(src_dir, 'ui', 'resources', 'ui_resources.grd'),
156 os.path.join(src_dir, 'ui', 'webui', 'resources', 'webui_resources.grd'), 156 os.path.join(src_dir, 'ui', 'webui', 'resources', 'webui_resources.grd'),
157 os.path.join(ui_base_strings_dir, 'app_locale_settings.grd'), 157 os.path.join(ui_base_strings_dir, 'app_locale_settings.grd'),
158 os.path.join(ui_base_strings_dir, 'ui_strings.grd'), 158 os.path.join(ui_base_strings_dir, 'ui_strings.grd'),
159 ] 159 ]
160 160
161 # If no source directories were given, default them: 161 # If no source directories were given, default them:
162 if len(src_dirs) == 0: 162 if len(src_dirs) == 0:
163 src_dirs = [ 163 src_dirs = [
164 os.path.join(src_dir, 'app'), 164 os.path.join(src_dir, 'app'),
165 os.path.join(src_dir, 'ash'), 165 os.path.join(src_dir, 'ash'),
166 os.path.join(src_dir, 'chrome'), 166 os.path.join(src_dir, 'chrome'),
167 os.path.join(src_dir, 'chrome_frame'), 167 os.path.join(src_dir, 'chrome_frame'),
168 os.path.join(src_dir, 'components'), 168 os.path.join(src_dir, 'components'),
169 os.path.join(src_dir, 'content'), 169 os.path.join(src_dir, 'content'),
170 os.path.join(src_dir, 'device'), 170 os.path.join(src_dir, 'device'),
171 os.path.join(src_dir, 'ui'), 171 os.path.join(src_dir, 'ui'),
172 os.path.join(src_dir, 'views'), 172 os.path.join(src_dir, 'views'),
173 # nsNSSCertHelper.cpp has a bunch of ids 173 # nsNSSCertHelper.cpp has a bunch of ids
174 os.path.join(src_dir, 'third_party', 'mozilla_security_manager'), 174 os.path.join(src_dir, 'third_party', 'mozilla_security_manager'),
175 os.path.join(chrome_dir, 'installer'), 175 os.path.join(chrome_dir, 'installer'),
176 ] 176 ]
177 177
178 return CheckForUnusedGrdIDsInSources(grd_files, src_dirs) 178 return CheckForUnusedGrdIDsInSources(grd_files, src_dirs)
179 179
180 180
181 if __name__ == '__main__': 181 if __name__ == '__main__':
182 sys.exit(main()) 182 sys.exit(main())
OLDNEW
« no previous file with comments | « chrome/tools/build/repack_locales.py ('k') | device/bluetooth/bluetooth.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698