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

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

Issue 2379763003: Extract permission alias info from PermissionsProvider (Closed)
Patch Set: Introduce extension::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/extensions_aliases.h"
6
7 #include "base/macros.h"
8
9 namespace extensions {
10
11 namespace {
12
13 struct AliasInfo {
14 const char* const alias_name;
15 const char* const real_name;
16 };
17
18 const AliasInfo kPermissionAliases[] = {
19 {"alwaysOnTopWindows", "app.window.alwaysOnTop"},
20 {"fullscreen", "app.window.fullscreen"},
21 {"overrideEscFullscreen", "app.window.fullscreen.overrideEsc"},
22 {"unlimited_storage", "unlimitedStorage"}};
23
24 } // namespace
25
26 std::vector<Alias> GetExtensionsPermissionAliases() {
27 std::vector<Alias> result;
Devlin 2016/10/07 18:36:21 ditto re simpler body
28 for (size_t i = 0; i < arraysize(kPermissionAliases); ++i) {
29 const AliasInfo& kAlias = kPermissionAliases[i];
30 result.push_back(Alias(kAlias.alias_name, kAlias.real_name));
31 }
32 return result;
33 }
34
35 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698