| OLD | NEW |
| (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 a specific alias. |
| 13 class Alias { |
| 14 public: |
| 15 // |name|: The alias name. |
| 16 // |real_name|: The real name behind alias. |
| 17 // |upper_version_bound|: Upper (non-inclusive) bound on Chrome versions for |
| 18 // which the alias is valid. For version past this one, alias should be |
| 19 // ignored. NULL for aliases without version restriction. |
| 20 explicit Alias(const char* const name, |
| 21 const char* const real_name, |
| 22 const char* const upper_version_bound); |
| 23 ~Alias(); |
| 24 |
| 25 const std::string& name() const { return name_; } |
| 26 const std::string& real_name() const { return real_name_; } |
| 27 bool valid() const { return valid_; } |
| 28 |
| 29 private: |
| 30 // The alias name. |
| 31 std::string name_; |
| 32 // The real name behind the alias. |
| 33 std::string real_name_; |
| 34 // Whether the alias is valid - the alias validity might be restricted by |
| 35 // current version. |
| 36 bool valid_; |
| 37 }; |
| 38 |
| 39 } // namespace extensions |
| 40 |
| 41 #endif // EXTENSIONS_COMMON_ALIAS_H_ |
| OLD | NEW |