OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/extensions/component_extensions_whitelist/whitelist.h" | 5 #include "chrome/browser/extensions/component_extensions_whitelist/whitelist.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" | 9 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" |
10 #include "chrome/common/extensions/extension_constants.h" | 10 #include "chrome/common/extensions/extension_constants.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "grit/keyboard_resources.h" | 21 #include "grit/keyboard_resources.h" |
22 #include "ui/file_manager/grit/file_manager_resources.h" | 22 #include "ui/file_manager/grit/file_manager_resources.h" |
23 #endif | 23 #endif |
24 | 24 |
25 namespace extensions { | 25 namespace extensions { |
26 | 26 |
27 bool IsComponentExtensionWhitelisted(const std::string& extension_id) { | 27 bool IsComponentExtensionWhitelisted(const std::string& extension_id) { |
28 const char* allowed[] = { | 28 const char* allowed[] = { |
29 extension_misc::kHotwordSharedModuleId, | 29 extension_misc::kHotwordSharedModuleId, |
30 extension_misc::kInAppPaymentsSupportAppId, | 30 extension_misc::kInAppPaymentsSupportAppId, |
| 31 #if defined(ENABLE_MEDIA_ROUTER) |
31 extension_misc::kMediaRouterStableExtensionId, | 32 extension_misc::kMediaRouterStableExtensionId, |
| 33 #endif // defined(ENABLE_MEDIA_ROUTER) |
32 extension_misc::kPdfExtensionId, | 34 extension_misc::kPdfExtensionId, |
33 #if defined(OS_CHROMEOS) | 35 #if defined(OS_CHROMEOS) |
34 extension_misc::kChromeVoxExtensionId, | 36 extension_misc::kChromeVoxExtensionId, |
35 extension_misc::kSpeechSynthesisExtensionId, | 37 extension_misc::kSpeechSynthesisExtensionId, |
36 extension_misc::kZIPUnpackerExtensionId, | 38 extension_misc::kZIPUnpackerExtensionId, |
37 #endif | 39 #endif |
38 }; | 40 }; |
39 | 41 |
40 for (size_t i = 0; i < arraysize(allowed); ++i) { | 42 for (size_t i = 0; i < arraysize(allowed); ++i) { |
41 if (extension_id == allowed[i]) | 43 if (extension_id == allowed[i]) |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 } | 121 } |
120 | 122 |
121 LOG(ERROR) << "Component extension with manifest resource id " | 123 LOG(ERROR) << "Component extension with manifest resource id " |
122 << manifest_resource_id << " not in whitelist and is not being " | 124 << manifest_resource_id << " not in whitelist and is not being " |
123 << "loaded as a result."; | 125 << "loaded as a result."; |
124 NOTREACHED(); | 126 NOTREACHED(); |
125 return false; | 127 return false; |
126 } | 128 } |
127 | 129 |
128 } // namespace extensions | 130 } // namespace extensions |
OLD | NEW |