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

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

Issue 2379763003: Extract permission alias info from PermissionsProvider (Closed)
Patch Set: not nesting Alias in AliasProvider 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
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_API_ALIAS_INFO_H_
6 #define EXTENSIONS_COMMON_API_ALIAS_INFO_H_
7
8 #include <vector>
9
10 #include "base/lazy_instance.h"
11 #include "base/macros.h"
12
13 namespace extensions {
14
15 class Alias;
16 class AliasProvider;
17
18 // Global instance containing information about existing API aliases.
19 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
20 public:
21 static ApiAliasInfo* GetInstance();
22
23 // Adds a provider from which additional API aliases are retrieved.
24 // Should be used to initialize |this| - before |api_aliases()| is used.
25 void AddProvider(const AliasProvider& provider);
26
27 const std::vector<Alias>& api_aliases() const { return api_aliases_; }
28
29 private:
30 friend struct base::DefaultLazyInstanceTraits<ApiAliasInfo>;
31
32 ApiAliasInfo();
33 virtual ~ApiAliasInfo();
34
35 // List of known API aliases.
36 std::vector<Alias> api_aliases_;
37
38 DISALLOW_COPY_AND_ASSIGN(ApiAliasInfo);
39 };
40
41 } // namespace extensions
42
43 #endif // EXTENSIONS_COMMON_API_ALIAS_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698