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

Side by Side Diff: tools/metrics/histograms/update_extension_permission.py

Issue 1094873002: Extensions: Switch to new permission message system, part V (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Updates ExtensionPermission2 enum in histograms.xml file with values read 5 """Updates ExtensionPermission2 and ExtensionPermission3 enums in histograms.xml
6 from permission_message.h. 6 file with values read from permission_message.h and api_permission.h,
7 respectively.
7 8
8 If the file was pretty-printed, the updated version is pretty-printed too. 9 If the file was pretty-printed, the updated version is pretty-printed too.
9 """ 10 """
10 11
11 import os 12 import os
12 import sys 13 import sys
13 14
14 from update_histogram_enum import UpdateHistogramEnum 15 from update_histogram_enum import UpdateHistogramEnum
15 16
16 if __name__ == '__main__': 17 if __name__ == '__main__':
17 if len(sys.argv) > 1: 18 if len(sys.argv) > 1:
18 print >>sys.stderr, 'No arguments expected!' 19 print >>sys.stderr, 'No arguments expected!'
19 sys.stderr.write(__doc__) 20 sys.stderr.write(__doc__)
20 sys.exit(1) 21 sys.exit(1)
21 22
22 UpdateHistogramEnum(histogram_enum_name='ExtensionPermission2', 23 UpdateHistogramEnum(histogram_enum_name='ExtensionPermission2',
23 source_enum_path=os.path.join('..', '..', '..', 24 source_enum_path=os.path.join('..', '..', '..',
24 'extensions', 'common', 25 'extensions', 'common',
25 'permissions', 26 'permissions',
26 'permission_message.h'), 27 'permission_message.h'),
27 start_marker='^enum ID {', 28 start_marker='^enum ID {',
28 end_marker='^kEnumBoundary') 29 end_marker='^kEnumBoundary')
30
31 UpdateHistogramEnum(histogram_enum_name='ExtensionPermission3',
32 source_enum_path=os.path.join('..', '..', '..',
33 'extensions', 'common',
34 'permissions',
35 'api_permission.h'),
36 start_marker='^enum ID {',
37 end_marker='^kEnumBoundary')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698