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

Side by Side Diff: extensions/common/alias.h

Issue 2379763003: Extract permission alias info from PermissionsProvider (Closed)
Patch Set: . Created 4 years, 2 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
« no previous file with comments | « extensions/common/BUILD.gn ('k') | extensions/common/extensions_aliases.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef EXTENSIONS_COMMON_ALIAS_H_
6 #define EXTENSIONS_COMMON_ALIAS_H_
7
8 #include <string>
9
10 namespace extensions {
11
12 // Information about an alias.
13 // Main usage: describing aliases for extension features (extension permissions,
14 // APIs), which is useful for ensuring backward-compatibility of extension
15 // features when they get renamed. Old feature name can be defined as an alias
16 // for the new feature name - this would ensure that the extensions using the
17 // old feature name don't break.
18 class Alias {
19 public:
20 // |name|: The alias name.
21 // |real_name|: The real name behind alias.
22 Alias(const char* const name, const char* const real_name)
23 : name_(name), real_name_(real_name) {}
24 ~Alias() {}
25
26 const std::string& name() const { return name_; }
27
28 const std::string& real_name() const { return real_name_; }
29
30 private:
31 // The alias name.
32 std::string name_;
33
34 // The real name behind the alias.
35 std::string real_name_;
36 };
37
38 } // namespace extensions
39
40 #endif // EXTENSIONS_COMMON_ALIAS_H_
OLDNEW
« no previous file with comments | « extensions/common/BUILD.gn ('k') | extensions/common/extensions_aliases.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698