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

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

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 #include "extensions/common/api_alias_info.h"
6
7 #include "extensions/common/alias.h"
8 #include "extensions/common/alias_provider.h"
9
10 namespace extensions {
11
12 namespace {
13
14 static base::LazyInstance<ApiAliasInfo> g_api_alias_info =
15 LAZY_INSTANCE_INITIALIZER;
16
17 } // namespace
18
19 // static
20 ApiAliasInfo* ApiAliasInfo::GetInstance() {
21 return g_api_alias_info.Pointer();
22 }
23
24 void ApiAliasInfo::AddProvider(const AliasProvider& provider) {
25 std::vector<Alias> api_aliases = provider.GetValidApiAliases();
26 api_aliases_.insert(api_aliases_.end(), api_aliases.begin(),
27 api_aliases.end());
28 }
29
30 ApiAliasInfo::ApiAliasInfo() {}
31 ApiAliasInfo::~ApiAliasInfo() {}
32
33 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698