Chromium Code Reviews| Index: extensions/common/api_alias_info.h |
| diff --git a/extensions/common/api_alias_info.h b/extensions/common/api_alias_info.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..286ca8f91522a32e27d939be9324d760b019adf8 |
| --- /dev/null |
| +++ b/extensions/common/api_alias_info.h |
| @@ -0,0 +1,43 @@ |
| +// 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_API_ALIAS_INFO_H_ |
| +#define EXTENSIONS_COMMON_API_ALIAS_INFO_H_ |
| + |
| +#include <vector> |
| + |
| +#include "base/lazy_instance.h" |
| +#include "base/macros.h" |
| + |
| +namespace extensions { |
| + |
| +class Alias; |
| +class AliasProvider; |
| + |
| +// Global instance containing information about existing API aliases. |
| +class ApiAliasInfo { |
|
Devlin
2016/09/29 22:03:43
Similarly here, it doesn't look like we use this c
tbarzic
2016/09/29 22:27:13
I'm working on adding code using this fairly soon
Devlin
2016/09/29 22:30:41
Then let's add it in that CL :) It's difficult to
tbarzic
2016/09/29 22:57:31
OK, my plan was to reduce the size of that CL, but
|
| + public: |
| + static ApiAliasInfo* GetInstance(); |
| + |
| + // Adds a provider from which additional API aliases are retrieved. |
| + // Should be used to initialize |this| - before |api_aliases()| is used. |
| + void AddProvider(const AliasProvider& provider); |
| + |
| + const std::vector<Alias>& api_aliases() const { return api_aliases_; } |
| + |
| + private: |
| + friend struct base::DefaultLazyInstanceTraits<ApiAliasInfo>; |
| + |
| + ApiAliasInfo(); |
| + virtual ~ApiAliasInfo(); |
| + |
| + // List of known API aliases. |
| + std::vector<Alias> api_aliases_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ApiAliasInfo); |
| +}; |
| + |
| +} // namespace extensions |
| + |
| +#endif // EXTENSIONS_COMMON_API_ALIAS_INFO_H_ |