Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 | |
| OLD | NEW |