| Index: extensions/common/alias.h
|
| diff --git a/extensions/common/alias.h b/extensions/common/alias.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f1219918322b551551a2dd7ef401c31702493be8
|
| --- /dev/null
|
| +++ b/extensions/common/alias.h
|
| @@ -0,0 +1,41 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef EXTENSIONS_COMMON_ALIAS_H_
|
| +#define EXTENSIONS_COMMON_ALIAS_H_
|
| +
|
| +#include <string>
|
| +
|
| +namespace extensions {
|
| +
|
| +// Information about a specific alias.
|
| +class Alias {
|
| + public:
|
| + // |name|: The alias name.
|
| + // |real_name|: The real name behind alias.
|
| + // |upper_version_bound|: Upper (non-inclusive) bound on Chrome versions for
|
| + // which the alias is valid. For version past this one, alias should be
|
| + // ignored. NULL for aliases without version restriction.
|
| + explicit Alias(const char* const name,
|
| + const char* const real_name,
|
| + const char* const upper_version_bound);
|
| + ~Alias();
|
| +
|
| + const std::string& name() const { return name_; }
|
| + const std::string& real_name() const { return real_name_; }
|
| + bool valid() const { return valid_; }
|
| +
|
| + private:
|
| + // The alias name.
|
| + std::string name_;
|
| + // The real name behind the alias.
|
| + std::string real_name_;
|
| + // Whether the alias is valid - the alias validity might be restricted by
|
| + // current version.
|
| + bool valid_;
|
| +};
|
| +
|
| +} // namespace extensions
|
| +
|
| +#endif // EXTENSIONS_COMMON_ALIAS_H_
|
|
|