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

Side by Side Diff: tools/json_schema_compiler/feature_compiler.py

Issue 2669463002: [Extensions] Remove BaseFeatureProvider (Closed)
Patch Set: Created 3 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 import argparse 5 import argparse
6 import copy 6 import copy
7 from datetime import datetime 7 from datetime import datetime
8 from functools import partial 8 from functools import partial
9 import os 9 import os
10 import re 10 import re
11 11
12 from code import Code 12 from code import Code
13 import json_parse 13 import json_parse
14 14
15 # The template for the header file of the generated FeatureProvider. 15 # The template for the header file of the generated FeatureProvider.
16 HEADER_FILE_TEMPLATE = """ 16 HEADER_FILE_TEMPLATE = """
17 // Copyright %(year)s The Chromium Authors. All rights reserved. 17 // Copyright %(year)s The Chromium Authors. All rights reserved.
18 // Use of this source code is governed by a BSD-style license that can be 18 // Use of this source code is governed by a BSD-style license that can be
19 // found in the LICENSE file. 19 // found in the LICENSE file.
20 20
21 // GENERATED FROM THE FEATURES FILE: 21 // GENERATED FROM THE FEATURES FILE:
22 // %(source_files)s 22 // %(source_files)s
23 // DO NOT EDIT. 23 // DO NOT EDIT.
24 24
25 #ifndef %(header_guard)s 25 #ifndef %(header_guard)s
26 #define %(header_guard)s 26 #define %(header_guard)s
27 27
28 #include "extensions/common/features/base_feature_provider.h" 28 #include "extensions/common/features/feature_provider.h"
29 29
30 namespace extensions { 30 namespace extensions {
31 31
32 class %(provider_class)s : public BaseFeatureProvider { 32 class %(provider_class)s : public FeatureProvider {
33 public: 33 public:
34 %(provider_class)s(); 34 %(provider_class)s();
35 ~%(provider_class)s() override; 35 ~%(provider_class)s() override;
36 36
37 private: 37 private:
38 DISALLOW_COPY_AND_ASSIGN(%(provider_class)s); 38 DISALLOW_COPY_AND_ASSIGN(%(provider_class)s);
39 }; 39 };
40 40
41 } // namespace extensions 41 } // namespace extensions
42 42
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 help='The source features.json files') 776 help='The source features.json files')
777 args = parser.parse_args() 777 args = parser.parse_args()
778 if args.feature_type not in FEATURE_TYPES: 778 if args.feature_type not in FEATURE_TYPES:
779 raise NameError('Unknown feature type: %s' % args.feature_type) 779 raise NameError('Unknown feature type: %s' % args.feature_type)
780 c = FeatureCompiler(args.chrome_root, args.source_files, args.feature_type, 780 c = FeatureCompiler(args.chrome_root, args.source_files, args.feature_type,
781 args.provider_class, args.out_root, 781 args.provider_class, args.out_root,
782 args.out_base_filename) 782 args.out_base_filename)
783 c.Load() 783 c.Load()
784 c.Compile() 784 c.Compile()
785 c.Write() 785 c.Write()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698