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

Side by Side Diff: chrome/browser/extensions/component_extensions_whitelist/whitelist.cc

Issue 2216433004: Add skeleton for select-to-speak component extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 18 matching lines...) Expand all
29 bool IsComponentExtensionWhitelisted(const std::string& extension_id) { 29 bool IsComponentExtensionWhitelisted(const std::string& extension_id) {
30 const char* const kAllowed[] = { 30 const char* const kAllowed[] = {
31 extension_misc::kHotwordSharedModuleId, 31 extension_misc::kHotwordSharedModuleId,
32 extension_misc::kInAppPaymentsSupportAppId, 32 extension_misc::kInAppPaymentsSupportAppId,
33 #if defined(ENABLE_MEDIA_ROUTER) 33 #if defined(ENABLE_MEDIA_ROUTER)
34 extension_misc::kMediaRouterStableExtensionId, 34 extension_misc::kMediaRouterStableExtensionId,
35 #endif // defined(ENABLE_MEDIA_ROUTER) 35 #endif // defined(ENABLE_MEDIA_ROUTER)
36 extension_misc::kPdfExtensionId, 36 extension_misc::kPdfExtensionId,
37 #if defined(OS_CHROMEOS) 37 #if defined(OS_CHROMEOS)
38 extension_misc::kChromeVoxExtensionId, 38 extension_misc::kChromeVoxExtensionId,
39 extension_misc::kSelectToSpeakExtensionId,
39 extension_misc::kSpeechSynthesisExtensionId, 40 extension_misc::kSpeechSynthesisExtensionId,
40 extension_misc::kZIPUnpackerExtensionId, 41 extension_misc::kZIPUnpackerExtensionId,
41 #endif 42 #endif
42 }; 43 };
43 44
44 for (size_t i = 0; i < arraysize(kAllowed); ++i) { 45 for (size_t i = 0; i < arraysize(kAllowed); ++i) {
45 if (extension_id == kAllowed[i]) 46 if (extension_id == kAllowed[i])
46 return true; 47 return true;
47 } 48 }
48 49
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 124 }
124 125
125 LOG(ERROR) << "Component extension with manifest resource id " 126 LOG(ERROR) << "Component extension with manifest resource id "
126 << manifest_resource_id << " not in whitelist and is not being " 127 << manifest_resource_id << " not in whitelist and is not being "
127 << "loaded as a result."; 128 << "loaded as a result.";
128 NOTREACHED(); 129 NOTREACHED();
129 return false; 130 return false;
130 } 131 }
131 132
132 } // namespace extensions 133 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698